ccoding 0.2.3__tar.gz → 0.2.5__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 (33) hide show
  1. {ccoding-0.2.3 → ccoding-0.2.5}/PKG-INFO +1 -1
  2. {ccoding-0.2.3 → ccoding-0.2.5}/pyproject.toml +1 -1
  3. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/remote.py +3 -3
  4. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/remote_common.py +25 -3
  5. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/remote_server.py +3 -3
  6. {ccoding-0.2.3 → ccoding-0.2.5}/uv.lock +1 -1
  7. {ccoding-0.2.3 → ccoding-0.2.5}/.github/workflows/publish.yml +0 -0
  8. {ccoding-0.2.3 → ccoding-0.2.5}/.gitignore +0 -0
  9. {ccoding-0.2.3 → ccoding-0.2.5}/CLAUDE.md +0 -0
  10. {ccoding-0.2.3 → ccoding-0.2.5}/LICENSE +0 -0
  11. {ccoding-0.2.3 → ccoding-0.2.5}/README.md +0 -0
  12. {ccoding-0.2.3 → ccoding-0.2.5}/screenshot.png +0 -0
  13. {ccoding-0.2.3 → ccoding-0.2.5}/screenshot_mobile1.jpeg +0 -0
  14. {ccoding-0.2.3 → ccoding-0.2.5}/screenshot_mobile2.jpeg +0 -0
  15. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/__init__.py +0 -0
  16. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/__main__.py +0 -0
  17. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/api.py +0 -0
  18. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/cli.py +0 -0
  19. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/config.py +0 -0
  20. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/env_schema.json +0 -0
  21. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/logo.py +0 -0
  22. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/remote_cli.py +0 -0
  23. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/remote_client.py +0 -0
  24. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/ui.py +0 -0
  25. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/__init__.py +0 -0
  26. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/app.js +0 -0
  27. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/assets/addon-fit.js +0 -0
  28. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/assets/xterm-LICENSE +0 -0
  29. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/assets/xterm-addon-fit-LICENSE +0 -0
  30. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/assets/xterm.css +0 -0
  31. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/assets/xterm.js +0 -0
  32. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/index.html +0 -0
  33. {ccoding-0.2.3 → ccoding-0.2.5}/src/ccode/web/style.css +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccoding
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Curses-based Claude Code launcher
5
5
  Project-URL: Homepage, https://github.com/8DE4732A/ccode
6
6
  Project-URL: Repository, https://github.com/8DE4732A/ccode
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ccoding"
3
- version = "0.2.3"
3
+ version = "0.2.5"
4
4
  description = "Curses-based Claude Code launcher"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -406,11 +406,11 @@ def create_app() -> Any:
406
406
 
407
407
  @app.get("/app.js")
408
408
  async def app_js() -> Response:
409
- return Response(asset_text("app.js"), media_type="application/javascript")
409
+ return Response(asset_text("app.js"), media_type="application/javascript", headers={"Cache-Control": "no-store"})
410
410
 
411
411
  @app.get("/style.css")
412
412
  async def style_css() -> Response:
413
- return Response(asset_text("style.css"), media_type="text/css")
413
+ return Response(asset_text("style.css"), media_type="text/css", headers={"Cache-Control": "no-store"})
414
414
 
415
415
  @app.get("/assets/{asset_name}")
416
416
  async def web_asset(asset_name: str) -> Response:
@@ -422,7 +422,7 @@ def create_app() -> Any:
422
422
  media_type = media_types.get(asset_name)
423
423
  if media_type is None:
424
424
  return Response(status_code=404)
425
- return Response(web_asset_text(asset_name), media_type=media_type)
425
+ return Response(web_asset_text(asset_name), media_type=media_type, headers={"Cache-Control": "no-store"})
426
426
 
427
427
  @app.get("/health")
428
428
  async def health() -> dict[str, Any]:
@@ -3,11 +3,20 @@ from __future__ import annotations
3
3
  import base64
4
4
  import contextlib
5
5
  import datetime as dt
6
- import fcntl
7
6
  import hashlib
8
7
  import hmac
9
8
  import os
10
9
  import re
10
+
11
+ try:
12
+ import fcntl
13
+ except ImportError:
14
+ fcntl = None
15
+
16
+ try:
17
+ import msvcrt
18
+ except ImportError:
19
+ msvcrt = None
11
20
  import secrets
12
21
  import time
13
22
  from dataclasses import dataclass
@@ -209,11 +218,24 @@ def web_asset_text(name: str) -> str:
209
218
  def file_lock(path: Any) -> Iterator[None]:
210
219
  CONFIG_DIR.mkdir(parents=True, exist_ok=True)
211
220
  with path.open("a+") as lock_file:
212
- fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX)
221
+ if msvcrt is not None:
222
+ if path.stat().st_size == 0:
223
+ lock_file.write("0")
224
+ lock_file.flush()
225
+ lock_file.seek(0)
226
+ getattr(msvcrt, "locking")(lock_file.fileno(), getattr(msvcrt, "LK_LOCK"), 1)
227
+ elif fcntl is not None:
228
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX)
229
+ else:
230
+ raise OSError("file locking is not supported on this platform")
213
231
  try:
214
232
  yield
215
233
  finally:
216
- fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
234
+ if msvcrt is not None:
235
+ lock_file.seek(0)
236
+ getattr(msvcrt, "locking")(lock_file.fileno(), getattr(msvcrt, "LK_UNLCK"), 1)
237
+ elif fcntl is not None:
238
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
217
239
 
218
240
 
219
241
  def rotate_log(path: Any, max_bytes: int, backups: int) -> None:
@@ -158,11 +158,11 @@ def create_server_app() -> Any:
158
158
 
159
159
  @app.get("/app.js")
160
160
  async def app_js() -> Response:
161
- return Response(asset_text("app.js"), media_type="application/javascript")
161
+ return Response(asset_text("app.js"), media_type="application/javascript", headers={"Cache-Control": "no-store"})
162
162
 
163
163
  @app.get("/style.css")
164
164
  async def style_css() -> Response:
165
- return Response(asset_text("style.css"), media_type="text/css")
165
+ return Response(asset_text("style.css"), media_type="text/css", headers={"Cache-Control": "no-store"})
166
166
 
167
167
  @app.get("/assets/{asset_name}")
168
168
  async def web_asset(asset_name: str) -> Response:
@@ -174,7 +174,7 @@ def create_server_app() -> Any:
174
174
  media_type = media_types.get(asset_name)
175
175
  if media_type is None:
176
176
  return Response(status_code=404)
177
- return Response(web_asset_text(asset_name), media_type=media_type)
177
+ return Response(web_asset_text(asset_name), media_type=media_type, headers={"Cache-Control": "no-store"})
178
178
 
179
179
  @app.get("/health")
180
180
  async def health() -> dict[str, Any]:
@@ -36,7 +36,7 @@ wheels = [
36
36
 
37
37
  [[package]]
38
38
  name = "ccoding"
39
- version = "0.2.2"
39
+ version = "0.2.5"
40
40
  source = { editable = "." }
41
41
  dependencies = [
42
42
  { name = "windows-curses", marker = "sys_platform == 'win32'" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes