agent-run-inspector 0.9.2 → 0.9.3
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.ko.md +2 -2
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/macos/app.js +24 -2
package/README.ko.md
CHANGED
|
@@ -91,7 +91,7 @@ Orca 안에서는 주소가 Orca 브라우저 새 탭으로 열립니다(`orca t
|
|
|
91
91
|
- **Agent Run Inspector.app**: `~/Applications` 에 만들고 Dock 에 넣습니다(`--no-dock` 으로 건너뜀). 자체 창·Launchpad 항목이 있고 실행할 때마다 자동으로 로그인합니다. 메뉴 막대에도 항목을 띄웁니다([The menu bar](#the-menu-bar) 참고). 로그인할 때는 메뉴 막대 항목만 띄우고, 창은 메뉴나 Dock 에서 엽니다. macOS 에 들어 있는 `osacompile` 로 이 Mac 에서 직접 만들므로 내려받을 것도, 개발자 서명도 없습니다. 실패하면 Chrome 이나 Edge 에서 주소를 열고 설치를 고르세요.
|
|
92
92
|
- **1년 유지되는 로그인**: 그 주소를 북마크해도 됩니다. 브라우저 탭에 "Signed out" 이 보이면 `ari open` 을 실행하세요.
|
|
93
93
|
|
|
94
|
-
**업데이트**: 앱이 6시간마다 GitHub 의 최신 릴리스를 확인합니다. 새 버전이 있으면 메뉴 막대 패널에 "Update to …" 버튼이, 우클릭 메뉴에 "Update to …" 항목이 나옵니다(평소에는 "Check for Updates…"). 화면 머리에도 배지가 뜹니다. 누르면 앱이 새 버전을 설치하고 다시 열립니다(1분
|
|
94
|
+
**업데이트**: 앱이 6시간마다 GitHub 의 최신 릴리스를 확인합니다. 새 버전이 있고 npm 에서도 받을 수 있으면 메뉴 막대 패널에 "Update to …" 버튼이, 우클릭 메뉴에 "Update to …" 항목이 나옵니다(평소에는 "Check for Updates…"). 화면 머리에도 배지가 뜹니다. 누르면 앱이 새 버전을 설치하고 다시 열립니다(1분 정도. 설치가 실패하면 30초 간격으로 두 번 더 시도). 그래도 실패하면 직접 칠 명령을 보여 줍니다: 패키지를 다시 설치하고 `ari service install` 을 다시 실행하면 서비스와 앱이 새 코드로 재시작됩니다. `ari service uninstall` 이 서비스·앱·Dock 아이콘·로그인 항목을 지웁니다. 로그는 `~/Library/Logs/agent-run-inspector.log` 입니다.
|
|
95
95
|
|
|
96
96
|
### The menu bar
|
|
97
97
|
|
|
@@ -114,7 +114,7 @@ Orca 안에서는 주소가 Orca 브라우저 새 탭으로 열립니다(`orca t
|
|
|
114
114
|
- 서버는 `127.0.0.1` 에서만 듣습니다.
|
|
115
115
|
- 실행마다 무작위 토큰을 만듭니다. 첫 주소에 한 번 담기고, 이후 HttpOnly·SameSite=Strict 쿠키로 바뀌며 주소창에서 사라집니다. 쿠키 없는 요청은 401 입니다. 예외는 웹 앱 manifest 와 아이콘뿐입니다(브라우저가 쿠키 없이 가져가며, 기록에 관한 내용은 없습니다). Host·Origin 헤더도 검사합니다.
|
|
116
116
|
- 서비스(`ari service install`)는 대신 토큰 하나를 `~/.config/agent-run-inspector/service.json`(본인만 읽기 가능)에 두고, 쿠키는 1년 유지됩니다. 토큰은 LaunchAgent 파일·프로세스 인자·로그 어디에도 남지 않습니다. `ari service uninstall` 이 지우고, 다시 설치하면 그대로 씁니다.
|
|
117
|
-
- 외부 요청은 업데이트 확인뿐입니다. CLI 는 하루에 한 번 GitHub(`api.github.com`, 이 프로젝트의 최신 릴리스)에 묻고, 더 새 버전이 있으면 터미널에 한 줄 알려 줍니다. Mac 앱은 6시간마다 같은 것을
|
|
117
|
+
- 외부 요청은 업데이트 확인뿐입니다. CLI 는 하루에 한 번 GitHub(`api.github.com`, 이 프로젝트의 최신 릴리스)에 묻고, 더 새 버전이 있으면 터미널에 한 줄 알려 줍니다. Mac 앱은 6시간마다 같은 것을 묻고, 새 버전을 제안하기 전에 npm(`registry.npmjs.org`)에 그 버전 패키지가 있는지 확인합니다. 사용자나 기록에 관한 정보는 보내지 않습니다. CLI 확인은 `--no-update-check` 나 `ARI_NO_UPDATE_CHECK=1` 로 끌 수 있습니다(`CI`·`NO_UPDATE_NOTIFIER` 가 있으면 저절로 꺼짐). 스크립트·아이콘은 패키지 안에 있고 글꼴은 시스템 글꼴을 씁니다: CDN·웹 글꼴·텔레메트리 없음.
|
|
118
118
|
- 업데이트는 Mac 앱에서 Update 를 눌렀을 때만 설치됩니다: `npm i -g agent-run-inspector`(최신 릴리스, 아직 릴리스 안 된 작업은 아님) 와 `ari service install` 을 실행하고, 결과를 `~/Library/Logs/agent-run-inspector-update.log` 에 남깁니다.
|
|
119
119
|
- 보안 문제를 찾았다면 [SECURITY.md](SECURITY.md) 를 봐 주세요.
|
|
120
120
|
- 읽기 전용: 기록 파일을 쓰거나 지우지 않습니다. 화면은 파일 경로를 보내지 않고, 파일은 불투명 id 로만 찾으며 알려진 기록 폴더 안이어야 합니다.
|
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Inside Orca the address opens as a new Orca browser tab (`orca tab create`). If
|
|
|
91
91
|
- **Agent Run Inspector.app** in `~/Applications`, added to the Dock (`--no-dock` to skip): its own window and Launchpad entry, signed in at every launch. It also puts an item in the menu bar (see [The menu bar](#the-menu-bar)). At login the app starts with only the menu bar item, and the window opens from the menu or the Dock. It is built on your Mac with the built-in `osacompile`, so there is nothing to download and no developer signing. If that fails, open the address in Chrome or Edge and choose Install instead.
|
|
92
92
|
- **A sign-in that lasts a year** for that address, so a bookmark works too. If a browser tab says "Signed out", run `ari open`.
|
|
93
93
|
|
|
94
|
-
**Updates**: the app checks the latest GitHub release every 6 hours. When there is a newer one, the menu bar panel shows an "Update to …" button and the right-click menu an "Update to …" item (otherwise "Check for Updates…"); the page header shows a badge too. Click it and the app installs the new version and reopens (about a minute). If that fails, it shows the commands to run: install the package again and run `ari service install` again, which restarts the service and the app on the new code. `ari service uninstall` removes the service, the app, its Dock icon and its login item. The log is `~/Library/Logs/agent-run-inspector.log`.
|
|
94
|
+
**Updates**: the app checks the latest GitHub release every 6 hours. When there is a newer one and npm already serves it, the menu bar panel shows an "Update to …" button and the right-click menu an "Update to …" item (otherwise "Check for Updates…"); the page header shows a badge too. Click it and the app installs the new version and reopens (about a minute; a failed install is tried twice more, 30 seconds apart). If that fails, it shows the commands to run: install the package again and run `ari service install` again, which restarts the service and the app on the new code. `ari service uninstall` removes the service, the app, its Dock icon and its login item. The log is `~/Library/Logs/agent-run-inspector.log`.
|
|
95
95
|
|
|
96
96
|
### The menu bar
|
|
97
97
|
|
|
@@ -114,7 +114,7 @@ Run logs can hold customer data and secrets, so nothing leaves your machine exce
|
|
|
114
114
|
- The server listens on `127.0.0.1` only.
|
|
115
115
|
- Each run makes a random token. The first address carries it once, then it becomes an HttpOnly, SameSite=Strict cookie and disappears from the address bar. Requests without the cookie get 401, except the web app manifest and its icons (browsers fetch them without cookies; they hold nothing about your logs). Host and Origin headers are checked.
|
|
116
116
|
- The service (`ari service install`) instead keeps one token in `~/.config/agent-run-inspector/service.json` (readable by you only), and its cookie lasts a year. The token is never in the LaunchAgent file, the process arguments or the log. `ari service uninstall` deletes it; installing again keeps it.
|
|
117
|
-
- Outside requests are update checks only. The CLI asks GitHub (`api.github.com`, the latest release of this project) once a day and prints a line in the terminal if there is a newer version. The Mac app asks the same every 6 hours. Neither sends anything about you or your logs. Turn the CLI check off with `--no-update-check` or `ARI_NO_UPDATE_CHECK=1` (also off when `CI` or `NO_UPDATE_NOTIFIER` is set). Scripts and icons ship in the package and text uses the system's own fonts: no CDN, web fonts or telemetry.
|
|
117
|
+
- Outside requests are update checks only. The CLI asks GitHub (`api.github.com`, the latest release of this project) once a day and prints a line in the terminal if there is a newer version. The Mac app asks the same every 6 hours, and before it offers a newer version it checks that npm (`registry.npmjs.org`) has that version's package. Neither sends anything about you or your logs. Turn the CLI check off with `--no-update-check` or `ARI_NO_UPDATE_CHECK=1` (also off when `CI` or `NO_UPDATE_NOTIFIER` is set). Scripts and icons ship in the package and text uses the system's own fonts: no CDN, web fonts or telemetry.
|
|
118
118
|
- Updates install only when you press Update in the Mac app: it runs `npm i -g agent-run-inspector` (the newest release, not unreleased work) and `ari service install`, and writes what happened to `~/Library/Logs/agent-run-inspector-update.log`.
|
|
119
119
|
- Found a security problem? See [SECURITY.md](SECURITY.md).
|
|
120
120
|
- Read-only: log files are never written or deleted. The screen never sends a file path; files are found by opaque ids and must stay inside the known log folders.
|
package/package.json
CHANGED
package/src/macos/app.js
CHANGED
|
@@ -145,6 +145,23 @@ function fetchLatest() {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
const shell = Application.currentApplication();
|
|
149
|
+
shell.includeStandardAdditions = true;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* True when npm already serves this version's package. A GitHub release comes a minute or two before npm has it:
|
|
153
|
+
* updating then fails (404) or reinstalls the old version. (curl: NSURLConnection's response ref crashes JXA.)
|
|
154
|
+
*/
|
|
155
|
+
function onNpm(v) {
|
|
156
|
+
if (!/^\d+\.\d+\.\d+$/.test(v || '')) return false;
|
|
157
|
+
try {
|
|
158
|
+
shell.doShellScript(`/usr/bin/curl -sfI -m 4 -o /dev/null https://registry.npmjs.org/agent-run-inspector/-/agent-run-inspector-${v}.tgz`);
|
|
159
|
+
return true;
|
|
160
|
+
} catch (e) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
148
165
|
function alert(title, text, buttons) {
|
|
149
166
|
if (panel) hidePanel();
|
|
150
167
|
$.NSApplication.sharedApplication.activateIgnoringOtherApps(true);
|
|
@@ -164,7 +181,10 @@ function startUpdate() {
|
|
|
164
181
|
`export PATH=${sh(plistValue('ARINodeBin'))}:"$PATH"`,
|
|
165
182
|
`LOG=${UPDATE_LOG.replace('~', '"$HOME"')}`,
|
|
166
183
|
`APP=${sh(app)}`,
|
|
167
|
-
|
|
184
|
+
': > "$LOG"; ok=',
|
|
185
|
+
// up to 3 tries, 30 s apart: npm can lag a moment behind the release, or the network blips
|
|
186
|
+
`for n in 1 2 3; do if { npm i -g ${INSTALL} && ari service install --no-open; } >> "$LOG" 2>&1; then ok=1; break; fi; [ $n = 3 ] || sleep 30; done`,
|
|
187
|
+
'if [ -n "$ok" ]; then',
|
|
168
188
|
' pkill -f "$APP/Contents/MacOS/applet"; sleep 1; open "$APP"', // the new app, with its window
|
|
169
189
|
`else /usr/bin/osascript -e ${sh(failed)}; fi`,
|
|
170
190
|
].join('\n');
|
|
@@ -182,9 +202,11 @@ function offerUpdate(v) {
|
|
|
182
202
|
|
|
183
203
|
function checkForUpdates(manual) {
|
|
184
204
|
const v = fetchLatest();
|
|
185
|
-
|
|
205
|
+
const ready = !isNewer(v, current()) || onNpm(v); // offer a newer version only once npm has it
|
|
206
|
+
if (v && ready) latest = v;
|
|
186
207
|
if (!manual) return;
|
|
187
208
|
if (!v) return alert('Could not check for updates', 'GitHub did not answer. Check the connection and try again.', ['OK']);
|
|
209
|
+
if (!ready) return alert(`Agent Run Inspector ${v} is almost ready`, 'It was just released and npm is still publishing it. Try again in a few minutes.', ['OK']);
|
|
188
210
|
if (isNewer(v, current())) return offerUpdate(v);
|
|
189
211
|
return alert('Agent Run Inspector is up to date', `Version ${current()} is the latest.`, ['OK']);
|
|
190
212
|
}
|