code-context-control 2.161.0__py3-none-any.whl → 2.163.0__py3-none-any.whl

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.
cli/c3.py CHANGED
@@ -96,7 +96,7 @@ console = Console() if HAS_RICH else None
96
96
  # Config
97
97
  CONFIG_DIR = ".c3"
98
98
  CONFIG_FILE = ".c3/config.json"
99
- __version__ = "2.161.0"
99
+ __version__ = "2.163.0"
100
100
 
101
101
  # The PreToolUse matcher for native subagent calls (installer and hub migration).
102
102
  AGENT_MATCHER = "Agent|Task"
@@ -1050,8 +1050,15 @@ def _parse_cli_ide_arg(value: str) -> str:
1050
1050
  return normalized
1051
1051
 
1052
1052
 
1053
- def _do_init(project_path: str, ide_name: str = None, no_embed: bool = False):
1054
- """Run the core init steps (shared by new install and re-init after clear/reset)."""
1053
+ def _do_init(project_path: str, ide_name: str = None, no_embed: bool = False,
1054
+ rebuild_index: bool = True):
1055
+ """Run the core init steps (shared by new install and re-init after clear/reset).
1056
+
1057
+ ``rebuild_index=False`` re-checks the stored code index file by file instead of
1058
+ rebuilding it, but only when the project was last set up by this C3 version;
1059
+ after an upgrade the chunker may have changed, so it rebuilds anyway.
1060
+ """
1061
+ prior_version = (load_config(project_path) or {}).get("version")
1055
1062
  config = _build_init_config(project_path)
1056
1063
  save_config(config, project_path)
1057
1064
 
@@ -1066,13 +1073,24 @@ def _do_init(project_path: str, ide_name: str = None, no_embed: bool = False):
1066
1073
  _prog = ProgressLine()
1067
1074
  _t0 = _t.perf_counter()
1068
1075
  indexer = CodeIndex(project_path)
1069
- result = indexer.build_index(
1070
- on_progress=lambda entries, files, chunks: _prog.update(
1071
- f" scanning: {entries:,} entries | {files:,} files | {chunks:,} chunks"))
1076
+
1077
+ def _on_scan(entries, files, chunks):
1078
+ _prog.update(f" scanning: {entries:,} entries | {files:,} files | {chunks:,} chunks")
1079
+
1080
+ if not rebuild_index and prior_version == __version__:
1081
+ result = indexer.refresh(on_progress=_on_scan)
1082
+ else:
1083
+ result = indexer.build_index(on_progress=_on_scan)
1072
1084
  _prog.done()
1073
- entries = result.get("entries_scanned", 0)
1074
- print(f" Indexed {result['files_indexed']} files, {result['chunks_created']} chunks "
1075
- f"in {_t.perf_counter() - _t0:.1f}s ({entries:,} entries scanned)")
1085
+ if result.get("mode") == "incremental":
1086
+ updated = result["files_changed"] + result["files_added"]
1087
+ print(f" Index current: {result['files_indexed']} files, {result['chunks_total']} chunks; "
1088
+ f"{updated} updated, {result['files_removed']} removed "
1089
+ f"in {_t.perf_counter() - _t0:.1f}s (--rebuild-index for a full rebuild)")
1090
+ else:
1091
+ entries = result.get("entries_scanned", 0)
1092
+ print(f" Indexed {result['files_indexed']} files, {result['chunks_created']} chunks "
1093
+ f"in {_t.perf_counter() - _t0:.1f}s ({entries:,} entries scanned)")
1076
1094
  capped = result.get("files_capped", 0)
1077
1095
  if capped:
1078
1096
  total = result["files_indexed"] + capped
@@ -1387,7 +1405,8 @@ def cmd_init(args):
1387
1405
  # ── Non-interactive (--force) ──────────────────────────────
1388
1406
  if getattr(args, "force", False):
1389
1407
  print("\n[--force] Applying update...")
1390
- _do_init(project_path, ide_name=requested_ide, no_embed=no_embed)
1408
+ _do_init(project_path, ide_name=requested_ide, no_embed=no_embed,
1409
+ rebuild_index=bool(getattr(args, "rebuild_index", False)))
1391
1410
  if git_requested:
1392
1411
  _init_local_git_repo(project_path)
1393
1412
  _run_install_mcp(project_path, requested_ide, mcp_mode=getattr(args, "mcp_mode", "direct"), banner="Updating MCP tools...")
