@addai/node 0.30.4 → 0.30.5
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.
|
@@ -171,10 +171,33 @@ function wrapperScript(realBrowser, extensionDir) {
|
|
|
171
171
|
const seed = extensionDir
|
|
172
172
|
? `[ -f ${exports.SEED_SCRIPT} ] && (node ${exports.SEED_SCRIPT} >/dev/null 2>&1 &)\n`
|
|
173
173
|
: '';
|
|
174
|
+
// ⚠️ A lock that now outlives the machine that made it.
|
|
175
|
+
//
|
|
176
|
+
// Chrome writes SingletonLock as a symlink to "<hostname>-<pid>" and refuses
|
|
177
|
+
// to open a profile locked by somebody else. That was harmless while the
|
|
178
|
+
// profile lived in the container's writable layer, because a rebuild
|
|
179
|
+
// destroyed the lock along with everything else. Putting the profile on the
|
|
180
|
+
// mount to make it SURVIVE means the lock survives too — and a container's
|
|
181
|
+
// hostname is its id, which changes every rebuild. So the next container
|
|
182
|
+
// finds a lock owned by a machine that no longer exists and shows
|
|
183
|
+
//
|
|
184
|
+
// The profile appears to be in use by another Google Chrome process
|
|
185
|
+
// (674) on another computer (7fd0c26e0fdf)
|
|
186
|
+
//
|
|
187
|
+
// instead of the page it was asked for. Persistence brought this with it;
|
|
188
|
+
// it is the cost of the same change, and it needed paying here.
|
|
189
|
+
//
|
|
190
|
+
// Guarded on nothing being alive, which is what makes this safe rather than
|
|
191
|
+
// reckless: two Chromes on one profile corrupts it. If one IS running, the
|
|
192
|
+
// lock is real and must stand — the singleton then does its actual job and
|
|
193
|
+
// hands the url to the running browser, which is the behaviour we want.
|
|
194
|
+
const unlock = `pgrep -f '${realBrowser}' >/dev/null 2>&1 || `
|
|
195
|
+
+ `rm -f ${PROFILE_DIR}/SingletonLock ${PROFILE_DIR}/SingletonCookie `
|
|
196
|
+
+ `${PROFILE_DIR}/SingletonSocket\n`;
|
|
174
197
|
return `#!/bin/sh
|
|
175
198
|
# Written by @addai/node so +Ai Learn can watch this browser${extensionDir ? ' and the +Ai Vault can fill logins in it' : ''}.
|
|
176
199
|
# Removing it costs you the page detail in a lesson${extensionDir ? ' and vault autofill' : ''} and nothing else.
|
|
177
|
-
${seed}exec ${realBrowser} --user-data-dir=${PROFILE_DIR} --remote-debugging-port=${exports.DEBUG_PORT} --remote-debugging-address=127.0.0.1${FIRST_RUN}${ext} "$@"
|
|
200
|
+
${unlock}${seed}exec ${realBrowser} --user-data-dir=${PROFILE_DIR} --remote-debugging-port=${exports.DEBUG_PORT} --remote-debugging-address=127.0.0.1${FIRST_RUN}${ext} "$@"
|
|
178
201
|
`;
|
|
179
202
|
}
|
|
180
203
|
/** Is what is on disk already what we would write? Exact match, so a change to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addai/node",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.5",
|
|
4
4
|
"description": "Daemon that pairs a machine with your +Ai account and runs Claude / Codex / Kimi / Gemini agents on its behalf. Reachable via Supabase from Vault, Entity Studio, or any other +Ai surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|