agentshim 0.13.0__tar.gz → 0.13.1__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 (65) hide show
  1. {agentshim-0.13.0 → agentshim-0.13.1}/CHANGELOG.md +12 -0
  2. {agentshim-0.13.0 → agentshim-0.13.1}/PKG-INFO +1 -1
  3. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/home.py +19 -4
  4. {agentshim-0.13.0 → agentshim-0.13.1}/pyproject.toml +1 -1
  5. {agentshim-0.13.0 → agentshim-0.13.1}/.gitignore +0 -0
  6. {agentshim-0.13.0 → agentshim-0.13.1}/README.md +0 -0
  7. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/__init__.py +0 -0
  8. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/agent.py +0 -0
  9. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/__init__.py +0 -0
  10. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/_files.py +0 -0
  11. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/env.py +0 -0
  12. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/errors.py +0 -0
  13. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/events.py +0 -0
  14. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/mcp.py +0 -0
  15. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/pricing.py +0 -0
  16. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/profile.py +0 -0
  17. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/provider.py +0 -0
  18. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/schema.py +0 -0
  19. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/skills.py +0 -0
  20. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/stream.py +0 -0
  21. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/turn.py +0 -0
  22. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/core/usage.py +0 -0
  23. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/execution/__init__.py +0 -0
  24. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/execution/executor.py +0 -0
  25. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/execution/host.py +0 -0
  26. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/execution/transform.py +0 -0
  27. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/__init__.py +0 -0
  28. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/__init__.py +0 -0
  29. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/events.py +0 -0
  30. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/failures.py +0 -0
  31. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/hooks/__init__.py +0 -0
  32. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/hooks/confine_reads.py +0 -0
  33. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/parser.py +0 -0
  34. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/provider.py +0 -0
  35. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/sandbox.py +0 -0
  36. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/scripted.py +0 -0
  37. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/claude/user_hooks.py +0 -0
  38. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/__init__.py +0 -0
  39. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/_toml.py +0 -0
  40. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/events.py +0 -0
  41. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/failures.py +0 -0
  42. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/mcp_scope.py +0 -0
  43. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/parser.py +0 -0
  44. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/provider.py +0 -0
  45. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/rules.py +0 -0
  46. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/sandbox.py +0 -0
  47. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/scripted.py +0 -0
  48. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/codex/skills.py +0 -0
  49. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/copilot/__init__.py +0 -0
  50. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/copilot/events.py +0 -0
  51. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/copilot/parser.py +0 -0
  52. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/copilot/provider.py +0 -0
  53. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/copilot/scripted.py +0 -0
  54. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/gemini/__init__.py +0 -0
  55. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/gemini/events.py +0 -0
  56. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/gemini/parser.py +0 -0
  57. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/gemini/provider.py +0 -0
  58. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/gemini/scripted.py +0 -0
  59. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/opencode/__init__.py +0 -0
  60. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/opencode/events.py +0 -0
  61. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/opencode/parser.py +0 -0
  62. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/opencode/provider.py +0 -0
  63. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/providers/opencode/scripted.py +0 -0
  64. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/py.typed +0 -0
  65. {agentshim-0.13.0 → agentshim-0.13.1}/agentshim/testing/__init__.py +0 -0
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.1 (2026-10-03)
4
+
5
+ Fix only.
6
+
7
+ ### Fixed
8
+
9
+ - `prepare_config_home` no longer fails when several sessions of one process
10
+ start at once. The staged link name was shared by every thread of a process,
11
+ so parallel first starts could raise `FileExistsError` or
12
+ `FileNotFoundError`. Each call now stages a uniquely named link, and a link
13
+ that already points at the login counts as success.
14
+
3
15
  ## 0.13.0 (2026-10-03)
4
16
 
5
17
  A session can leave out the user's own CLI configuration. Additive.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentshim
3
- Version: 0.13.0
3
+ Version: 0.13.1
4
4
  Summary: Provider-agnostic coding-agent CLI shims
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: tomli>=2; python_full_version < '3.11'
@@ -19,8 +19,10 @@ refreshes (``AuthManager::refresh_token``'s guarded reload).
19
19
  from __future__ import annotations
20
20
 
21
21
  import os
22
+ import threading
22
23
  from pathlib import Path
23
24
  from typing import TYPE_CHECKING
25
+ from uuid import uuid4
24
26
 
25
27
  from ._files import real_path
26
28
 
@@ -80,11 +82,24 @@ def prepare_config_home(
80
82
 
81
83
 
82
84
  def _link(link: Path, target: Path) -> None:
83
- """Point *link* at *target*, atomically replacing any file already there."""
85
+ """Point *link* at *target*, atomically replacing any file already there.
86
+
87
+ Safe to call concurrently for the same *link* from threads or processes:
88
+ each call stages its own uniquely named link, and ``replace`` is atomic, so
89
+ the last writer wins with the same target. A link that already points at
90
+ *target* is success, whoever made it.
91
+ """
84
92
  if link.is_symlink() and link.readlink() == target:
85
93
  return
86
94
  link.parent.mkdir(parents=True, exist_ok=True)
87
- staged = link.with_name(f".{link.name}.{os.getpid()}.link")
88
- staged.unlink(missing_ok=True)
95
+ staged = link.with_name(
96
+ f".{link.name}.{os.getpid()}.{threading.get_ident()}.{uuid4().hex}.link"
97
+ )
89
98
  staged.symlink_to(target)
90
- staged.replace(link)
99
+ try:
100
+ staged.replace(link)
101
+ except OSError:
102
+ staged.unlink(missing_ok=True)
103
+ if link.is_symlink() and link.readlink() == target:
104
+ return
105
+ raise
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentshim"
3
- version = "0.13.0"
3
+ version = "0.13.1"
4
4
  description = "Provider-agnostic coding-agent CLI shims"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
File without changes
File without changes