Commit c79239f
v0.6.0: Agent-first protocol — MCP server, REST API, 6 tools
* Add Pydantic I/O schemas for v0.6.0 agent protocol tools
Create the tools package with all 16 Pydantic v2 models covering 6 tool
contracts (record, query, investigate, trace, changelog, discover) plus
4 shared types (ModelSummary, EventSummary, EventDetail, DependencyNode).
These schemas are the single source of truth for MCP, REST API, and CLI.
72 tests covering all fields, defaults, JSON round-trip, and JSON Schema export.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add record tool — register models and record events
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add query tool — search and filter inventory
Implements the query tool with structured filters (model_type, owner,
status), case-insensitive text search on name/purpose, and pagination.
Includes _model_to_summary helper for reuse by the discover tool.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add investigate tool — deep dive on single model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add trace tool — dependency graph traversal
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add discover tool — bulk ingestion
Implements the discover tool for bulk model ingestion from inline data,
JSON files, or connectors. Inline and file sources convert dicts to
DataNodes and leverage ledger.add() for content-hash dedup and
ledger.connect() for auto-linking dependencies. Connector source raises
NotImplementedError pending SDK-direct usage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add changelog tool — cross-model event timeline
Implements the changelog tool with time range filtering (since/until),
model_name and event_type filters, pagination, and newest-first ordering.
Includes 15 tests covering all specified behaviors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: export all tool functions from tools package
Re-exports changelog, discover, investigate, query, record, and trace
from model_ledger.tools so consumers can import tool functions directly
from the package.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add JSON file backend — human-readable, git-friendly default
JsonFileLedgerBackend stores models, snapshots, and tags as indented
JSON files in a directory tree. Implements full LedgerBackend protocol
including sorted snapshot listing and tag-based resolution. 23 tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add REST API (FastAPI) wrapping tool functions
Adds a FastAPI app at model_ledger.rest.app with endpoints for all 6
agent protocol tools (record, discover, investigate, query, trace,
changelog) plus /overview. ModelNotFoundError maps to HTTP 404.
Adds rest-api optional dependency and E402 suppression for tests
using pytest.importorskip.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add MCP server with 6 tools and 3 resources
FastMCP server wrapping all tool functions (discover, record, investigate,
query, trace, changelog) with primitive-typed parameters for MCP compat.
Three resources: ledger://overview, ledger://schema, ledger://backends.
Includes create_server() factory and main() CLI entry point.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add demo inventory with sample models and events
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add mcp and serve CLI commands
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: export agent protocol tools and bump to v0.6.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update README for v0.6.0 agent protocol
Repositions model-ledger as a fundamental model inventory (not
MRM-specific). Adds agent-first messaging, MCP/REST docs, tool
protocol overview, JSON file backend, and updated install profiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Reorganize README for v0.6.0
- Clear section hierarchy with progressive disclosure
- Fix architecture diagram (add SDK layer between tools and backends)
- Fix self-contained investigate example
- Trim agent conversation (3 → 2 exchanges)
- Collapse compliance/introspection into brief "Additional Capabilities"
- Add positioning line vs MLflow/SageMaker/W&B
- Remove "thin tools, thick descriptions" from public README (internal)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove outdated design docs
These docs reflect the old compliance-first positioning (v0.2-v0.3)
and are superseded by the v0.6.0 README. Archived to second brain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix tool output quality: model_type, metadata noise, platform
- Ledger.add() now reads model_type/type from DataNode metadata
(was only reading node_type, which nobody set)
- investigate: skip internal events (depends_on, has_dependent,
registered) and internal keys (_content_hash, upstream/downstream
hashes) when merging metadata
- query: extract platform from discovered payload, not just
snapshot.source
- demo: add model_type to all DataNode metadata
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Vignesh Narayanaswamy <Vigneshn@squareup.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ef63110 commit c79239f
File tree
36 files changed
+4564
-1119
lines changed- docs
- plans
- src/model_ledger
- backends
- cli
- datasets
- mcp
- rest
- sdk
- tools
- tests
- test_backends
- test_mcp
- test_rest
- test_tools
36 files changed
+4564
-1119
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
11 | 32 | | |
12 | 33 | | |
13 | 34 | | |
| |||
34 | 55 | | |
35 | 56 | | |
36 | 57 | | |
37 | | - | |
38 | | - | |
39 | 58 | | |
40 | 59 | | |
41 | 60 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
53 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
54 | 93 | | |
55 | 94 | | |
56 | 95 | | |
57 | 96 | | |
58 | 97 | | |
59 | 98 | | |
60 | 99 | | |
61 | | - | |
| 100 | + | |
62 | 101 | | |
63 | | - | |
64 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
65 | 106 | | |
66 | 107 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
71 | 134 | | |
72 | | - | |
| 135 | + | |
73 | 136 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
77 | 178 | | |
78 | 179 | | |
79 | | - | |
| 180 | + | |
80 | 181 | | |
81 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
82 | 188 | | |
83 | 189 | | |
84 | 190 | | |
85 | 191 | | |
86 | 192 | | |
87 | | - | |
88 | | - | |
89 | 193 | | |
90 | 194 | | |
91 | 195 | | |
| |||
146 | 250 | | |
147 | 251 | | |
148 | 252 | | |
149 | | - | |
| 253 | + | |
150 | 254 | | |
151 | 255 | | |
152 | 256 | | |
| |||
162 | 266 | | |
163 | 267 | | |
164 | 268 | | |
165 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
166 | 272 | | |
167 | 273 | | |
168 | 274 | | |
| 275 | + | |
169 | 276 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
174 | 281 | | |
175 | 282 | | |
176 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
177 | 307 | | |
178 | 308 | | |
179 | 309 | | |
180 | 310 | | |
181 | 311 | | |
182 | 312 | | |
183 | 313 | | |
184 | | - | |
185 | 314 | | |
186 | 315 | | |
187 | 316 | | |
188 | 317 | | |
189 | | - | |
| 318 | + | |
190 | 319 | | |
191 | 320 | | |
192 | 321 | | |
193 | 322 | | |
194 | | - | |
195 | 323 | | |
196 | 324 | | |
197 | | - | |
198 | | - | |
199 | 325 | | |
| 326 | + | |
200 | 327 | | |
201 | 328 | | |
202 | 329 | | |
203 | 330 | | |
204 | 331 | | |
205 | | - | |
206 | 332 | | |
207 | 333 | | |
208 | 334 | | |
209 | 335 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 336 | + | |
213 | 337 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 338 | + | |
219 | 339 | | |
220 | 340 | | |
221 | 341 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 342 | + | |
234 | 343 | | |
235 | 344 | | |
236 | 345 | | |
| 346 | + | |
| 347 | + | |
237 | 348 | | |
238 | 349 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
243 | 353 | | |
244 | 354 | | |
245 | 355 | | |
246 | | - | |
| 356 | + | |
247 | 357 | | |
248 | | - | |
| 358 | + | |
249 | 359 | | |
250 | | - | |
251 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
252 | 363 | | |
253 | 364 | | |
254 | 365 | | |
| |||
0 commit comments