session-trail 0.2.1__tar.gz → 0.2.3__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.
- {session_trail-0.2.1/src/session_trail.egg-info → session_trail-0.2.3}/PKG-INFO +4 -2
- {session_trail-0.2.1 → session_trail-0.2.3}/README.en.md +3 -1
- {session_trail-0.2.1 → session_trail-0.2.3}/README.md +3 -1
- {session_trail-0.2.1 → session_trail-0.2.3}/pyproject.toml +1 -1
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/tray/app.py +43 -1
- {session_trail-0.2.1 → session_trail-0.2.3/src/session_trail.egg-info}/PKG-INFO +4 -2
- {session_trail-0.2.1 → session_trail-0.2.3}/LICENSE +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/MANIFEST.in +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/setup.cfg +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/__init__.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/__main__.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/__init__.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/base.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/claude_code.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/codebuddy.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/codex.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/deepseek_harness.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/jsonl_utils.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/kimi_code.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/minimax_code.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/opencode.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/pi.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/sqlite_utils.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/adapters/zcode.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/cli.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/launcher.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/models.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/scanner.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/server.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/static/app.js +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/static/i18n.js +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/static/index.html +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/static/styles.css +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/store.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/tray/__init__.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/tray/desktop.template +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/tray/icon.png +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/tray/sni.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/agent_trail/watcher.py +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/session_trail.egg-info/SOURCES.txt +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/session_trail.egg-info/dependency_links.txt +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/session_trail.egg-info/entry_points.txt +0 -0
- {session_trail-0.2.1 → session_trail-0.2.3}/src/session_trail.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: session-trail
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Local cross-agent work timeline: discover, browse and resume coding-agent sessions on your machine
|
|
5
5
|
Author: fwt11
|
|
6
6
|
License-Expression: MIT
|
|
@@ -101,9 +101,11 @@ agent-trail serve --interval 30 # 轮询间隔(watch 健康时自动降
|
|
|
101
101
|
```bash
|
|
102
102
|
agent-trail tray # 启动托盘(自动拉起 agent-trail serve)
|
|
103
103
|
agent-trail tray --show # 启动同时打开控制台窗口
|
|
104
|
-
agent-trail tray --install #
|
|
104
|
+
agent-trail tray --install # 手动写入应用菜单入口;--uninstall 反向清理
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
pip 安装后首次运行 `agent-trail tray` 会自动把"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到)。Deepin 的自启动加载器会劫持指向 Python 脚本的 Exec 强制用系统解释器执行,故自启条目以 `/bin/sh -c exec` 包装规避"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到),之后升级换路径也会自动刷新;无桌面会话(SSH/服务器)不写入。
|
|
108
|
+
|
|
107
109
|
托盘壳本身不依赖任何第三方 pip 包,但需要 GTK 的 GI 绑定(系统 Python 通常自带)。`agent-trail tray` 在当前解释器缺 GI 绑定时会自动改用带绑定的系统 Python 重执行(例如 pip 装在 venv 里、托盘跑在系统 Python),无需任何手动操作;实在找不到时按提示安装:
|
|
108
110
|
|
|
109
111
|
```bash
|
|
@@ -74,9 +74,11 @@ Beyond `serve`, a tray application embeds the console in a native window and add
|
|
|
74
74
|
```bash
|
|
75
75
|
agent-trail tray # start the tray (spawns agent-trail serve)
|
|
76
76
|
agent-trail tray --show # also open the console window
|
|
77
|
-
agent-trail tray --install # add an applications-menu entry; --uninstall reverts
|
|
77
|
+
agent-trail tray --install # manually add an applications-menu entry; --uninstall reverts
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
The first `agent-trail tray` run after pip install automatically registers "Agent Trail" in the desktop applications menu (searchable from your launcher) and refreshes it on upgrades; headless sessions (SSH/servers) write nothing. Deepin's autostart launcher forces Python-script Exec entries through the system interpreter, so the entry is wrapped as `/bin/sh -c exec '<path>' tray` to keep the venv shebang working.
|
|
81
|
+
|
|
80
82
|
The tray needs GTK GI bindings (preinstalled on most distros as the system Python). If the interpreter running agent-trail lacks them — e.g. the package lives in a venv — `agent-trail tray` automatically re-executes itself with a system Python that has GI; no manual steps. If none is found, install:
|
|
81
83
|
|
|
82
84
|
```bash
|
|
@@ -75,9 +75,11 @@ agent-trail serve --interval 30 # 轮询间隔(watch 健康时自动降
|
|
|
75
75
|
```bash
|
|
76
76
|
agent-trail tray # 启动托盘(自动拉起 agent-trail serve)
|
|
77
77
|
agent-trail tray --show # 启动同时打开控制台窗口
|
|
78
|
-
agent-trail tray --install #
|
|
78
|
+
agent-trail tray --install # 手动写入应用菜单入口;--uninstall 反向清理
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
pip 安装后首次运行 `agent-trail tray` 会自动把"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到)。Deepin 的自启动加载器会劫持指向 Python 脚本的 Exec 强制用系统解释器执行,故自启条目以 `/bin/sh -c exec` 包装规避"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到),之后升级换路径也会自动刷新;无桌面会话(SSH/服务器)不写入。
|
|
82
|
+
|
|
81
83
|
托盘壳本身不依赖任何第三方 pip 包,但需要 GTK 的 GI 绑定(系统 Python 通常自带)。`agent-trail tray` 在当前解释器缺 GI 绑定时会自动改用带绑定的系统 Python 重执行(例如 pip 装在 venv 里、托盘跑在系统 Python),无需任何手动操作;实在找不到时按提示安装:
|
|
82
84
|
|
|
83
85
|
```bash
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "session-trail"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.3"
|
|
8
8
|
description = "Local cross-agent work timeline: discover, browse and resume coding-agent sessions on your machine"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -305,10 +305,51 @@ class TrailCore:
|
|
|
305
305
|
# -- 桌面入口文件 -----------------------------------------------------------
|
|
306
306
|
|
|
307
307
|
|
|
308
|
+
def _desktop_session_present() -> bool:
|
|
309
|
+
return bool(
|
|
310
|
+
os.environ.get("DISPLAY")
|
|
311
|
+
or os.environ.get("WAYLAND_DISPLAY")
|
|
312
|
+
or os.environ.get("XDG_CURRENT_DESKTOP")
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def ensure_desktop_entry() -> None:
|
|
317
|
+
"""首次运行 tray 时自动注册应用菜单入口,并在路径变化后自愈刷新。
|
|
318
|
+
|
|
319
|
+
pip 的 wheel 安装没有装后钩子,因此采用运行时自注册:仅在有桌面
|
|
320
|
+
会话的环境执行,内容与当前渲染一致时跳过写入。开机自启已开启时
|
|
321
|
+
同步刷新其 Exec 路径,避免包位置变化后自启失效。
|
|
322
|
+
"""
|
|
323
|
+
if not _desktop_session_present():
|
|
324
|
+
return
|
|
325
|
+
executable = shutil.which("agent-trail") or sys.argv[0]
|
|
326
|
+
if not _looks_executable(executable):
|
|
327
|
+
return
|
|
328
|
+
entry = render_desktop_entry(executable, ICON_PATH)
|
|
329
|
+
try:
|
|
330
|
+
if not APP_MENU_PATH.exists() or APP_MENU_PATH.read_text(encoding="utf-8") != entry:
|
|
331
|
+
APP_MENU_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
332
|
+
APP_MENU_PATH.write_text(entry, encoding="utf-8")
|
|
333
|
+
if autostart_enabled():
|
|
334
|
+
if AUTOSTART_PATH.read_text(encoding="utf-8") != entry:
|
|
335
|
+
AUTOSTART_PATH.write_text(entry, encoding="utf-8")
|
|
336
|
+
except OSError:
|
|
337
|
+
pass # 桌面注册失败不影响托盘本身;--install/--uninstall 仍可手动操作
|
|
338
|
+
|
|
339
|
+
|
|
308
340
|
def render_desktop_entry(executable: str, icon: Path,
|
|
309
341
|
template: Path = DESKTOP_TEMPLATE) -> str:
|
|
342
|
+
# Deepin 的 app-launch-helper 会对「指向 Python 脚本」的 Exec 强制改用
|
|
343
|
+
# /usr/bin/python3 执行(无视 shebang),venv 安装直接 ModuleNotFoundError。
|
|
344
|
+
# 用 /bin/sh -c exec 包装:加载器看到 ELF 二进制就不再劫持,sh 按
|
|
345
|
+
# shebang 正确执行。executable 路径内的单引号会破坏该包装(极少见),
|
|
346
|
+
# 此时回退为直连形式。
|
|
347
|
+
if "'" not in executable:
|
|
348
|
+
exec_line = f'/bin/sh -c "exec \'{executable}\' tray"'
|
|
349
|
+
else:
|
|
350
|
+
exec_line = f"{executable} tray"
|
|
310
351
|
text = template.read_text(encoding="utf-8")
|
|
311
|
-
return text.replace("@EXEC@",
|
|
352
|
+
return text.replace("@EXEC@", exec_line).replace("@ICON@", str(icon))
|
|
312
353
|
|
|
313
354
|
|
|
314
355
|
def autostart_enabled(target: Path = AUTOSTART_PATH) -> bool:
|
|
@@ -606,6 +647,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
606
647
|
if not ICON_PATH.is_file():
|
|
607
648
|
print(tr("error.no_icon", path=ICON_PATH), file=sys.stderr)
|
|
608
649
|
return 1
|
|
650
|
+
ensure_desktop_entry()
|
|
609
651
|
# 锁在前台获取:重复启动时提示直接出现在用户终端;fd 由守护进程继承
|
|
610
652
|
guard = SingleInstance()
|
|
611
653
|
if not guard.acquire():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: session-trail
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Local cross-agent work timeline: discover, browse and resume coding-agent sessions on your machine
|
|
5
5
|
Author: fwt11
|
|
6
6
|
License-Expression: MIT
|
|
@@ -101,9 +101,11 @@ agent-trail serve --interval 30 # 轮询间隔(watch 健康时自动降
|
|
|
101
101
|
```bash
|
|
102
102
|
agent-trail tray # 启动托盘(自动拉起 agent-trail serve)
|
|
103
103
|
agent-trail tray --show # 启动同时打开控制台窗口
|
|
104
|
-
agent-trail tray --install #
|
|
104
|
+
agent-trail tray --install # 手动写入应用菜单入口;--uninstall 反向清理
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
pip 安装后首次运行 `agent-trail tray` 会自动把"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到)。Deepin 的自启动加载器会劫持指向 Python 脚本的 Exec 强制用系统解释器执行,故自启条目以 `/bin/sh -c exec` 包装规避"Agent 足迹"注册进系统应用菜单(应用启动器可直接搜索到),之后升级换路径也会自动刷新;无桌面会话(SSH/服务器)不写入。
|
|
108
|
+
|
|
107
109
|
托盘壳本身不依赖任何第三方 pip 包,但需要 GTK 的 GI 绑定(系统 Python 通常自带)。`agent-trail tray` 在当前解释器缺 GI 绑定时会自动改用带绑定的系统 Python 重执行(例如 pip 装在 venv 里、托盘跑在系统 Python),无需任何手动操作;实在找不到时按提示安装:
|
|
108
110
|
|
|
109
111
|
```bash
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|