cli/commands/parser.py CHANGED
@@ -29,6 +29,7 @@ def build_parser(version: str, parse_cli_ide_arg):
29
29
  p_init.add_argument("--mcp-mode", choices=["direct", "proxy"], default="direct", help="Default MCP mode if install is selected during init (default: direct)")
30
30
  p_init.add_argument("--git", action="store_true", help="Initialize a local Git repository during init/update")
31
31
  p_init.add_argument("--no-embed", action="store_true", help="Skip building the semantic embedding index during init")
32
+ p_init.add_argument("--rebuild-index", action="store_true", help="With --force, rebuild the code index from scratch instead of re-checking it file by file")
32
33
  p_init.add_argument("--permissions", choices=["read-only", "c3-strict", "standard", "permissive"], default=None, help="Apply Claude Code permission tier (Claude Code only, used with --force)")
33
34
  p_init.add_argument("--enforcement", choices=["strict", "advisory", "off"], default=None, help="Tool-discipline mode. Omit to derive from --permissions (standard->advisory, permissive->off, strict/read-only->strict)")
34
35
  p_init.add_argument("--include-mcp-wildcard", action="store_true", help="Add mcp__* wildcard so non-C3 MCP servers don't prompt per-call")
cli/guide/ci.html CHANGED
@@ -161,23 +161,23 @@ c3 ci inspect --json</code></pre>
161
161
 
162
162
  <p>A real <code>c3 ci inspect</code> against this repository, from Windows:</p>
163
163
  <pre><code>Workflows in . (host Windows):
164
- CI [pull_request, push, workflow_dispatch] jobs=4
165
- Release [push, workflow_dispatch] jobs=4
164
+ CI [pull_request, push, workflow_dispatch] jobs=2
165
+ Release [push, workflow_dispatch] jobs=2
166
166
 
167
167
  Job graph (dependency order):
168
- CI::lint runnable (container)
168
+ CI::checks runnable (container)
169
169
  CI::test (macos-latest, 3.12) other-OS (macos-latest)
170
+ CI::test (ubuntu-latest, 3.10) runnable (container)
170
171
  CI::test (ubuntu-latest, 3.12) runnable (container)
171
172
  CI::test (windows-latest, 3.12) runnable here
172
- CI::build runnable (container) needs=lint,jsx,test
173
- Release::verify-ci UNSUPPORTED
174
- Release::publish-pypi runnable (container) needs=build
173
+ Release::build UNSUPPORTED
174
+ Release::publish runnable (container) needs=build
175
175
 
176
- Runnable here: 12 of 16 (3 native, 9 container)
176
+ Runnable here: 5 of 7 (1 native, 4 container)
177
177
  engines: native + act (act version 0.2.89)
178
178
  other-OS (3): these target a runner no available engine can reproduce. …
179
179
  unsupported (1):
180
- Release::verify-ci: step 1 env GH_TOKEN has unresolved expression(s): github.token</code></pre>
180
+ Release::build: step 1 env GH_TOKEN has unresolved expression(s): github.token</code></pre>
181
181
  <p>That last line is the point: an unresolved <code>${{ secrets.X }}</code> or <code>github.token</code> blocks rather than silently becoming an empty string, because a job that quietly passes locally on a blank secret and fails in real CI is worse than a job that refuses.</p>
182
182
  </section>
183
183
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-context-control
3
- Version: 2.161.0
3
+ Version: 2.163.0
4
4
  Summary: Local MCP code-intelligence for AI coding tools: surgical search/read/edit, agent-config version history, path-level access + masking guards, and a multi-project hub.
5
5
  Author-email: Dimitri Tselenchuk <dtselenc@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -130,6 +130,7 @@ Or `pip install "code-context-control[tui]"` for the optional Textual UI.
130
130
  ```bash
131
131
  c3 init /path/to/project --force --ide claude --mcp-mode direct --permissions standard
132
132
  c3 init /path/to/huge-repo --force --no-embed # skip the embedding index on large repos
133
+ c3 init /path/to/project --force --rebuild-index # re-index from scratch (default re-checks files and reuses the index)
133
134
  ```
134
135
 
135
136
  Upgrade with `c3 upgrade` (or `pipx upgrade code-context-control`). MCP is wired through the `c3-mcp` entry point, so upgrading needs no per-project reconfiguration.
