tokentrace 0.12.1 → 0.13.0
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.
- package/CHANGELOG.md +30 -0
- package/app/api/prices/route.ts +2 -1
- package/app/diagnostics/page.tsx +33 -557
- package/app/globals.css +3 -0
- package/app/loading.tsx +2 -2
- package/app/page.tsx +36 -1110
- package/app/repair/page.tsx +20 -344
- package/app/repair/repair-page-data.ts +37 -0
- package/bin/tokentrace.js +4 -640
- package/components/diagnostics/doctor-report-panel.tsx +134 -0
- package/components/diagnostics/local-recommendations-card.tsx +33 -0
- package/components/diagnostics/parser-panels.tsx +261 -0
- package/components/diagnostics/trust-checklist.tsx +127 -0
- package/components/overview/current-mix-panel.tsx +71 -0
- package/components/overview/data-confidence-strip.tsx +41 -0
- package/components/overview/first-run-panel.tsx +72 -0
- package/components/overview/guardrails-panel.tsx +101 -0
- package/components/overview/recommendations-card.tsx +51 -0
- package/components/overview/review-status-strip.tsx +182 -0
- package/components/overview/summary-cards.tsx +281 -0
- package/components/overview/top-repair-items-strip.tsx +82 -0
- package/components/overview/trust-footer.tsx +95 -0
- package/components/overview/usage-pulse-panel.tsx +173 -0
- package/components/pricing/model-alias-suggestions-table.tsx +118 -0
- package/components/pricing/model-rates-table.tsx +319 -0
- package/components/pricing/pricing-bulk-panel.tsx +46 -0
- package/components/pricing/pricing-context-card.tsx +70 -0
- package/components/pricing/pricing-workflow.ts +242 -0
- package/components/pricing/use-pricing-settings-controller.ts +237 -0
- package/components/pricing-settings.tsx +53 -339
- package/components/repair/repair-guidance.tsx +231 -0
- package/components/repair/repair-items-table.tsx +249 -0
- package/components/repair/repair-summary.tsx +45 -0
- package/components/repair-state-control.tsx +10 -0
- package/components/scan-now-button.tsx +9 -0
- package/components/session-explorer/filtering.ts +154 -0
- package/components/session-explorer.tsx +100 -139
- package/components/settings/custom-folders-section.tsx +55 -0
- package/components/settings/exports-section.tsx +30 -0
- package/components/settings/guardrails-section.tsx +142 -0
- package/components/settings/import-profiles-section.tsx +145 -0
- package/components/settings/lazy-settings-section.tsx +77 -0
- package/components/settings/package-trust-section.tsx +48 -0
- package/components/settings/scan-section.tsx +289 -0
- package/components/settings/section-nav.tsx +44 -0
- package/components/settings/storage-section.tsx +54 -0
- package/components/settings/types.ts +62 -0
- package/components/settings-panel.tsx +120 -680
- package/components/sidebar.tsx +74 -13
- package/components/ui/typography.tsx +1 -1
- package/dist/runtime/db-migrate.mjs +27 -0
- package/dist/runtime/db-seed.mjs +27 -0
- package/dist/runtime/digest.mjs +2255 -2034
- package/dist/runtime/doctor.mjs +2266 -2028
- package/dist/runtime/evidence.mjs +171 -116
- package/dist/runtime/insights.mjs +2217 -1996
- package/dist/runtime/pricing-refresh.mjs +737 -4
- package/dist/runtime/repair.mjs +281 -106
- package/dist/runtime/report.mjs +2255 -2034
- package/dist/runtime/reset.mjs +27 -0
- package/dist/runtime/review.mjs +2222 -2001
- package/dist/runtime/scan.mjs +1046 -290
- package/dist/runtime/status.mjs +34 -0
- package/next.config.mjs +13 -3
- package/package.json +3 -1
- package/scripts/browser-issue-guard.mjs +169 -0
- package/scripts/doctor.ts +5 -0
- package/scripts/smoke-cli/commands.mjs +115 -0
- package/scripts/smoke-cli/context.mjs +26 -0
- package/scripts/smoke-cli/processes.mjs +34 -0
- package/scripts/smoke-cli/runtime.mjs +36 -0
- package/scripts/smoke-cli/serve.mjs +77 -0
- package/scripts/smoke-cli.mjs +10 -255
- package/src/cli/commands.js +277 -0
- package/src/cli/context.js +58 -0
- package/src/cli/help.js +63 -0
- package/src/cli/runtime.js +142 -0
- package/src/cli/serve.js +177 -0
- package/src/db/client.ts +2 -0
- package/src/db/sqlite-functions.ts +32 -0
- package/src/ingestion/adapters/codex-cli.ts +46 -15
- package/src/ingestion/persist-guardrails.ts +63 -0
- package/src/ingestion/persist.ts +19 -2
- package/src/ingestion/scan-adapters.ts +39 -0
- package/src/ingestion/scan-files.ts +96 -0
- package/src/ingestion/scan-results.ts +120 -0
- package/src/ingestion/scan.ts +28 -191
- package/src/lib/analytics/entities.ts +349 -0
- package/src/lib/analytics/insights.ts +142 -0
- package/src/lib/analytics/repair.ts +193 -0
- package/src/lib/analytics/scan-trust.ts +198 -0
- package/src/lib/analytics/summary.ts +184 -0
- package/src/lib/analytics/trends.ts +36 -0
- package/src/lib/analytics-query-helpers.ts +134 -0
- package/src/lib/analytics-timing.ts +77 -0
- package/src/lib/analytics-types.ts +239 -0
- package/src/lib/analytics.ts +96 -1426
- package/src/lib/doctor-recommendations.ts +217 -0
- package/src/lib/doctor.ts +19 -228
- package/src/lib/evidence/mapping.ts +121 -0
- package/src/lib/evidence/metrics.ts +76 -0
- package/src/lib/evidence/query.ts +247 -0
- package/src/lib/evidence-trail.ts +22 -410
- package/src/lib/first-run-status.ts +24 -11
- package/src/lib/overview-data.ts +93 -0
- package/src/lib/pricing-refresh.ts +35 -0
- package/src/lib/pricing.ts +15 -10
- package/src/lib/repair-actions.ts +156 -0
- package/src/lib/repair-delta.ts +86 -0
- package/src/lib/scan-health-rules.ts +230 -0
- package/src/lib/scan-health.ts +36 -184
- package/src/lib/unknown-cost-repair/keys.ts +85 -0
- package/src/lib/unknown-cost-repair/reviews.ts +176 -0
- package/src/lib/unknown-cost-repair/suggestions.ts +95 -0
- package/src/lib/unknown-cost-repair/types.ts +78 -0
- package/src/lib/unknown-cost-repair/workbench.ts +250 -0
- package/src/lib/unknown-cost-repair.ts +52 -566
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,36 @@ All notable changes to TokenTrace are documented here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## [0.13.0] - 2026-05-20
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Overview now uses focused data assembly and smaller panel components, with quieter local development overlays.
|
|
12
|
+
- Overview trend aggregation now avoids SQLite localtime bucketing so large local databases load the first dashboard view much faster.
|
|
13
|
+
- Overview now uses a page-specific analytics profile to avoid computing secondary page insights during first load.
|
|
14
|
+
- Slow dashboard analytics queries now surface through internal timing guardrails and doctor output.
|
|
15
|
+
- CLI startup code is split into focused context, help, runtime, serve, and command modules while keeping the executable entrypoint thin.
|
|
16
|
+
- Analytics queries are split into summary, trends, entities, repair, scan-trust, and insight domains to reduce hotspot risk.
|
|
17
|
+
- Scan Health is split into focused diagnostics panels so the route stays limited to data assembly and composition.
|
|
18
|
+
- Session Explorer now has sticky dense-table headers, clearer active-filter chips, row-density controls, faster reset actions, and stronger empty states.
|
|
19
|
+
- Session Explorer filtering, summaries, high-cost thresholding, active-filter labels, and saved-view serialization now live in pure helper functions.
|
|
20
|
+
- Repair now highlights the top unknown-cost cause, next best repair, expected impact, and clearer resolved, ignored, and parser-review state copy backed by executable repair actions.
|
|
21
|
+
- Repair page data loading, summary cards, guidance, and repair queue table now live in focused modules so the route stays small.
|
|
22
|
+
- Model Rates now has clearer repair-context copy, edit validation, duplicate provider/model warnings, save-result feedback, and CSV import/export for bulk rate changes.
|
|
23
|
+
- Codex CLI ingestion now handles JSON-array session exports, warns on malformed local records, and persistence now reports empty, duplicate, or mismatched replacement imports before writing.
|
|
24
|
+
- Unknown-cost repair actions are split into a focused helper module for clearer repair causes, next actions, and resolved-state copy.
|
|
25
|
+
- Settings is split into focused scan, import profile, guardrail, package trust, export, storage, and custom-folder sections.
|
|
26
|
+
- Mobile navigation now uses a compact command menu plus priority shortcuts, and first-run setup now leads users through local folders, model rates, scan, Scan Health, and review without cloud or sample-data assumptions.
|
|
27
|
+
- Dashboard tables, page actions, and compact metric cards now behave better at narrow mobile widths.
|
|
28
|
+
- `tokentrace serve` now prints clearer startup progress, help examples, browser-open guidance, and fixed-port conflict recovery steps.
|
|
29
|
+
- CLI smoke checks are split into discovery, JSON/data, runtime watch, and dashboard serve modules so package smoke failures point to the broken surface.
|
|
30
|
+
- Route loading copy now reinforces that TokenTrace is reading local database records without sending telemetry.
|
|
31
|
+
- Repair and Model Rates now use mobile card layouts on narrow screens instead of forcing wide table workflows.
|
|
32
|
+
- Unknown-cost repair, scan ingestion, Evidence Trail, and Pricing Settings internals are split into smaller focused modules to reduce hotspot risk and make future repair work safer.
|
|
33
|
+
- Pricing saves, model-rate refreshes, and scans now report a repair delta showing unknown-cost before/after counts, resolved groups, and the top remaining blocked cause.
|
|
34
|
+
- Settings now defers dense package trust, guardrail, import profile, and export sections while preserving section anchors.
|
|
35
|
+
- Added `npm run browser:guard` to fail browser smoke runs on console errors, page errors, Next dev overlay issues, blank charts, and severe mobile overflow.
|
|
36
|
+
|
|
7
37
|
## [0.12.1] - 2026-05-19
|
|
8
38
|
|
|
9
39
|
### Fixed
|
package/app/api/prices/route.ts
CHANGED
|
@@ -62,6 +62,7 @@ export async function POST(request: Request) {
|
|
|
62
62
|
interactionsChecked: result.interactionsChecked,
|
|
63
63
|
unknownCostInteractions: result.unknownCostInteractions,
|
|
64
64
|
modelAliasesUpdated: result.modelsUpdated,
|
|
65
|
-
resolvedRepairItems: result.resolvedRepairItems
|
|
65
|
+
resolvedRepairItems: result.resolvedRepairItems,
|
|
66
|
+
repairDelta: result.repairDelta
|
|
66
67
|
});
|
|
67
68
|
}
|