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,216 @@
|
|
|
1
|
+
# Aider analytics JSONL mapping for MappedJsonAdapter
|
|
2
|
+
# Targets: aider >= 0.70 analytics log (--analytics-log <path>)
|
|
3
|
+
# Source: Aider-AI/aider:aider/analytics.py — verified 2026-06-14
|
|
4
|
+
#
|
|
5
|
+
# Aider writes JSONL to a USER-SPECIFIED path via --analytics-log flag.
|
|
6
|
+
# There is NO default structured output file. Users must configure:
|
|
7
|
+
# aider --analytics-log .aider.analytics.jsonl
|
|
8
|
+
#
|
|
9
|
+
# JSONL schema (4 top-level fields):
|
|
10
|
+
# {"event": str, "properties": dict, "user_id": str, "time": unix_int}
|
|
11
|
+
#
|
|
12
|
+
# The markdown chat history (.aider.chat.history.md) uses AiderPreParser
|
|
13
|
+
# via aider_markdown.yaml — that mapping is separate and independent.
|
|
14
|
+
|
|
15
|
+
framework: aider
|
|
16
|
+
framework_version: ">=0.70"
|
|
17
|
+
ingestion_mode: file_watch
|
|
18
|
+
type_field: event
|
|
19
|
+
timestamp_field: time
|
|
20
|
+
default_kind: raw
|
|
21
|
+
|
|
22
|
+
# ── Event Definitions ──
|
|
23
|
+
# 21 real events verified from source (main.py, base_coder.py, watch.py, onboarding.py)
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
# ── Core LLM interaction ──
|
|
27
|
+
message_send:
|
|
28
|
+
kind: llm.call.completed
|
|
29
|
+
payload:
|
|
30
|
+
model: properties.main_model
|
|
31
|
+
edit_format: properties.edit_format
|
|
32
|
+
input_tokens: properties.prompt_tokens
|
|
33
|
+
output_tokens: properties.completion_tokens
|
|
34
|
+
total_tokens: properties.total_tokens
|
|
35
|
+
cost: properties.cost
|
|
36
|
+
total_cost: properties.total_cost
|
|
37
|
+
|
|
38
|
+
message_send_starting:
|
|
39
|
+
kind: llm.call.started
|
|
40
|
+
payload: {}
|
|
41
|
+
|
|
42
|
+
message_send_exception:
|
|
43
|
+
kind: llm.call.error
|
|
44
|
+
payload:
|
|
45
|
+
error: properties.exception
|
|
46
|
+
|
|
47
|
+
# ── Session lifecycle ──
|
|
48
|
+
launched:
|
|
49
|
+
kind: session.started
|
|
50
|
+
payload: {}
|
|
51
|
+
|
|
52
|
+
"cli session":
|
|
53
|
+
kind: session.configured
|
|
54
|
+
payload:
|
|
55
|
+
model: properties.main_model
|
|
56
|
+
weak_model: properties.weak_model
|
|
57
|
+
editor_model: properties.editor_model
|
|
58
|
+
edit_format: properties.edit_format
|
|
59
|
+
|
|
60
|
+
"gui session":
|
|
61
|
+
kind: session.configured
|
|
62
|
+
payload: {}
|
|
63
|
+
|
|
64
|
+
exit:
|
|
65
|
+
kind: session.ended
|
|
66
|
+
payload:
|
|
67
|
+
reason: properties.reason
|
|
68
|
+
|
|
69
|
+
# ── Repository context ──
|
|
70
|
+
repo:
|
|
71
|
+
kind: context.repository
|
|
72
|
+
payload:
|
|
73
|
+
num_files: properties.num_files
|
|
74
|
+
|
|
75
|
+
no-repo:
|
|
76
|
+
kind: context.no_repository
|
|
77
|
+
payload: {}
|
|
78
|
+
|
|
79
|
+
# ── Configuration ──
|
|
80
|
+
auto_commits:
|
|
81
|
+
kind: config.auto_commits
|
|
82
|
+
payload:
|
|
83
|
+
enabled: properties.enabled
|
|
84
|
+
|
|
85
|
+
"copy-paste mode":
|
|
86
|
+
kind: config.copy_paste
|
|
87
|
+
payload: {}
|
|
88
|
+
|
|
89
|
+
"model warning":
|
|
90
|
+
kind: config.model_warning
|
|
91
|
+
payload:
|
|
92
|
+
model: properties.main_model
|
|
93
|
+
weak_model: properties.weak_model
|
|
94
|
+
editor_model: properties.editor_model
|
|
95
|
+
|
|
96
|
+
# ── AI-comment file watcher ──
|
|
97
|
+
"ai-comments file-add":
|
|
98
|
+
kind: watch.file_added
|
|
99
|
+
payload: {}
|
|
100
|
+
|
|
101
|
+
"ai-comments execute":
|
|
102
|
+
kind: watch.execute
|
|
103
|
+
payload: {}
|
|
104
|
+
|
|
105
|
+
# ── OAuth onboarding ──
|
|
106
|
+
oauth_flow_initiated:
|
|
107
|
+
kind: auth.oauth_started
|
|
108
|
+
payload:
|
|
109
|
+
provider: properties.provider
|
|
110
|
+
|
|
111
|
+
oauth_flow_success:
|
|
112
|
+
kind: auth.oauth_success
|
|
113
|
+
payload:
|
|
114
|
+
provider: properties.provider
|
|
115
|
+
|
|
116
|
+
oauth_flow_failure:
|
|
117
|
+
kind: auth.oauth_failed
|
|
118
|
+
payload: {}
|
|
119
|
+
|
|
120
|
+
oauth_flow_failed:
|
|
121
|
+
kind: auth.oauth_failed
|
|
122
|
+
payload:
|
|
123
|
+
provider: properties.provider
|
|
124
|
+
reason: properties.reason
|
|
125
|
+
|
|
126
|
+
oauth_flow_code_received:
|
|
127
|
+
kind: auth.oauth_code_received
|
|
128
|
+
payload:
|
|
129
|
+
provider: properties.provider
|
|
130
|
+
|
|
131
|
+
oauth_flow_save_failed:
|
|
132
|
+
kind: auth.oauth_save_failed
|
|
133
|
+
payload:
|
|
134
|
+
provider: properties.provider
|
|
135
|
+
reason: properties.reason
|
|
136
|
+
|
|
137
|
+
auto_model_selection:
|
|
138
|
+
kind: config.auto_model
|
|
139
|
+
payload:
|
|
140
|
+
model: properties.model
|
|
141
|
+
|
|
142
|
+
# ── User commands (dynamically generated from /command input) ──
|
|
143
|
+
# These all have empty properties — they record which slash-command was used.
|
|
144
|
+
# Unmapped command_* variants fall through to default_kind: raw.
|
|
145
|
+
command_add:
|
|
146
|
+
kind: user.command
|
|
147
|
+
payload: {}
|
|
148
|
+
|
|
149
|
+
command_drop:
|
|
150
|
+
kind: user.command
|
|
151
|
+
payload: {}
|
|
152
|
+
|
|
153
|
+
command_ask:
|
|
154
|
+
kind: user.command
|
|
155
|
+
payload: {}
|
|
156
|
+
|
|
157
|
+
command_code:
|
|
158
|
+
kind: user.command
|
|
159
|
+
payload: {}
|
|
160
|
+
|
|
161
|
+
command_commit:
|
|
162
|
+
kind: user.command
|
|
163
|
+
payload: {}
|
|
164
|
+
|
|
165
|
+
command_run:
|
|
166
|
+
kind: user.command
|
|
167
|
+
payload: {}
|
|
168
|
+
|
|
169
|
+
command_undo:
|
|
170
|
+
kind: user.command
|
|
171
|
+
payload: {}
|
|
172
|
+
|
|
173
|
+
command_clear:
|
|
174
|
+
kind: user.command
|
|
175
|
+
payload: {}
|
|
176
|
+
|
|
177
|
+
command_model:
|
|
178
|
+
kind: user.command
|
|
179
|
+
payload: {}
|
|
180
|
+
|
|
181
|
+
command_paste:
|
|
182
|
+
kind: user.command
|
|
183
|
+
payload: {}
|
|
184
|
+
|
|
185
|
+
command_web:
|
|
186
|
+
kind: user.command
|
|
187
|
+
payload: {}
|
|
188
|
+
|
|
189
|
+
command_exit:
|
|
190
|
+
kind: user.command
|
|
191
|
+
payload: {}
|
|
192
|
+
|
|
193
|
+
command_edit:
|
|
194
|
+
kind: user.command
|
|
195
|
+
payload: {}
|
|
196
|
+
|
|
197
|
+
command_read-only:
|
|
198
|
+
kind: user.command
|
|
199
|
+
payload: {}
|
|
200
|
+
|
|
201
|
+
command_chat-mode:
|
|
202
|
+
kind: user.command
|
|
203
|
+
payload: {}
|
|
204
|
+
|
|
205
|
+
command_reasoning-effort:
|
|
206
|
+
kind: user.command
|
|
207
|
+
payload: {}
|
|
208
|
+
|
|
209
|
+
command_ok:
|
|
210
|
+
kind: user.command
|
|
211
|
+
payload: {}
|
|
212
|
+
|
|
213
|
+
# ── Interactive help (#41: fires on /help <query>, no properties) ──
|
|
214
|
+
"interactive help":
|
|
215
|
+
kind: user.command
|
|
216
|
+
payload: {}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Aider Markdown Pre-Parser output mapping for MappedJsonAdapter
|
|
2
|
+
# Maps event dicts emitted by AiderPreParser → canonical event kinds.
|
|
3
|
+
# Input: AiderPreParser.parse_text() output, serialized as JSONL
|
|
4
|
+
# Source format: .aider.chat.history.md (append-only markdown session log)
|
|
5
|
+
#
|
|
6
|
+
# This mapping handles the pre-parser's output types. For aider's native
|
|
7
|
+
# structured JSON events (.aider.events.json), use aider.yaml instead.
|
|
8
|
+
|
|
9
|
+
framework: aider_markdown
|
|
10
|
+
framework_version: ">=0.70"
|
|
11
|
+
ingestion_mode: file_watch
|
|
12
|
+
type_field: type
|
|
13
|
+
timestamp_field: timestamp
|
|
14
|
+
|
|
15
|
+
motivation:
|
|
16
|
+
sources:
|
|
17
|
+
- events: ["assistant_message"]
|
|
18
|
+
field: content
|
|
19
|
+
role: intent
|
|
20
|
+
targets: ["tool.call.completed"]
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
# ── Session lifecycle ──
|
|
24
|
+
session_start:
|
|
25
|
+
kind: session.started
|
|
26
|
+
payload:
|
|
27
|
+
session_id: session_id
|
|
28
|
+
started_at: started_at
|
|
29
|
+
|
|
30
|
+
# ── Messages ──
|
|
31
|
+
user_message:
|
|
32
|
+
kind: message.user
|
|
33
|
+
payload:
|
|
34
|
+
content: content
|
|
35
|
+
|
|
36
|
+
assistant_message:
|
|
37
|
+
kind: message.assistant
|
|
38
|
+
payload:
|
|
39
|
+
content: content
|
|
40
|
+
|
|
41
|
+
# ── Commands ──
|
|
42
|
+
slash_command:
|
|
43
|
+
kind: command.started
|
|
44
|
+
payload:
|
|
45
|
+
command: command
|
|
46
|
+
arguments: args
|
|
47
|
+
|
|
48
|
+
# ── File operations ──
|
|
49
|
+
file_edit:
|
|
50
|
+
kind: file.edited
|
|
51
|
+
payload:
|
|
52
|
+
path: file_path
|
|
53
|
+
search: search
|
|
54
|
+
replace: replace
|
|
55
|
+
|
|
56
|
+
file_edit_applied:
|
|
57
|
+
kind: file.edited
|
|
58
|
+
payload:
|
|
59
|
+
path: file_path
|
|
60
|
+
|
|
61
|
+
file_add:
|
|
62
|
+
kind: input.received
|
|
63
|
+
payload:
|
|
64
|
+
path: file_path
|
|
65
|
+
|
|
66
|
+
# ── Git ──
|
|
67
|
+
git_commit:
|
|
68
|
+
kind: tool.call.completed
|
|
69
|
+
payload:
|
|
70
|
+
tool_name: git
|
|
71
|
+
result: commit_sha
|
|
72
|
+
message: commit_message
|
|
73
|
+
|
|
74
|
+
# ── Telemetry / info ──
|
|
75
|
+
token_usage:
|
|
76
|
+
kind: telemetry.usage
|
|
77
|
+
payload:
|
|
78
|
+
tokens_sent: tokens_sent
|
|
79
|
+
tokens_received: tokens_received
|
|
80
|
+
|
|
81
|
+
version_info:
|
|
82
|
+
kind: session.info
|
|
83
|
+
payload:
|
|
84
|
+
version: version
|
|
85
|
+
|
|
86
|
+
model_info:
|
|
87
|
+
kind: session.info
|
|
88
|
+
payload:
|
|
89
|
+
model: model
|
|
90
|
+
edit_format: edit_format
|
|
91
|
+
|
|
92
|
+
repo_info:
|
|
93
|
+
kind: session.info
|
|
94
|
+
payload:
|
|
95
|
+
repo_path: repo_path
|
|
96
|
+
file_count: file_count
|
|
97
|
+
|
|
98
|
+
repo_map:
|
|
99
|
+
kind: knowledge.query.completed
|
|
100
|
+
payload:
|
|
101
|
+
content: repo_map_info
|
|
102
|
+
|
|
103
|
+
# ── Errors ──
|
|
104
|
+
error:
|
|
105
|
+
kind: session.error
|
|
106
|
+
payload:
|
|
107
|
+
message: message
|
|
108
|
+
|
|
109
|
+
# ── Generic tool output ──
|
|
110
|
+
tool_output:
|
|
111
|
+
kind: tool.output
|
|
112
|
+
payload:
|
|
113
|
+
text: text
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Amazon Q Developer — YAML mapping for traceforge
|
|
2
|
+
#
|
|
3
|
+
# Amazon Q Developer stores conversations in SQLite:
|
|
4
|
+
# ~/.local/share/amazon-q/data.sqlite3 (Linux)
|
|
5
|
+
# ~/Library/Application Support/amazon-q/data.sqlite3 (macOS)
|
|
6
|
+
#
|
|
7
|
+
# The conversations table has a JSON `value` column with the full message
|
|
8
|
+
# history. The "amazonq" preprocessor extracts and flattens messages and
|
|
9
|
+
# tool calls into per-block events with a "block_type" discriminator.
|
|
10
|
+
#
|
|
11
|
+
# Tool calls use the Anthropic-style content block format:
|
|
12
|
+
# - type: "tool_use" → tool invocation (name + input)
|
|
13
|
+
# - type: "tool_result" → tool output (content + is_error)
|
|
14
|
+
#
|
|
15
|
+
# Source: Amazon Q Developer CLI / VS Code extension
|
|
16
|
+
# Storage: SQLite with JSON blob per conversation
|
|
17
|
+
|
|
18
|
+
framework: amazonq
|
|
19
|
+
framework_version: "1.x"
|
|
20
|
+
ingestion_mode: poll
|
|
21
|
+
type_field: block_type
|
|
22
|
+
default_kind: raw
|
|
23
|
+
preprocessor: amazonq
|
|
24
|
+
|
|
25
|
+
motivation:
|
|
26
|
+
sources:
|
|
27
|
+
- events: ["message.assistant"]
|
|
28
|
+
field: content
|
|
29
|
+
role: intent
|
|
30
|
+
|
|
31
|
+
events:
|
|
32
|
+
# ── Tool calls ─────────────────────────────────────────────────────────────
|
|
33
|
+
tool.call:
|
|
34
|
+
kind: tool.call.started
|
|
35
|
+
payload:
|
|
36
|
+
tool_call_id: tool_call_id
|
|
37
|
+
tool_name: tool_name
|
|
38
|
+
arguments: arguments
|
|
39
|
+
|
|
40
|
+
tool.result:
|
|
41
|
+
kind: tool.call.completed
|
|
42
|
+
payload:
|
|
43
|
+
tool_call_id: tool_call_id
|
|
44
|
+
is_error: is_error
|
|
45
|
+
result: output
|
|
46
|
+
|
|
47
|
+
# ── Messages ───────────────────────────────────────────────────────────────
|
|
48
|
+
message.user:
|
|
49
|
+
kind: message.user
|
|
50
|
+
payload:
|
|
51
|
+
content: content
|
|
52
|
+
|
|
53
|
+
message.assistant:
|
|
54
|
+
kind: message.assistant
|
|
55
|
+
payload:
|
|
56
|
+
content: content
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Google Antigravity — YAML mapping for traceforge
|
|
2
|
+
#
|
|
3
|
+
# Native source: the Antigravity Python SDK's ``agent.conversation.history`` —
|
|
4
|
+
# a ``list[google.antigravity.types.Step]`` dumped verbatim per line with
|
|
5
|
+
# ``model_dump(mode="json")`` by scripts/capture_traces/capture_antigravity.py
|
|
6
|
+
# (or synthesize_antigravity_fixture.py for the shape fixture).
|
|
7
|
+
#
|
|
8
|
+
# Each Step's identity is a compound of ``type`` (StepType) + ``source``
|
|
9
|
+
# (StepSource), so there is no single native type_field. The ``antigravity``
|
|
10
|
+
# preprocessor synthesizes a flat ``event_type`` discriminator and fans a
|
|
11
|
+
# TOOL_CALL step out into one ``tool_call`` event per entry in ``tool_calls``.
|
|
12
|
+
#
|
|
13
|
+
# Antigravity has no Windows IDE; the SDK runs under WSL/Docker (the manylinux
|
|
14
|
+
# localharness binary needs glibc >= 2.36). Tool *results* are consumed inside
|
|
15
|
+
# the Go localharness and never surface on a history Step, so this mapping emits
|
|
16
|
+
# tool calls but no tool-result event.
|
|
17
|
+
|
|
18
|
+
framework: antigravity
|
|
19
|
+
framework_version: "google-antigravity-sdk"
|
|
20
|
+
ingestion_mode: file_watch
|
|
21
|
+
type_field: event_type
|
|
22
|
+
preprocessor: antigravity
|
|
23
|
+
default_kind: raw
|
|
24
|
+
|
|
25
|
+
motivation:
|
|
26
|
+
sources:
|
|
27
|
+
- events: ["assistant_message"]
|
|
28
|
+
field: content
|
|
29
|
+
role: intent
|
|
30
|
+
- events: ["thinking"]
|
|
31
|
+
field: content
|
|
32
|
+
role: reasoning
|
|
33
|
+
targets: ["tool.call.started"]
|
|
34
|
+
|
|
35
|
+
events:
|
|
36
|
+
# ── Messages ───────────────────────────────────────────────────────────────
|
|
37
|
+
user_message:
|
|
38
|
+
kind: message.user
|
|
39
|
+
payload:
|
|
40
|
+
content: content
|
|
41
|
+
step_index: step_index
|
|
42
|
+
source: source
|
|
43
|
+
|
|
44
|
+
assistant_message:
|
|
45
|
+
kind: message.assistant
|
|
46
|
+
payload:
|
|
47
|
+
content: content
|
|
48
|
+
step_index: step_index
|
|
49
|
+
source: source
|
|
50
|
+
|
|
51
|
+
system_message:
|
|
52
|
+
kind: message.system
|
|
53
|
+
payload:
|
|
54
|
+
content: content
|
|
55
|
+
step_index: step_index
|
|
56
|
+
|
|
57
|
+
# ── Reasoning ────────────────────────────────────────────────────────────
|
|
58
|
+
thinking:
|
|
59
|
+
kind: reasoning.started
|
|
60
|
+
payload:
|
|
61
|
+
content: content
|
|
62
|
+
step_index: step_index
|
|
63
|
+
|
|
64
|
+
# ── Tool invocations (fanned out from Step.tool_calls[]) ─────────────────────
|
|
65
|
+
# The SDK history records the CALL (name + args); builtin tool output is fed
|
|
66
|
+
# back to the model inside the Go localharness and is not a history field.
|
|
67
|
+
tool_call:
|
|
68
|
+
kind: tool.call.started
|
|
69
|
+
payload:
|
|
70
|
+
tool_name: tool_name
|
|
71
|
+
args: args
|
|
72
|
+
tool_call_id: tool_call_id
|
|
73
|
+
path: path
|
|
74
|
+
step_index: step_index
|
|
75
|
+
|
|
76
|
+
# ── Context compaction marker ────────────────────────────────────────────────
|
|
77
|
+
compaction:
|
|
78
|
+
kind: session.info
|
|
79
|
+
payload:
|
|
80
|
+
step_index: step_index
|
|
81
|
+
|
|
82
|
+
# ── Terminal finish step (carries structured_output) ─────────────────────────
|
|
83
|
+
finish:
|
|
84
|
+
kind: task.completed
|
|
85
|
+
payload:
|
|
86
|
+
content: content
|
|
87
|
+
structured_output: structured_output
|
|
88
|
+
step_index: step_index
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Claude (Anthropic Claude Code / Agent SDK) — YAML mapping for traceforge
|
|
2
|
+
#
|
|
3
|
+
# Wire format: JSONL lines with shapes:
|
|
4
|
+
# User: {type: "user", message: {content: "..." | [blocks]}}
|
|
5
|
+
# Assistant: {type: "assistant", message: {content: [blocks]}}
|
|
6
|
+
# Result: {type: "result", subtype: ..., duration_ms: ..., usage: {...}}
|
|
7
|
+
# System: {type: "system", subtype: ...}
|
|
8
|
+
#
|
|
9
|
+
# Content blocks in assistant messages can be:
|
|
10
|
+
# {type: "text", text: "..."}
|
|
11
|
+
# {type: "tool_use", id: "...", name: "...", input: {...}}
|
|
12
|
+
# {type: "tool_result", tool_use_id: "...", content: "...", is_error: bool}
|
|
13
|
+
# {type: "thinking", thinking: "...", signature: "..."}
|
|
14
|
+
#
|
|
15
|
+
# The "claude" preprocessor flattens content blocks into individual dicts
|
|
16
|
+
# with a synthesized `block_type` field (e.g. "assistant.text",
|
|
17
|
+
# "assistant.tool_use", "user.text", "result").
|
|
18
|
+
#
|
|
19
|
+
# Source: Claude Agent SDK JSONL output
|
|
20
|
+
# Verified against: claude_session.jsonl fixture
|
|
21
|
+
|
|
22
|
+
framework: claude
|
|
23
|
+
framework_version: "0.x"
|
|
24
|
+
ingestion_mode: file_watch
|
|
25
|
+
type_field: block_type
|
|
26
|
+
default_kind: ""
|
|
27
|
+
preprocessor: claude
|
|
28
|
+
|
|
29
|
+
motivation:
|
|
30
|
+
sources:
|
|
31
|
+
- events: ["assistant.text"]
|
|
32
|
+
field: content
|
|
33
|
+
role: intent
|
|
34
|
+
- events: ["assistant.thinking"]
|
|
35
|
+
field: content
|
|
36
|
+
role: reasoning
|
|
37
|
+
|
|
38
|
+
events:
|
|
39
|
+
# ── User messages ──────────────────────────────────────────────────────────
|
|
40
|
+
user.text:
|
|
41
|
+
kind: message.user
|
|
42
|
+
payload:
|
|
43
|
+
content: content
|
|
44
|
+
|
|
45
|
+
# ── Assistant text ─────────────────────────────────────────────────────────
|
|
46
|
+
assistant.text:
|
|
47
|
+
kind: message.assistant
|
|
48
|
+
payload:
|
|
49
|
+
content: text
|
|
50
|
+
|
|
51
|
+
# ── Tool use (call started) ────────────────────────────────────────────────
|
|
52
|
+
assistant.tool_use:
|
|
53
|
+
kind: tool.call.started
|
|
54
|
+
payload:
|
|
55
|
+
tool_call_id: id
|
|
56
|
+
tool_name: name
|
|
57
|
+
arguments: input
|
|
58
|
+
|
|
59
|
+
# ── Tool result (call completed) ───────────────────────────────────────────
|
|
60
|
+
# Note: tool_result blocks appear in assistant messages (not user messages)
|
|
61
|
+
# because Claude's wire format wraps tool results in assistant turns.
|
|
62
|
+
assistant.tool_result:
|
|
63
|
+
kind: tool.call.completed
|
|
64
|
+
payload:
|
|
65
|
+
tool_call_id: tool_use_id
|
|
66
|
+
success: success
|
|
67
|
+
result: content_text
|
|
68
|
+
|
|
69
|
+
# Also handle tool results that appear in user context
|
|
70
|
+
user.tool_result:
|
|
71
|
+
kind: tool.call.completed
|
|
72
|
+
payload:
|
|
73
|
+
tool_call_id: tool_use_id
|
|
74
|
+
success: success
|
|
75
|
+
result: content_text
|
|
76
|
+
|
|
77
|
+
# ── Thinking ───────────────────────────────────────────────────────────────
|
|
78
|
+
assistant.thinking:
|
|
79
|
+
kind: llm.thinking.chunk
|
|
80
|
+
payload:
|
|
81
|
+
content: thinking
|
|
82
|
+
|
|
83
|
+
# ── Result (session summary with usage) ────────────────────────────────────
|
|
84
|
+
result:
|
|
85
|
+
kind: telemetry.usage
|
|
86
|
+
payload:
|
|
87
|
+
duration_ms: duration_ms
|
|
88
|
+
cost_usd: total_cost_usd
|
|
89
|
+
num_turns: num_turns
|
|
90
|
+
input_tokens: usage_input_tokens
|
|
91
|
+
output_tokens: usage_output_tokens
|
|
92
|
+
cache_read_tokens: usage_cache_read_input_tokens
|
|
93
|
+
cache_write_tokens: usage_cache_creation_input_tokens
|