@@ -1,7 +1,7 @@
1
1
  cli/__init__.py,sha256=ec66drCZGNMRU4V6ov0zVhYZph1us12Vn8OvG_LJyRY,22
2
2
  cli/_hook_utils.py,sha256=tzpdF413jakQKMbTru_GdHxQXxLLQKiZzVkTm4Fo_eU,23258
3
3
  cli/_shell_writes.py,sha256=iBbzK0v0d29rhrYgF3zKJIJbb1WSZhQjD_6w8-nOUec,7348
4
- cli/c3.py,sha256=756qSx3772RsjgPOuhRLnDcQGLM3L1zZDp6JT_sQuTg,439974
4
+ cli/c3.py,sha256=RibfGcmUvnBSFFFBp89y78JUBBaBFjNxV1ym7WpBtdo,440934
5
5
  cli/docs.html,sha256=pPxcP5ieY0DcfEDvegwIcRxbz1woLZoKLVSF-4JVy0Q,146784
6
6
  cli/edits.html,sha256=UjAhoCmBmQ89cklGvJqzC6eyNP2tc8H6T-e01DVkLvE,43418
7
7
  cli/hook_access_guard.py,sha256=4UF2YHp5_vISH7Gvolc_Bz3ppSye2lGpGx38egRLj1g,32116
@@ -34,10 +34,10 @@ cli/ui_legacy.html,sha256=cI8tC6RKmE2NIJOcsu7CY-zT4VznjcbD6NTjxb_fvUY,378460
34
34
  cli/ui_nano.html,sha256=UAwQ6bbTOXAoGq191AZ7slhngR9edJSa3IhqpynveDg,27740
35
35
  cli/commands/__init__.py,sha256=0Z8MABNzwSFJGT4Xv9R5AJVR8XxraTsuVTz5b0bShmo,38
36
36
  cli/commands/common.py,sha256=X5sjog7O274vmmVOMe3pO2QzbBOdhp-nWKSj7wqi8SA,14411
37
- cli/commands/parser.py,sha256=T_C2WY_yu84PUzm8CcAm1fmj6-XlfoRP8cL4lXUpaeU,73611
37
+ cli/commands/parser.py,sha256=tBJPvAcsP50VsXysBLeBtUoUTwc3PNFOyK1rgR85YFI,73772
38
38
  cli/guide/access.html,sha256=54KbBEZhr3ef_UbWPZzK6Ad91w_47qsMdx6rDmvF8DQ,47279
39
39
  cli/guide/bitbucket.html,sha256=lDm94czbl2iiAMmJ4gLxXB9m5As-8Dy5Q7b39jR_eKI,37012
40
- cli/guide/ci.html,sha256=ms3K49vfBZeerW_09NrlL82lKgWSEyFmNtG4BpD_jq8,37465
40
+ cli/guide/ci.html,sha256=-N1RZPyeJv4GyQ55rlIUT__trqpUCS_W--USdAs7Vbk,37438
41
41
  cli/guide/credentials.html,sha256=zC3jLZcVieiKNxKPN7gqXhfE8KuoRlXoMjmvMLCYTlM,66385
42
42
  cli/guide/delegate.html,sha256=sS96lGojyAZ296rQBaq0liAV01KeaYOImGSlaPTRl1g,47601
43
43
  cli/guide/getting-started.html,sha256=lELRulCRHuU0So9rKn6rGYGYvCgDqka-lexM3xV1a3E,29529
@@ -135,7 +135,7 @@ cli/ui/components/sessions.js,sha256=FIKtil76B8tCkAmcFV7hlj6GQ_DCJK2jCzvEmdK7NBE
135
135
  cli/ui/components/settings.js,sha256=FXcn-UQE2mXC6HFsLeEas-wAUFKt0OJaLySroZQMhGA,84095
136
136
  cli/ui/components/sidebar.js,sha256=K2ym2kUgpbyG-EBA_wBIIiqQY8qTatsiBZwzseMWuIQ,9939
137
137
  cli/ui/components/tasks.js,sha256=vyKQ3uwoppMwvdEaHlhWXW4oWcAisx4NveqzMhsYqHo,38438
