cctally 1.103.0 → 1.105.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/README.md +6 -6
  3. package/bin/_cctally_alerts.py +104 -10
  4. package/bin/_cctally_cache.py +193 -71
  5. package/bin/_cctally_config.py +62 -2
  6. package/bin/_cctally_core.py +62 -1
  7. package/bin/_cctally_dashboard.py +694 -70
  8. package/bin/_cctally_dashboard_conversation.py +400 -6
  9. package/bin/_cctally_dashboard_envelope.py +336 -14
  10. package/bin/_cctally_dashboard_perf.py +93 -0
  11. package/bin/_cctally_dashboard_share.py +56 -25
  12. package/bin/_cctally_dashboard_sources.py +988 -94
  13. package/bin/_cctally_db.py +30 -3
  14. package/bin/_cctally_diagnosis_sources.py +699 -186
  15. package/bin/_cctally_doctor.py +77 -0
  16. package/bin/_cctally_forecast.py +932 -51
  17. package/bin/_cctally_journal.py +430 -24
  18. package/bin/_cctally_parser.py +66 -0
  19. package/bin/_cctally_project.py +535 -10
  20. package/bin/_cctally_quota.py +28 -0
  21. package/bin/_cctally_quota_calibration.py +146 -0
  22. package/bin/_cctally_quota_model.py +2142 -0
  23. package/bin/_cctally_record.py +204 -30
  24. package/bin/_cctally_share.py +16 -8
  25. package/bin/_cctally_statusline.py +34 -0
  26. package/bin/_cctally_tui.py +531 -115
  27. package/bin/_lib_codex_conversation_query.py +258 -12
  28. package/bin/_lib_codex_hooks.py +26 -0
  29. package/bin/_lib_conversation_query.py +145 -15
  30. package/bin/_lib_dashboard_json.py +105 -0
  31. package/bin/_lib_dashboard_settings_contract.py +2 -0
  32. package/bin/_lib_diagnosis.py +21 -2
  33. package/bin/_lib_doctor.py +215 -1
  34. package/bin/_lib_forecast.py +337 -43
  35. package/bin/_lib_ingest_frontier.py +889 -0
  36. package/bin/_lib_meter_rate_change.py +360 -0
  37. package/bin/_lib_perf.py +22 -0
  38. package/bin/_lib_pricing.py +30 -3
  39. package/bin/_lib_quota_calibration.py +311 -0
  40. package/bin/_lib_quota_copy.py +157 -0
  41. package/bin/_lib_quota_model.py +2520 -0
  42. package/bin/_lib_rate_change_delivery.py +119 -0
  43. package/bin/_lib_record.py +50 -0
  44. package/bin/_lib_rederive.py +10 -0
  45. package/bin/_lib_render.py +6 -0
  46. package/bin/_lib_retained_size.py +187 -0
  47. package/bin/_lib_share_templates.py +37 -5
  48. package/bin/_lib_snapshot_cache.py +504 -17
  49. package/bin/_lib_statusline.py +200 -2
  50. package/bin/_lib_tick_stats.py +28 -4
  51. package/bin/_lib_view_models.py +30 -12
  52. package/bin/cctally +32 -0
  53. package/dashboard/static/assets/ConversationsView-DA4j7Yso.js +72 -0
  54. package/dashboard/static/assets/DoctorModal-D4PbVnbE.js +1 -0
  55. package/dashboard/static/assets/ModalRoot-D4oSPxPp.js +1 -0
  56. package/dashboard/static/assets/ProjectsDrillPanel-DkPlB9JH.js +1 -0
  57. package/dashboard/static/assets/SourceDetailModal-BE7FONsS.js +1 -0
  58. package/dashboard/static/assets/UpdateModal-BJuI8glf.js +7 -0
  59. package/dashboard/static/assets/index-klO46NcU.css +1 -0
  60. package/dashboard/static/assets/index-w_bINkJ8.js +13 -0
  61. package/dashboard/static/assets/outlineNavigation-zDVm6Hdd.js +9 -0
  62. package/dashboard/static/assets/useKeymap-CJ-Pi17D.js +1 -0
  63. package/dashboard/static/dashboard.html +3 -2
  64. package/package.json +10 -1
  65. package/dashboard/static/assets/index-Di2hljvB.css +0 -1
  66. package/dashboard/static/assets/index-XYCIWjVG.js +0 -97
