tokencat 0.7.0__tar.gz → 0.7.2__tar.gz

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.
Files changed (54) hide show
  1. {tokencat-0.7.0/src/tokencat.egg-info → tokencat-0.7.2}/PKG-INFO +2 -1
  2. {tokencat-0.7.0 → tokencat-0.7.2}/README.md +1 -0
  3. {tokencat-0.7.0 → tokencat-0.7.2}/pyproject.toml +1 -1
  4. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/__init__.py +1 -1
  5. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/filters.py +11 -1
  6. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/pricing.py +1 -0
  7. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/pricing/catalog.json +4041 -2610
  8. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/antigravity.py +14 -3
  9. {tokencat-0.7.0 → tokencat-0.7.2/src/tokencat.egg-info}/PKG-INFO +2 -1
  10. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat.egg-info/SOURCES.txt +1 -0
  11. {tokencat-0.7.0 → tokencat-0.7.2}/tests/test_dashboard_pricing.py +26 -0
  12. tokencat-0.7.2/tests/test_filters.py +26 -0
  13. {tokencat-0.7.0 → tokencat-0.7.2}/tests/test_providers.py +28 -4
  14. {tokencat-0.7.0 → tokencat-0.7.2}/LICENSE +0 -0
  15. {tokencat-0.7.0 → tokencat-0.7.2}/setup.cfg +0 -0
  16. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/__main__.py +0 -0
  17. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/cli.py +0 -0
  18. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/__init__.py +0 -0
  19. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/aggregate.py +0 -0
  20. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/models.py +0 -0
  21. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/presentation.py +0 -0
  22. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/privacy.py +0 -0
  23. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/render.py +0 -0
  24. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/serialize.py +0 -0
  25. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/time.py +0 -0
  26. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/core/updates.py +0 -0
  27. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/__init__.py +0 -0
  28. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/candidates.py +0 -0
  29. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/client.py +0 -0
  30. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/discovery.py +0 -0
  31. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/identity.py +0 -0
  32. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/lan.py +0 -0
  33. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/process.py +0 -0
  34. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/protocol.py +0 -0
  35. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/server.py +0 -0
  36. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/snapshot.py +0 -0
  37. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/ssh.py +0 -0
  38. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/ssh_config.py +0 -0
  39. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/trust.py +0 -0
  40. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/node/tui.py +0 -0
  41. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/pricing/__init__.py +0 -0
  42. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/__init__.py +0 -0
  43. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/base.py +0 -0
  44. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/claude.py +0 -0
  45. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/codex.py +0 -0
  46. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/copilot.py +0 -0
  47. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/gemini.py +0 -0
  48. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat/providers/registry.py +0 -0
  49. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat.egg-info/dependency_links.txt +0 -0
  50. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat.egg-info/entry_points.txt +0 -0
  51. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat.egg-info/requires.txt +0 -0
  52. {tokencat-0.7.0 → tokencat-0.7.2}/src/tokencat.egg-info/top_level.txt +0 -0
  53. {tokencat-0.7.0 → tokencat-0.7.2}/tests/test_cli.py +0 -0
  54. {tokencat-0.7.0 → tokencat-0.7.2}/tests/test_node_workflows.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tokencat
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: Local-first, read-only AI coding agent token and usage inspector.
5
5
  Author: xiaoran
6
6
  License-Expression: GPL-3.0-only
@@ -281,6 +281,7 @@ TokenCat estimates API-equivalent cost when a model can be matched to known pric
281
281
  - If the refresh fails, it quietly falls back to the bundled catalog.
282
282
  - `tokencat pricing refresh` refreshes the local cache manually.
283
283
  - Resolution is source-aware: direct source pricing first, then official API pricing for the model family, then OpenRouter as the marketplace fallback.
284
+ - The internal `codex-auto-review` label is estimated using `gpt-5.4-mini` pricing because OpenAI does not publish a direct model mapping for that label.
284
285
  - JSON output includes `pricing_source` and `pricing_model` when a row is priced.
285
286
  - Unknown, renamed, redirected, or unattributed models remain visible with explicit pricing status.
286
287
 
@@ -242,6 +242,7 @@ TokenCat estimates API-equivalent cost when a model can be matched to known pric
242
242
  - If the refresh fails, it quietly falls back to the bundled catalog.
243
243
  - `tokencat pricing refresh` refreshes the local cache manually.
244
244
  - Resolution is source-aware: direct source pricing first, then official API pricing for the model family, then OpenRouter as the marketplace fallback.
245
+ - The internal `codex-auto-review` label is estimated using `gpt-5.4-mini` pricing because OpenAI does not publish a direct model mapping for that label.
245
246
  - JSON output includes `pricing_source` and `pricing_model` when a row is priced.
246
247
  - Unknown, renamed, redirected, or unattributed models remain visible with explicit pricing status.
247
248
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tokencat"
7
- version = "0.7.0"
7
+ version = "0.7.2"
8
8
  description = "Local-first, read-only AI coding agent token and usage inspector."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.7.0"
5
+ __version__ = "0.7.2"
@@ -17,12 +17,22 @@ def apply_filters(records: list[SessionRecord], filters: ScanFilters) -> list[Se
17
17
  continue
18
18
  filtered.append(projected)
19
19
 
20
- filtered.sort(key=lambda record: record.updated_at or record.started_at, reverse=True)
20
+ filtered.sort(key=_record_sort_key, reverse=True)
21
21
  if filters.limit is not None:
22
22
  return filtered[: filters.limit]
23
23
  return filtered
24
24
 
25
25
 
26
+ def _record_sort_key(record: SessionRecord) -> tuple[bool, float]:
27
+ timestamp = record.updated_at or record.started_at
28
+ if timestamp is None:
29
+ return False, 0.0
30
+ try:
31
+ return True, timestamp.timestamp()
32
+ except (OSError, OverflowError, ValueError):
33
+ return True, 0.0
34
+
35
+
26
36
  def _project_record_to_window(record: SessionRecord, since, until) -> SessionRecord | None:
27
37
  if since is None and until is None:
28
38
  return record
@@ -73,6 +73,7 @@ SOURCE_ALIASES: dict[str, PricingSourceName] = {
73
73
  "github_copilot": "github_copilot",
74
74
  }
75
75
  MODEL_ALIASES: dict[str, str] = {
76
+ "codex-auto-review": "gpt-5.4-mini",
76
77
  "gpt-5-codex": "gpt-5",
77
78
  "gpt-5.3-codex": "gpt-5.2-codex",
78
79
  }