Skip to content

previous-draft/collect.py

Comment 1, line 1

previous-draft/collect.py:1

# -*- coding: utf-8 -*-

Comment 2, line 2

previous-draft/collect.py:2

"""LLM usage collection and statistics entry point.
Two execution modes:
1. Managed Blueprint Automation calls run(ctx).
ctx.input: {"refresh": bool, "tools": [names...]}
2. Standalone: python collect.py [--refresh] [--tool NAME ...] [--out PATH]
After incremental collection, write the statistical snapshot to dashboard/data.json
for the static dashboard and print source states. The default database is data/usage.db.
"""

Comment 3, line 21

previous-draft/collect.py:21

# noqa: E402

Comment 4, line 22

previous-draft/collect.py:22

# noqa: E402

Comment 5, line 23

previous-draft/collect.py:23

# noqa: E402

Comment 6, line 29

previous-draft/collect.py:29

"""Discover all collector modules under collectors/; add one file to introduce a tool."""

Comment 7, line 90

previous-draft/collect.py:90

# Recompute only dates with new events; historical data reuses the cache.