cc-continuity 0.3.47__tar.gz → 0.3.48__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 (115) hide show
  1. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/PKG-INFO +1 -1
  2. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/README.md +1 -1
  3. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/__init__.py +1 -1
  4. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/doctor.py +31 -0
  5. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity.egg-info/PKG-INFO +1 -1
  6. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/pyproject.toml +1 -1
  7. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_doctor.py +60 -0
  8. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/LICENSE +0 -0
  9. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/__main__.py +0 -0
  10. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/atomic.py +0 -0
  11. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/blink.py +0 -0
  12. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/blink_watch.py +0 -0
  13. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/bootstrap.py +0 -0
  14. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/checkpoint.py +0 -0
  15. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/cli.py +0 -0
  16. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/config.py +0 -0
  17. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/daemon_supervisor.py +0 -0
  18. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/gitsnap.py +0 -0
  19. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/__init__.py +0 -0
  20. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/common.py +0 -0
  21. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/pre_compact.py +0 -0
  22. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/pre_tool_use.py +0 -0
  23. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/session_end.py +0 -0
  24. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/session_start.py +0 -0
  25. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/stop.py +0 -0
  26. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/task.py +0 -0
  27. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/tool_use.py +0 -0
  28. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hooks/user_prompt.py +0 -0
  29. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/hosting.py +0 -0
  30. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/install.py +0 -0
  31. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/launch.py +0 -0
  32. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/ledger.py +0 -0
  33. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/lock.py +0 -0
  34. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/managed.py +0 -0
  35. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/naming.py +0 -0
  36. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/notify.py +0 -0
  37. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/paths.py +0 -0
  38. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/power_plug.py +0 -0
  39. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/progress_pane.py +0 -0
  40. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/project.py +0 -0
  41. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/redact.py +0 -0
  42. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/rotator.py +0 -0
  43. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/settings_merge.py +0 -0
  44. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/skills.py +0 -0
  45. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/state.py +0 -0
  46. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/statusline.py +0 -0
  47. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/thresholds.py +0 -0
  48. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/transcript.py +0 -0
  49. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/validate.py +0 -0
  50. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/watchdog.py +0 -0
  51. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/watchdog_digest.py +0 -0
  52. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity/watchdogd.py +0 -0
  53. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity.egg-info/SOURCES.txt +0 -0
  54. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity.egg-info/dependency_links.txt +0 -0
  55. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity.egg-info/entry_points.txt +0 -0
  56. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/cc_continuity.egg-info/top_level.txt +0 -0
  57. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/setup.cfg +0 -0
  58. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_atomic.py +0 -0
  59. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_blink.py +0 -0
  60. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_blink_watch.py +0 -0
  61. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_bootstrap.py +0 -0
  62. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_changelog_notes.py +0 -0
  63. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_checkpoint.py +0 -0
  64. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_cli.py +0 -0
  65. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_cli_ledger.py +0 -0
  66. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_cli_log.py +0 -0
  67. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_config.py +0 -0
  68. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_daemon_supervisor.py +0 -0
  69. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_gitsnap.py +0 -0
  70. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_common.py +0 -0
  71. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_pre_compact.py +0 -0
  72. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_pre_tool_use.py +0 -0
  73. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_session_end.py +0 -0
  74. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_session_start.py +0 -0
  75. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_stop.py +0 -0
  76. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_task.py +0 -0
  77. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_tool_use.py +0 -0
  78. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hooks_user_prompt.py +0 -0
  79. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hosting.py +0 -0
  80. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_hygiene.py +0 -0
  81. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_install.py +0 -0
  82. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_integration_phase5.py +0 -0
  83. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_integration_phase6.py +0 -0
  84. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_integration_phase7.py +0 -0
  85. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_launch.py +0 -0
  86. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_ledger.py +0 -0
  87. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_lock.py +0 -0
  88. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_managed.py +0 -0
  89. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_naming.py +0 -0
  90. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_notify.py +0 -0
  91. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_notify_integration.py +0 -0
  92. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_paths.py +0 -0
  93. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_power_plug.py +0 -0
  94. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_progress_pane.py +0 -0
  95. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_project.py +0 -0
  96. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_readme_badges.py +0 -0
  97. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_redact.py +0 -0
  98. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_rotator.py +0 -0
  99. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_settings_merge.py +0 -0
  100. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_skills.py +0 -0
  101. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_state.py +0 -0
  102. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_status.py +0 -0
  103. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_statusline.py +0 -0
  104. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_thresholds.py +0 -0
  105. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_tmux_host.py +0 -0
  106. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_transcript.py +0 -0
  107. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_transcript_finalize.py +0 -0
  108. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_uninstall.py +0 -0
  109. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_validate.py +0 -0
  110. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_watchdog.py +0 -0
  111. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_watchdog_digest.py +0 -0
  112. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_watchdog_integration.py +0 -0
  113. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_watchdogd.py +0 -0
  114. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_wsl_doctor.py +0 -0
  115. {cc_continuity-0.3.47 → cc_continuity-0.3.48}/tests/test_wsl_install.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-continuity