138
- code_context_control-2.161.0.dist-info/licenses/LICENSE,sha256=l8Kh5QCNWNvR6kIt8L0BUZvc2LAFiHv2c-FnsGnUZf4,11301
138
+ code_context_control-2.163.0.dist-info/licenses/LICENSE,sha256=l8Kh5QCNWNvR6kIt8L0BUZvc2LAFiHv2c-FnsGnUZf4,11301
139
139
  core/__init__.py,sha256=qiheEC2r3KCd3vscukDVkjCXFcadzGgNhDhs9PbLVPA,2835
140
140
  core/blas_threads.py,sha256=Do7pR9YdumshhOmP6TV5oAv65i3gN7Lvt93b5EAO1bo,1256
141
141
  core/codex_patch.py,sha256=CxvT_rQIwPNTRJZj9EHJmx0ZdOeSLxjiixuLI3Z7lPc,2107
@@ -148,7 +148,7 @@ core/mcp_stack.py,sha256=ZCiCNKtN-IHFhwyRWz1djFFV1a3vbKBKB6Aefz1HvCo,4462
148
148
  core/mcp_toml.py,sha256=VNZCjJsr4II_jX3cmjYzDh_OQ7Nk34mLnkg528Tl1GM,7047
149
149
  core/web_security.py,sha256=HwgK5aBATfvRIeO_4gWgzK77gKwGuzVlmiuNGm4gGxI,7884
150
150
  oracle/__init__.py,sha256=-OTD7Jh4mUMA4QgPGthPLWXttgZLpkIPhGQ87ZfHBx0,63
151
- oracle/config.py,sha256=MTS1Meyo0ze3hOfrUlDPgb7l0vGwLO5AhGg2H_FP7gs,8047
151
+ oracle/config.py,sha256=Nid-0SJdm2p8ng0zL_Yu59i_QXUIIDRQUBdBKd0eju0,8244
152
152
  oracle/listeners.py,sha256=lV59aFuMddq-H8l8328NmDyfI79LaB-rcFyrv5cFmog,8054
153
153
  oracle/mcp_oracle.py,sha256=wIyVg-A3_Neu45QgIdnywSX8Bm0VIsKYIPmYp63NcuY,10000
154
154
  oracle/oracle_server.py,sha256=NRzIN1V6eQ4jA88ewfWNoaaz5XQvOjNgGo1WywE2_ZU,54556
@@ -169,8 +169,8 @@ oracle/services/insight_engine.py,sha256=lwcdXtjt3CSZLqHVpXx6SG5gDhZYUKwXt4Z8dGy
169
169
  oracle/services/local_session.py,sha256=nkawOjDbotUp5wtZQnC1wPDw3HopNYMkoYqWpP5ToCU,9227
170
170
  oracle/services/memory_reader.py,sha256=rSEmoIXQu2JkolHJIQWpn0piPJpyuf1KZvW_9liQwkU,3727
171
171
  oracle/services/memory_writer.py,sha256=hpvYsxjhl293jEjGcRKfjG5njUaAOXKqbmJaUu1WdUU,6997
172
- oracle/services/mobile_api.py,sha256=SNcu0o_J0ym0H7lyTVccJBD7TTiSqzM7kFSFyucZ8eQ,153291
173
- oracle/services/mobile_fleet.py,sha256=1M6vN4vOlYdVt1qFDSK97PLPHjvZkus4ZZSRm-ow2Nc,23968
172
+ oracle/services/mobile_api.py,sha256=1qNMI7RdiSaWStuMWOlutTdWoMzOWlm9EpJORcT40VU,153356
173
+ oracle/services/mobile_fleet.py,sha256=mZ49lojGKOVMiWVdTaFcEV3a_CvjqhwJWFMDa9m9R0k,26165
174
174
  oracle/services/project_scanner.py,sha256=PkYJtwOLRME1EzwRy3GIkYk6Xw0u1_BzFcaMJ5gJ1_s,6118
175
175
  oracle/services/review_agent.py,sha256=m_fzoHowpiibf0_iz3dF72LWSrwB_FbDd1am-SbeWXg,11273
176
176
  oracle/services/schedule_api.py,sha256=6NgmSYf2h4RSwqChuKvceWvRq3jC_ACdBKcZGi9-Wqs,12798
@@ -298,7 +298,7 @@ services/read_stamps.py,sha256=CTAy350FJ079-mDBXFZXU5OXhUdPobGnYelkC28W65Q,10654
298
298
  services/repo_map.py,sha256=o-Z3c7ZqIxRKPyqquGafTngdooe1n-yRIcqpmOz5i2M,23208