@@ -4545,7 +4545,8 @@ def _apply_cache_schema(conn: sqlite3.Connection) -> None:
4545
4545
  cache_rebuild_count INTEGER NOT NULL DEFAULT 0,
4546
4546
  git_branch TEXT,
4547
4547
  models_json TEXT,
4548
- title TEXT
4548
+ title TEXT,
4549
+ render_revision INTEGER NOT NULL DEFAULT 0
4549
4550
  );
4550
4551
  CREATE INDEX IF NOT EXISTS idx_conv_sessions_recent
4551
4552
  ON conversation_sessions(last_activity_utc DESC, session_id DESC);
@@ -4828,7 +4829,8 @@ def _apply_cache_schema(conn: sqlite3.Connection) -> None:
4828
4829
  project_key TEXT,
4829
4830
  project_label TEXT,
4830
4831
  models_json TEXT,
4831
- title TEXT
4832
+ title TEXT,
4833
+ render_revision INTEGER NOT NULL DEFAULT 0
4832
4834
  );
4833
4835
  CREATE INDEX IF NOT EXISTS idx_codex_conv_rollups_recent
4834
4836
  ON codex_conversation_rollups(last_activity_utc DESC, conversation_key DESC);
@@ -5041,6 +5043,15 @@ def _apply_cache_schema(conn: sqlite3.Connection) -> None:
5041
5043
  add_column_if_missing(conn, "conversation_sessions", "git_branch", "TEXT")
5042
5044
  add_column_if_missing(conn, "conversation_sessions", "models_json", "TEXT")
5043
5045
  add_column_if_missing(conn, "conversation_sessions", "title", "TEXT")
5046
+ # #682: one monotonic invalidation frontier per derived conversation.
5047
+ # Column additions remain in the idempotent schema path; the existing
5048
+ # rollup recompute chokepoints populate them on the first affected sync.
5049
+ add_column_if_missing(
5050
+ conn, "conversation_sessions", "render_revision",
5051
+ "INTEGER NOT NULL DEFAULT 0")
5052
+ add_column_if_missing(
5053
+ conn, "codex_conversation_rollups", "render_revision",
5054
+ "INTEGER NOT NULL DEFAULT 0")
5044
5055
  # #320: quota pool identity cannot depend on transcript events after the
5045
5056
  # store split. Stamp the active model directly on each compact physical
5046
5057
  # quota observation. Existing caches receive the nullable column here; 028
@@ -5722,6 +5733,20 @@ def _conv_007_codex_find_projection_v2_meta(conn: sqlite3.Connection) -> None:
5722
5733
  _release_cache_db_writer_flocks(held)
5723
5734
 
5724
5735
 
5736
+ @conversations_migration("008_conversation_render_revision")
5737
+ def _conv_008_conversation_render_revision(conn: sqlite3.Connection) -> None:
5738
+ """Add monotonic assembly-revision columns to existing transcript stores."""
5739
+ add_column_if_missing(
5740
+ conn, "conversation_sessions", "render_revision",
5741
+ "INTEGER NOT NULL DEFAULT 0",
5742
+ )
5743
+ add_column_if_missing(
5744
+ conn, "codex_conversation_rollups", "render_revision",
5745
+ "INTEGER NOT NULL DEFAULT 0",
5746
+ )
5747
+ conn.commit()
5748
+
5749
+
5725
5750
  # #177 S6: the consolidated multi-column external-content FTS5 table that
5726
5751
  # replaces the old conversation_fts(text) + conversation_fts_aux(search_aux)
5727
5752
  # pair. The three column names MUST match the conversation_messages columns BY
@@ -7471,7 +7496,9 @@ def _025_codex_conversation_normalization(conn: sqlite3.Connection) -> None:
7471
7496
  # remains as the replay source), then re-derive from it.
7472
7497
  _codex_conversation_fts_full_clear(conn)
7473
7498
  import _cctally_cache
7474
- _cctally_cache._replay_codex_normalization(conn)
7499
+ _cctally_cache._replay_codex_normalization(
7500
+ conn, advance_render_revision=False,
7501
+ )
7475
7502
  conn.commit()
7476
7503
  except Exception:
7477
7504
  conn.rollback()