3
- Version: 0.3.47
3
+ Version: 0.3.48
4
4
  Summary: Zero-touch session rotation for Claude Code (local large-context model)
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -41,11 +41,11 @@ The five most recent updates, newest first. Each line links to its
41
41
  commit, so you can see what changed lately without digging through the
42
42
  log:
43
43
 
44
+ - **2026-11-18**: The rotation gate can no longer invert silently. `doctor` gained a `config-sanity` check that verifies `0 < warn_ratio <= rotate_ratio <= hard_ratio < 1`, a plausible `window_tokens` (>= 32768) and an http(s) `notify_endpoint`, naming the offending values in its detail; a typo like warn 0.80 / rotate 0.75 used to make rotations fire late or never. The check is warn-only, the values stay the user's call ([commit](https://github.com/pqant/claude-continuity/commit/c7381cc)).
44
45
  - **2026-11-18**: The session chain went machine-readable: `cc-continuity history --json` prints it as one JSON array with stable keys (`nnn`, `name`, `session_id`, `created`, `state`). The state comes from each session's `state.json` with the same fallback the status rotation line uses, a project without a record prints `[]`, and the default human output is unchanged ([commit](https://github.com/pqant/claude-continuity/commit/180b761)).
45
46
  - **2026-11-17**: A second badges row landed under the title, this one for the package side: PyPI version and monthly-download counters, MIT license, live CI status, supported Python versions (backed by new PyPI classifiers in pyproject.toml) and a good-first-issues counter that opens the labeled contributor on-ramp ([commit](https://github.com/pqant/claude-continuity/commit/fb0ad8a)).
46
47
  - **2026-11-17**: The README now opens at a glance. A badges row sits under the title: live shields.io counters for forks, stars, open issues and the last commit (each links to the matching GitHub page), plus Code of conduct, Contributions and Security badges that lead straight into the community files ([commit](https://github.com/pqant/claude-continuity/commit/f642a4b)).
47
48
  - **2026-11-17**: Pasted images stopped cloning themselves in transcript exports. Claude Code writes one paste as two records: the base64 record plus an isMeta sibling carrying the same `[Image: source: ...]` lines. While the image cache was still on disk the sibling embedded the very same images, so the export opened a second User block repeating the whole gallery right next to the first. A sibling whose timestamp and image count both match the block before it is the same paste and is now folded away; a genuine second paste carries its own timestamp and still gets its own gallery ([commit](https://github.com/pqant/claude-continuity/commit/55b1c1c)).
48
- - **2026-11-17**: Debugging the logs got a front door: `cc-continuity log blink` and `cc-continuity log errors` tail the root log files read-only (newest last, default 20 lines, `--lines N`, `--follow` keeps streaming), with UTC stamps rendered in your local time; blink's already-local stamps and traceback continuation lines stay byte-identical so nothing shifts twice ([commit](https://github.com/pqant/claude-continuity/commit/1ce3269)).
49
49
 
50
50
  ## How it works
51
51
 
@@ -4,4 +4,4 @@ Spec: docs/PRD.md (v1.0). Platform facts verified in docs/VERIFICATION.md.
4
4
  Standard library only at runtime; pytest is dev-only.
5
5
  """
6
6
 
7
- __version__ = "0.3.47"
7
+ __version__ = "0.3.48"
@@ -137,6 +137,37 @@ def run_doctor(home: Path, runner=subprocess.run,
137
137
  isinstance(cfg.get("window_tokens"), int)
138
138
  add("config", cfg_ok, str(cfg_path))
139
139
 
140
+ # 6a: config-sanity (issue #36): the rotation gate order plus window
141
+ # and endpoint plausibility. Warn-only — the values are the user's
142
+ # call, but an inverted gate must not pass silently.
143
+ from . import config # local: doctor stays import-light
144
+ problems = []
145
+ ratios = {}
146
+ for k in ("warn_ratio", "rotate_ratio", "hard_ratio"):
147
+ v = (cfg or {}).get(k, config.DEFAULTS[k])
148
+ if isinstance(v, bool) or not isinstance(v, (int, float)):
149
+ problems.append(f"{k}={v!r} (number expected)")
150
+ v = None
151
+ ratios[k] = v
152
+ if all(v is not None for v in ratios.values()):
153
+ if not (0 < ratios["warn_ratio"] <= ratios["rotate_ratio"]
154
+ <= ratios["hard_ratio"] < 1):
155
+ problems.append(
156
+ "gate order broken: " + " ".join(
157
+ f"{k}={ratios[k]}" for k in
158
+ ("warn_ratio", "rotate_ratio", "hard_ratio")))
159
+ win = (cfg or {}).get("window_tokens", config.DEFAULTS["window_tokens"])
160
+ if isinstance(win, bool) or not isinstance(win, int) or win < 32768:
161
+ problems.append(f"window_tokens={win} (>= 32768 expected)")
162
+ ep = (cfg or {}).get("notify_endpoint",
163
+ config.DEFAULTS["notify_endpoint"])
164
+ if ep and not str(ep).startswith(("http://", "https://")):
165
+ problems.append(f"notify_endpoint={ep} (http(s) scheme expected)")
166
+ add("config-sanity", True,
167
+ "; ".join(problems) if problems else
168
+ "gate order, window and endpoint plausible",
169
+ warning=bool(problems))
170
+
140
171
  # 6b: curl (P9-P11 — notify needs it; install refuses without it)
141
172
  curl = which("curl")
142
173
  add("curl", curl is not None, curl or "not on PATH")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-continuity
3
- Version: 0.3.47
3
+ Version: 0.3.48
4
4
  Summary: Zero-touch session rotation for Claude Code (local large-context model)
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cc-continuity"
7
- version = "0.3.47"
7
+ version = "0.3.48"
8
8
  description = "Zero-touch session rotation for Claude Code (local large-context model)"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -134,6 +134,66 @@ def test_rotation_env_warns_when_env_missing(fake_home):
134
134
  assert c.ok and c.warning
135
135
 
136
136
 
137
+ def _set_cfg(home, **kv):
138
+ cfg_path = home / ".claude-continuity" / "config.json"
139
+ cfg = json.loads(cfg_path.read_text(encoding="utf-8"))
140
+ cfg.update(kv)
141
+ cfg_path.write_text(json.dumps(cfg), encoding="utf-8")
142
+
143
+
144
+ # config-sanity (issue #36): the gate order warn <= rotate <= hard and the
145
+ # window/endpoint plausibility are warn-only - the values are the user's
146
+ # call, but an inverted gate must not pass silently.
147
+
148
+
149
+ def test_config_sanity_all_green_on_defaults(fake_home):
150
+ h = fake_home
151
+ install.install(h, window=262144, runner=FakeRun())
152
+ checks = doctor.run_doctor(h, runner=FakeRun(), which=_which_ok)
153
+ c = next(x for x in checks if x.name == "config-sanity")
154
+ assert c.ok and not c.warning
155
+
156
+
157
+ def test_config_sanity_warns_on_inverted_thresholds(fake_home):
158
+ # the trial typo shape: warn above rotate fires rotations late or never
159
+ h = fake_home
160
+ install.install(h, window=262144, runner=FakeRun())
161
+ _set_cfg(h, warn_ratio=0.80, rotate_ratio=0.75, hard_ratio=0.85)
162
+ checks = doctor.run_doctor(h, runner=FakeRun(), which=_which_ok)
163
+ c = next(x for x in checks if x.name == "config-sanity")
164
+ assert c.ok and c.warning # warn-only: the values are the user's call
165
+ assert "warn_ratio=0.8" in c.detail and "rotate_ratio=0.75" in c.detail
166
+
167
+
168
+ def test_config_sanity_accepts_equal_thresholds(fake_home):
169
+ h = fake_home
170
+ install.install(h, window=262144, runner=FakeRun())
171
+ _set_cfg(h, warn_ratio=0.75, rotate_ratio=0.75, hard_ratio=0.75)
172
+ checks = doctor.run_doctor(h, runner=FakeRun(), which=_which_ok)
173
+ c = next(x for x in checks if x.name == "config-sanity")
174
+ assert c.ok and not c.warning
175
+
176
+
177
+ def test_config_sanity_warns_on_implausible_window(fake_home):
178
+ h = fake_home
179
+ install.install(h, window=262144, runner=FakeRun())
180
+ _set_cfg(h, window_tokens=4096)
181
+ checks = doctor.run_doctor(h, runner=FakeRun(), which=_which_ok)
182
+ c = next(x for x in checks if x.name == "config-sanity")
183
+ assert c.ok and c.warning
184
+ assert "window_tokens=4096" in c.detail
185
+
186
+
187
+ def test_config_sanity_warns_on_bad_endpoint_scheme(fake_home):
188
+ h = fake_home
189
+ install.install(h, window=262144, runner=FakeRun())
190
+ _set_cfg(h, notify_enabled=False, notify_endpoint="ftp://example/x")
191
+ checks = doctor.run_doctor(h, runner=FakeRun(), which=_which_ok)
192
+ c = next(x for x in checks if x.name == "config-sanity")
193
+ assert c.ok and c.warning
194
+ assert "notify_endpoint" in c.detail
195
+
196
+
137
197
  def test_stale_lock_warns(fake_home, cc_home):
138
198
  h = fake_home
139
199
  install.install(h, window=262144, runner=FakeRun())
File without changes
File without changes