tabby-agentdeck 1.1.1 → 1.1.2
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.
- package/README.md +2 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/update.service.d.ts +8 -0
- package/package.json +1 -1
- package/updater/agentdeck-update.ps1 +27 -5
package/dist/update.service.d.ts
CHANGED
|
@@ -44,6 +44,14 @@ export declare class AgentDeckUpdateService {
|
|
|
44
44
|
* 설치는커녕 Tabby 를 다시 띄우지도 못한다.
|
|
45
45
|
*/
|
|
46
46
|
private launchUpdater;
|
|
47
|
+
/**
|
|
48
|
+
* 이 Tabby 인스턴스의 **메인 프로세스 PID**.
|
|
49
|
+
*
|
|
50
|
+
* 플러그인은 렌더러에서 돌고, Electron 렌더러의 부모가 메인이다. 메인이 죽으면 렌더러·gpu 도
|
|
51
|
+
* 함께 내려가므로 "이 인스턴스가 완전히 꺼졌나" 를 재는 기준점으로 이것이 맞다.
|
|
52
|
+
* `ppid` 를 못 읽는 환경(테스트 하네스 등)에서는 0 을 주고, 스크립트가 옛 방식으로 물러난다.
|
|
53
|
+
*/
|
|
54
|
+
private mainProcessPid;
|
|
47
55
|
/** `<Tabby 설정폴더>/plugins` — npm 이 `--prefix` 로 받을 경로 */
|
|
48
56
|
private pluginsDir;
|
|
49
57
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabby-agentdeck",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Run AI coding agents side by side in Tabby - a live deck of agent sessions with status, a preview panel for the files they touch, agent-friendly hotkeys and image paste",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tabby-plugin",
|
|
@@ -16,6 +16,9 @@ param(
|
|
|
16
16
|
[Parameter(Mandatory = $true)][string]$Version,
|
|
17
17
|
[Parameter(Mandatory = $true)][string]$PluginsDir,
|
|
18
18
|
[Parameter(Mandatory = $true)][string]$TabbyExe,
|
|
19
|
+
# 우리를 띄운 그 Tabby 의 **메인 프로세스 PID**. 이것만 기다린다.
|
|
20
|
+
# 0 이면 옛 방식(이름으로 전부)으로 물러난다 — 옛 버전이 이 인자를 안 보낸다.
|
|
21
|
+
[int]$TabbyPid = 0,
|
|
19
22
|
[string]$LogFile = '',
|
|
20
23
|
# Tabby 가 꺼지기를 기다리는 최대 시간(초). 넘으면 설치하지 않고 그냥 끝낸다 —
|
|
21
24
|
# 떠 있는 상태로 설치하면 반쯤 지워진 플러그인이 남는다
|
|
@@ -48,14 +51,33 @@ try {
|
|
|
48
51
|
Write-Log "=== update 시작 version=$Version pluginsDir=$PluginsDir"
|
|
49
52
|
|
|
50
53
|
# ── 1) Tabby 가 꺼지기를 기다린다 ────────────────────────────────────────────
|
|
51
|
-
#
|
|
52
|
-
#
|
|
54
|
+
#
|
|
55
|
+
# **우리를 띄운 그 인스턴스만 기다린다** (`-TabbyPid` = Electron 메인 프로세스).
|
|
56
|
+
# 이름(`Tabby.exe`)으로 전부 세면 **다른 Tabby 창 하나 때문에 업데이트가 영영 안 된다** —
|
|
57
|
+
# 그쪽은 다른 user-data-dir 을 쓰는 별개 인스턴스라 우리 플러그인 파일과 아무 상관이 없다
|
|
58
|
+
# (2026-09-11: 격리 인스턴스로 검증하려 했더니 실사용 Tabby 가 떠 있어 60초 타임아웃).
|
|
59
|
+
#
|
|
60
|
+
# 파일 잠금을 쥔 것은 플러그인을 require 한 **렌더러**지만, 메인이 죽으면 자식(renderer·gpu)도
|
|
61
|
+
# 함께 내려간다. 그래서 메인 PID 가 사라지고 그 자식들이 정리될 때까지를 한 조건으로 본다.
|
|
62
|
+
function Test-TabbyAlive ([int]$mainPid) {
|
|
63
|
+
if ($mainPid -le 0) {
|
|
64
|
+
# 옛 방식 — 이름으로 전부
|
|
65
|
+
return @(Get-Process -Name 'Tabby' -ErrorAction SilentlyContinue).Count
|
|
66
|
+
}
|
|
67
|
+
$n = 0
|
|
68
|
+
if (Get-Process -Id $mainPid -ErrorAction SilentlyContinue) { $n++ }
|
|
69
|
+
# 메인이 사라져도 자식이 잠깐 남을 수 있다 — 그 자식들까지 없어져야 잠금이 풀린다
|
|
70
|
+
$n += @(Get-CimInstance Win32_Process -Filter "Name='Tabby.exe' AND ParentProcessId=$mainPid" -ErrorAction SilentlyContinue).Count
|
|
71
|
+
return $n
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Write-Log "대기 대상: $(if ($TabbyPid -gt 0) { "pid=$TabbyPid (+자식)" } else { '이름으로 전부 (옛 방식)' })"
|
|
53
75
|
$waited = 0
|
|
54
76
|
while ($true) {
|
|
55
|
-
$alive =
|
|
56
|
-
if ($alive
|
|
77
|
+
$alive = Test-TabbyAlive $TabbyPid
|
|
78
|
+
if ($alive -eq 0) { break }
|
|
57
79
|
if ($waited -ge $WaitSeconds) {
|
|
58
|
-
Write-Log "FAIL Tabby 가 ${WaitSeconds}초 안에 꺼지지 않았다 (남은 프로세스 $
|
|
80
|
+
Write-Log "FAIL Tabby 가 ${WaitSeconds}초 안에 꺼지지 않았다 (남은 프로세스 ${alive}개) — 설치하지 않는다"
|
|
59
81
|
exit 2
|
|
60
82
|
}
|
|
61
83
|
Start-Sleep -Milliseconds 500
|