aline-ai 0.5.6__py3-none-any.whl → 0.5.7__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.
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/METADATA +1 -1
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/RECORD +9 -9
- realign/__init__.py +1 -1
- realign/adapters/claude.py +13 -7
- realign/commands/init.py +31 -5
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/WHEEL +0 -0
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/entry_points.txt +0 -0
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/licenses/LICENSE +0 -0
- {aline_ai-0.5.6.dist-info → aline_ai-0.5.7.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
aline_ai-0.5.
|
|
2
|
-
realign/__init__.py,sha256=
|
|
1
|
+
aline_ai-0.5.7.dist-info/licenses/LICENSE,sha256=H8wTqV5IF1oHw_HbBtS1PSDU8G_q81yblEIL_JfV8Vo,1077
|
|
2
|
+
realign/__init__.py,sha256=yVsHlHyZpDRPyaFzYXTltDHKp6XXpiIGe-TlrznKALo,1623
|
|
3
3
|
realign/claude_detector.py,sha256=ZLSJacMo6zzQclXByABKA70UNpstxqIv3fPGqdpA934,2792
|
|
4
4
|
realign/cli.py,sha256=yeq_a3Peoqx8N13Jo2etjJtbTCZYpuqwoMMyAPdrANs,30569
|
|
5
5
|
realign/codex_detector.py,sha256=N9ulgMgvTzDfXE4s4vLd6OoS0hT7R6h2bDFFXWa-2hE,4183
|
|
@@ -19,7 +19,7 @@ realign/worker_daemon.py,sha256=LpJbQDY0Z4AMtq0LmpxvFeQM4puuoGDRBayKRafvKhc,3574
|
|
|
19
19
|
realign/adapters/__init__.py,sha256=bpDm5aBxMdq4OA_beYahoUb4zfNaq3KOG6KghQJruRc,827
|
|
20
20
|
realign/adapters/antigravity.py,sha256=geaYxAEswpgsVtERqsQ1OwvPFsy5tRkyjx2yQ-Uq9nM,5461
|
|
21
21
|
realign/adapters/base.py,sha256=2IdAZKGjg5gPB3YLf_8r3V4XAdbK7fHpj06GjjsYEFY,7409
|
|
22
|
-
realign/adapters/claude.py,sha256=
|
|
22
|
+
realign/adapters/claude.py,sha256=ksTRwC5Z8AzUcB21LFjx6DETP08cv__fjgBzm-TeZdI,5444
|
|
23
23
|
realign/adapters/codex.py,sha256=5ex3zJ5Hpb_StV2CcBSHVhHleygZxzVJjYsWw8qK1Bc,2051
|
|
24
24
|
realign/adapters/gemini.py,sha256=NvtXQPWUtEY-DaAAMvLGvQW4FalTG-g0pD514HYnzF0,2540
|
|
25
25
|
realign/adapters/registry.py,sha256=yM6nf9nGTJ1vaK2Uixp-VacseK7PmxZkCdKedmWI8MA,3255
|
|
@@ -37,7 +37,7 @@ realign/commands/config.py,sha256=nYnu_h2pk7GODcrzrV04K51D-s7v06FlRXHJ0HJ-gvU,67
|
|
|
37
37
|
realign/commands/context.py,sha256=pM2KfZHVkB-ou4nBhFvKSwnYliLBzwN3zerLyBAbhfE,7095
|
|
38
38
|
realign/commands/export_shares.py,sha256=Djy1aO7MoU1_ewzn6CZ43oNhSEEonV3sTkSQbHgiaKI,135806
|
|
39
39
|
realign/commands/import_shares.py,sha256=ukX8huvLvEM5g0qEIoqrV1-imz1g-r0Jj2FqD-ojrIA,25297
|
|
40
|
-
realign/commands/init.py,sha256=
|
|
40
|
+
realign/commands/init.py,sha256=ef-q3Qz5D_0Eqld8qjtX26X2QrovBSYcva3uAjiJuwk,33015
|
|
41
41
|
realign/commands/restore.py,sha256=s2BxQZHxQw9r12NzRVsK20KlGafy5AIoSjWMo5PcnHY,11173
|
|
42
42
|
realign/commands/search.py,sha256=RUdseQsjy-SNfKFkGLWrE4IhxkzgkW9IIxAX33XnCHk,24589
|
|
43
43
|
realign/commands/upgrade.py,sha256=L3PLOUIN5qAQTbkfoVtSsIbbzEezA_xjjk9F1GMVfjw,12781
|
|
@@ -88,8 +88,8 @@ realign/triggers/next_turn_trigger.py,sha256=BpP0PWn4mU1MZd6mv89jWcjs8Jtv0zEWapW
|
|
|
88
88
|
realign/triggers/registry.py,sha256=cb-AVLbYB2pqwfWL3q1DQxLv4kOw7g7m-GshTdfFESc,3827
|
|
89
89
|
realign/triggers/turn_status.py,sha256=wAZEhXDAmDoX5F-ohWfSnZZ0eA6DAJ9svSPiSv_f6sg,6041
|
|
90
90
|
realign/triggers/turn_summary.py,sha256=f3hEUshgv9skJ9AbfWpoYs417lsv_HK2A_vpPjgryO4,4467
|
|
91
|
-
aline_ai-0.5.
|
|
92
|
-
aline_ai-0.5.
|
|
93
|
-
aline_ai-0.5.
|
|
94
|
-
aline_ai-0.5.
|
|
95
|
-
aline_ai-0.5.
|
|
91
|
+
aline_ai-0.5.7.dist-info/METADATA,sha256=SG0PLhxEgWQIrjE3rCiSk9DFURyfEkxXteRKqdFhijU,1597
|
|
92
|
+
aline_ai-0.5.7.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
93
|
+
aline_ai-0.5.7.dist-info/entry_points.txt,sha256=TvYELpMoWsUTcQdMV8tBHxCbEf_LbK4sESqK3r8PM6Y,78
|
|
94
|
+
aline_ai-0.5.7.dist-info/top_level.txt,sha256=yIL3s2xv9nf1GwD5n71Aq_JEIV4AfzCIDNKBzewuRm4,8
|
|
95
|
+
aline_ai-0.5.7.dist-info/RECORD,,
|
realign/__init__.py
CHANGED
realign/adapters/claude.py
CHANGED
|
@@ -76,14 +76,13 @@ class ClaudeAdapter(SessionAdapter):
|
|
|
76
76
|
project_path_str = "/" + parent_name[1:].replace("-", "/")
|
|
77
77
|
project_path = Path(project_path_str)
|
|
78
78
|
|
|
79
|
-
#
|
|
80
|
-
# We relax this slightly: if it's a valid-looking path, we return it,
|
|
81
|
-
# but ideally we check existence.
|
|
79
|
+
# If path exists locally, return it immediately
|
|
82
80
|
if project_path.exists():
|
|
83
81
|
return project_path
|
|
84
82
|
|
|
85
83
|
# Fallback: read cwd from the session JSONL (more reliable when the encoded
|
|
86
84
|
# directory name is ambiguous due to '-' in real paths).
|
|
85
|
+
cwd_path: Optional[Path] = None
|
|
87
86
|
try:
|
|
88
87
|
with session_file.open("r", encoding="utf-8") as f:
|
|
89
88
|
for i, line in enumerate(f):
|
|
@@ -98,13 +97,20 @@ class ClaudeAdapter(SessionAdapter):
|
|
|
98
97
|
continue
|
|
99
98
|
cwd = obj.get("cwd")
|
|
100
99
|
if isinstance(cwd, str) and cwd.strip():
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
cwd_path = Path(cwd.strip())
|
|
101
|
+
# If cwd exists locally, prefer it
|
|
102
|
+
if cwd_path.exists():
|
|
103
|
+
return cwd_path
|
|
104
|
+
break # Found cwd, stop searching
|
|
104
105
|
except Exception:
|
|
105
106
|
pass
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
# Return the best available path even if it doesn't exist locally.
|
|
109
|
+
# This allows importing sessions from other machines (e.g., SWEBench).
|
|
110
|
+
# Prefer cwd from JSONL as it's more accurate than path decoding.
|
|
111
|
+
if cwd_path is not None:
|
|
112
|
+
return cwd_path
|
|
113
|
+
return project_path
|
|
108
114
|
|
|
109
115
|
except Exception:
|
|
110
116
|
return None
|
realign/commands/init.py
CHANGED
|
@@ -18,10 +18,14 @@ console = Console()
|
|
|
18
18
|
|
|
19
19
|
# tmux config template for Aline-managed dashboard sessions.
|
|
20
20
|
# Stored at ~/.aline/tmux/tmux.conf and sourced by the dashboard tmux bootstrap.
|
|
21
|
+
# Bump this version when the tmux config changes to trigger auto-update on `aline init`.
|
|
22
|
+
_TMUX_CONFIG_VERSION = 2
|
|
23
|
+
|
|
24
|
+
|
|
21
25
|
def _get_tmux_config() -> str:
|
|
22
26
|
"""Generate tmux config with Type-to-Exit bindings."""
|
|
23
|
-
conf =
|
|
24
|
-
#
|
|
27
|
+
conf = f"# Aline tmux config (v{_TMUX_CONFIG_VERSION})\n"
|
|
28
|
+
conf += r"""#
|
|
25
29
|
# Goal: make mouse selection copy to the system clipboard (macOS Terminal friendly).
|
|
26
30
|
# - Drag-select text with the mouse; when you release, it is copied to the clipboard.
|
|
27
31
|
# - Paste anywhere with Cmd+V.
|
|
@@ -448,24 +452,46 @@ def _initialize_prompts_directory() -> None:
|
|
|
448
452
|
file_path.write_text(content, encoding="utf-8")
|
|
449
453
|
|
|
450
454
|
|
|
455
|
+
def _get_tmux_config_version(content: str) -> int:
|
|
456
|
+
"""Extract version number from tmux config content. Returns 0 if not found."""
|
|
457
|
+
# Look for "# Aline tmux config (vN)" pattern
|
|
458
|
+
match = re.search(r"# Aline tmux config \(v(\d+)\)", content)
|
|
459
|
+
if match:
|
|
460
|
+
return int(match.group(1))
|
|
461
|
+
# Old configs without version marker are version 1
|
|
462
|
+
if "# Aline tmux config" in content:
|
|
463
|
+
return 1
|
|
464
|
+
return 0
|
|
465
|
+
|
|
466
|
+
|
|
451
467
|
def _initialize_tmux_config() -> Path:
|
|
452
|
-
"""Initialize ~/.aline/tmux/tmux.conf
|
|
468
|
+
"""Initialize ~/.aline/tmux/tmux.conf with auto-update on version change."""
|
|
453
469
|
tmux_conf_path = Path.home() / ".aline" / "tmux" / "tmux.conf"
|
|
454
470
|
tmux_conf_path.parent.mkdir(parents=True, exist_ok=True)
|
|
471
|
+
|
|
455
472
|
if not tmux_conf_path.exists():
|
|
456
473
|
tmux_conf_path.write_text(_get_tmux_config(), encoding="utf-8")
|
|
457
474
|
return tmux_conf_path
|
|
458
475
|
|
|
459
|
-
#
|
|
460
|
-
# tmux parses `#` as a comment delimiter, turning `bind ... # ...` into `bind ...` (invalid).
|
|
476
|
+
# Check existing config
|
|
461
477
|
try:
|
|
462
478
|
existing = tmux_conf_path.read_text(encoding="utf-8")
|
|
463
479
|
except Exception:
|
|
464
480
|
return tmux_conf_path
|
|
465
481
|
|
|
482
|
+
# Only manage Aline-generated configs
|
|
466
483
|
if "# Aline tmux config" not in existing:
|
|
467
484
|
return tmux_conf_path
|
|
468
485
|
|
|
486
|
+
# Check version and update if outdated
|
|
487
|
+
existing_version = _get_tmux_config_version(existing)
|
|
488
|
+
if existing_version < _TMUX_CONFIG_VERSION:
|
|
489
|
+
# Auto-update to latest config
|
|
490
|
+
tmux_conf_path.write_text(_get_tmux_config(), encoding="utf-8")
|
|
491
|
+
return tmux_conf_path
|
|
492
|
+
|
|
493
|
+
# Best-effort repair for older Aline-generated configs that used unquoted `#` keys.
|
|
494
|
+
# tmux parses `#` as a comment delimiter, turning `bind ... # ...` into `bind ...` (invalid).
|
|
469
495
|
repaired = existing
|
|
470
496
|
repaired = _TMUX_CONF_REPAIR_TILDE_KEY_RE.sub(r"\1\\~\2\\~", repaired)
|
|
471
497
|
repaired = _TMUX_CONF_REPAIR_KEY_NEEDS_QUOTE_RE.sub(r'\1"\2"\3"\2"', repaired)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|