299
299
  services/repo_shape.py,sha256=QF0mXkY-bnBU8Q8mc5iimw2YBhMgZ4IYhoPc09Z8OBQ,4978
300
300
  services/reranker.py,sha256=pnyNSzM7gXQ3ZodjY3rGIRCwpD2OIjookYkAJXb_LVE,4694
301
- services/retention.py,sha256=9EtXE4IRzM6eX6gN-QyWFQFQQviyplLuybMXzbtrIV0,21290
301
+ services/retention.py,sha256=mXBa3aEVu41HqsBSW3NUH5BpMb4-YHoZwgOhoqM8Z-g,21441
302
302
  services/retrieval.py,sha256=ADESdXRWA66n2-6iLVdGZHIyseqQwcfpnX172iow0n8,2143
303
303
  services/retrieval_broker.py,sha256=9X67VZ_6AkbAzopHuuMFKmP4CGZLnW576kjSKMenBnw,5261
304
304
  services/router.py,sha256=Cz10nx2fKTbaGn14mSBePWIDrw5rdcs_1JFYXeik084,15626
@@ -354,8 +354,8 @@ tui/screens/search_view.py,sha256=MMHjVdlk3HZSuDBSvq8IGrqv_Mh5Us6YqXQ80bcWSMk,19
354
354
  tui/screens/session_view.py,sha256=eZ1eDwHTvPOck1wCCviixtOaCxIkBT_95ytNNNriGNA,5991
355
355
  tui/screens/stats.py,sha256=p81PjzdaIv7hllb8f45-rlVe4lJZwSdIMqu7e86_u5s,6223
356
356
  tui/screens/ui_view.py,sha256=1QJCgLh2YfgWIpvzRG1KOGXYEaOYX6ojN61Azjf2oX0,2125
357
- code_context_control-2.161.0.dist-info/METADATA,sha256=RYTXEHC7XZbgWpo422zZ7iZ5VmXrzDOdRAoKSmZR688,29355
358
- code_context_control-2.161.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
359
- code_context_control-2.161.0.dist-info/entry_points.txt,sha256=7kX_WUsDCF2hbXzvbNyscyaBb9AeA-DJY5v_5hN0DlU,93
360
- code_context_control-2.161.0.dist-info/top_level.txt,sha256=wRt41zBybVF3qAiNXHz9BURbkKvUvfhmWWtKMhaw6eE,29
361
- code_context_control-2.161.0.dist-info/RECORD,,
357
+ code_context_control-2.163.0.dist-info/METADATA,sha256=H1u3YADW4tESb8-v13FxtFTEjyb64HhNE7MSBKkkX5k,29476
358
+ code_context_control-2.163.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
359
+ code_context_control-2.163.0.dist-info/entry_points.txt,sha256=7kX_WUsDCF2hbXzvbNyscyaBb9AeA-DJY5v_5hN0DlU,93
360
+ code_context_control-2.163.0.dist-info/top_level.txt,sha256=wRt41zBybVF3qAiNXHz9BURbkKvUvfhmWWtKMhaw6eE,29
361
+ code_context_control-2.163.0.dist-info/RECORD,,
oracle/config.py CHANGED
@@ -94,6 +94,9 @@ DEFAULTS = {
94
94
  "mobile_sessions_enabled": True,
95
95
  "mobile_sessions_write": True,
96
96
  "mobile_sessions_transcripts": False,
97
+ # Start a Remote Control session (`claude --remote-control`) in a registered
98
+ # project: opens a terminal on this PC, so it is opt-in (docs/sessions.md).
99
+ "mobile_sessions_start": False,
97
100
  "auto_open_browser": True,
98
101
  "theme": "dark",
99
102
  "ui_last_tab": "chat", # persisted UI preference (hub parity)
@@ -117,7 +117,7 @@ CAPABILITIES = [
117
117
  "locks_overview", "access_overview", "enforcement_overview",
118
118
  "enforcement_clear", "override_policy_overview", "override_policy_clear",
119
119
  "builtin", "builtin_tighten",
120
- "sessions", "sessions_write",
120
+ "sessions", "sessions_write", "sessions_start",
121
121
  "now",
122
122
  ]
123
123
 
@@ -154,6 +154,7 @@ _CAPABILITY_SWITCHES = {
154
154
  "builtin_tighten": "mobile_builtin_tighten",
155
155
  "sessions": "mobile_sessions_enabled",
156
156
  "sessions_write": "mobile_sessions_write",
157
+ "sessions_start": "mobile_sessions_start",
157
158
  }
158
159
 
159
160
  FEED_TYPES = ("notification", "activity", "edit", "session_stat")
@@ -34,6 +34,7 @@ Imported for its side effect (route registration) at the bottom of
34
34
 
35
35
  from __future__ import annotations
36
36
 
37
+ import re
37
38
  from pathlib import Path
38
39
 
39
40
  from flask import jsonify, request
@@ -45,6 +46,10 @@ bp = m.bp
45
46
  #: Row fields that are verbatim transcript text.
46
47
  _TRANSCRIPT_FIELDS = ("first_prompt", "last_prompt")
47
48
  _STALE_FILTERS = {"hide", "only", "likely", "all"}
49
+ #: A Remote Control session name: shown in claude.ai/code and the Claude app.
50
+ #: Letters, digits, space and ``._-`` only, so nothing from the request is ever
51
+ #: shell syntax; the name also rides in argv, never through a shell.
52
+ _RC_NAME_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,59}$")
48
53
  _RESUME_ELSEWHERE = ("resume opens a terminal on the PC - use C3 Desk or the "
49
54
  "Hub there")
