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/README.md
CHANGED
|
@@ -93,6 +93,8 @@ Tabby 가 닫힌다 → (밖에서) npm install → Tabby 가 스스로 다
|
|
|
93
93
|
> 옛것 그대로다. ② Windows 는 로드된 파일을 잡고 있어서, 떠 있는 동안 npm 이 그 폴더를 지우려 들면
|
|
94
94
|
> 반쯤 지운 채 실패할 수 있다 — 플러그인이 깨진 채 남는 것이 가장 나쁜 결과다.
|
|
95
95
|
> 그래서 설치는 임시 폴더로 떼어낸 `updater/agentdeck-update.ps1` 이 **Tabby 종료를 확인한 뒤** 한다.
|
|
96
|
+
> 기다리는 대상은 **업데이트를 건 그 인스턴스의 메인 프로세스 PID** 하나다 — 이름으로 전부 세면
|
|
97
|
+
> 다른 Tabby 창 하나 때문에 업데이트가 영영 안 된다.
|
|
96
98
|
|
|
97
99
|
> **개발 설치에는 설치하지 않는다.** 플러그인 폴더의 `tabby-agentdeck` 이 소스 트리를 가리키는
|
|
98
100
|
> 링크일 때(`install.ps1` 로 깐 개발 환경), 거기에 `npm install` 이 돌면 **작업 중인 소스를 덮어쓴다.**
|
package/dist/index.js
CHANGED
|
@@ -16338,10 +16338,25 @@ let AgentDeckUpdateService = class AgentDeckUpdateService {
|
|
|
16338
16338
|
'-PluginsDir', pluginsDir,
|
|
16339
16339
|
// Electron 에서 `process.execPath` 가 곧 Tabby.exe 다 — 경로를 짐작하지 않는다
|
|
16340
16340
|
'-TabbyExe', process.execPath,
|
|
16341
|
+
// **우리 인스턴스의 메인 PID.** 플러그인은 렌더러에서 도므로 `ppid` 가 메인이다
|
|
16342
|
+
// (2026-09-11 실측: renderer pid=35432 / ppid=10028 = OS 가 보여준 main 과 일치).
|
|
16343
|
+
// 이름으로 전부 기다리면 **다른 Tabby 창 하나 때문에 업데이트가 영영 안 된다**
|
|
16344
|
+
'-TabbyPid', String(this.mainProcessPid()),
|
|
16341
16345
|
], { detached: true, stdio: 'ignore' });
|
|
16342
16346
|
child.unref();
|
|
16343
16347
|
(0,_diag__WEBPACK_IMPORTED_MODULE_8__.diag)(`update updater spawned pid=${child.pid} script=${script}`);
|
|
16344
16348
|
}
|
|
16349
|
+
/**
|
|
16350
|
+
* 이 Tabby 인스턴스의 **메인 프로세스 PID**.
|
|
16351
|
+
*
|
|
16352
|
+
* 플러그인은 렌더러에서 돌고, Electron 렌더러의 부모가 메인이다. 메인이 죽으면 렌더러·gpu 도
|
|
16353
|
+
* 함께 내려가므로 "이 인스턴스가 완전히 꺼졌나" 를 재는 기준점으로 이것이 맞다.
|
|
16354
|
+
* `ppid` 를 못 읽는 환경(테스트 하네스 등)에서는 0 을 주고, 스크립트가 옛 방식으로 물러난다.
|
|
16355
|
+
*/
|
|
16356
|
+
mainProcessPid() {
|
|
16357
|
+
const ppid = Number(process.ppid);
|
|
16358
|
+
return Number.isFinite(ppid) && ppid > 0 ? ppid : 0;
|
|
16359
|
+
}
|
|
16345
16360
|
/** `<Tabby 설정폴더>/plugins` — npm 이 `--prefix` 로 받을 경로 */
|
|
16346
16361
|
pluginsDir() {
|
|
16347
16362
|
var _a, _b;
|