50
55
 
@@ -550,6 +555,44 @@ def mobile_sessions_mark():
550
555
  return jsonify(res)
551
556
 
552
557
 
558
+ @bp.route("/sessions/start", methods=["POST"])
559
+ def mobile_sessions_start():
560
+ """Open a terminal on this PC running ``claude --remote-control`` in a project.
561
+
562
+ Body: ``{project, name?}``. The project must be registered. The command is
563
+ fixed: only the validated name reaches argv (as one element, no shell), and
564
+ the working directory is the registered project path. The new session shows
565
+ up in the Claude app / claude.ai/code under the name given (default: the
566
+ project name). Off unless ``mobile_sessions_start`` is on.
567
+ """
568
+ gate = (m._feature_or_404("sessions") or m._feature_or_404("sessions_write")
569
+ or m._feature_or_404("sessions_start"))
570
+ if gate:
571
+ return gate
572
+ data = request.get_json(silent=True) or {}
573
+ resolved, err = m._project_or_404(str(data.get("project") or ""))
574
+ if err:
575
+ return err
576
+ name = str(data.get("name") or "").strip()
577
+ if name and not _RC_NAME_RE.match(name):
578
+ return jsonify({"error": "name must be 1-60 characters: letters, digits, "
579
+ "space, dot, dash or underscore"}), 400
580
+ if not name:
581
+ # The default comes from the project's own name, which may hold
582
+ # characters the pattern refuses: replace them rather than fail.
583
+ name = re.sub(r"[^A-Za-z0-9 ._-]+", "-", _name_for(resolved)).strip(" .-_")[:60]
584
+ name = name if _RC_NAME_RE.match(name) else "c3-session"
585
+ argv = ["claude", "--remote-control", name]
586
+ from services import terminal_launch
587
+ try:
588
+ terminal_launch.spawn_terminal(str(resolved), argv)
589
+ except Exception as exc:
590
+ return jsonify({"error": f"could not open a terminal on the PC: {exc}"}), 500
591
+ m._gw_audit("mobile.sessions.start", {"name": name})
592
+ return jsonify({"launched": True, "name": name,
593
+ "project": {"name": _name_for(resolved), "path": str(resolved)}})
594
+
595
+
553
596
  # ── Now ───────────────────────────────────────────────────
554
597
 
555
598
  @bp.route("/now", methods=["GET"])
services/retention.py CHANGED
@@ -426,7 +426,9 @@ class RetentionManager:
426
426
  age = time.time() - stamp.stat().st_mtime
427
427
  except OSError:
428
428
  age = None
429
- if age is not None and 0 <= age < interval:
429
+ # NTFS can stamp an mtime a few ms past time.time(); a stamp
430
+ # further in the future than that is a clock change, so sweep.
431
+ if age is not None and -2.0 <= age < interval:
430
432
  self._next_run = now + (interval - age)
431
433
  return None
432
434
  summary = self.run_sweep(cfg)