glidercli 0.4.37 → 0.4.38
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
CHANGED
|
@@ -131,7 +131,7 @@ glider loop hn-scrape.yaml
|
|
|
131
131
|
|
|
132
132
|
| Output | Path |
|
|
133
133
|
|--------|------|
|
|
134
|
-
| LaunchAgent daemon log |
|
|
134
|
+
| LaunchAgent daemon log | stderr, or optional sink via `GLIDER_AGLOGS_NAMESPACE` + `GLIDER_AGLOG_BIN` |
|
|
135
135
|
| domain index | `~/.glider/config/domains.json` |
|
|
136
136
|
| per-host intel | `~/.glider/warch/HOST/glider.json` |
|
|
137
137
|
| explore cache | `~/.glider/bexplore/HOST/` |
|
package/bin/glider.js
CHANGED
|
@@ -1953,7 +1953,11 @@ async function cmdInstallDaemon() {
|
|
|
1953
1953
|
if (jsonOutput) emitJson(true, { running: true, port: PORT, pid: record.pid, childPid: record.childPid, alreadyRunning });
|
|
1954
1954
|
log.ok(alreadyRunning ? 'Daemon already running' : 'Daemon started');
|
|
1955
1955
|
log.info('Relay will auto-restart on crash');
|
|
1956
|
-
log.info(
|
|
1956
|
+
log.info(
|
|
1957
|
+
process.env.GLIDER_AGLOGS_NAMESPACE
|
|
1958
|
+
? `Logs: log adapter namespace ${process.env.GLIDER_AGLOGS_NAMESPACE}`
|
|
1959
|
+
: 'Logs: daemon stderr (optional GLIDER_AGLOGS_NAMESPACE + GLIDER_AGLOG_BIN)',
|
|
1960
|
+
);
|
|
1957
1961
|
log.info(`PID: ${record.pid}`);
|
|
1958
1962
|
return;
|
|
1959
1963
|
}
|
package/docs/setup.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"registry_base": "$GLIDER",
|
|
44
44
|
"resolve": "glider resolve <url> --json",
|
|
45
45
|
"browser": "$GLIDER/config/browser.json",
|
|
46
|
-
"daemon_log": "
|
|
46
|
+
"daemon_log": "daemon stderr; optional structured sink when GLIDER_AGLOGS_NAMESPACE + GLIDER_AGLOG_BIN are set",
|
|
47
47
|
"cookies_jar": "$GLIDER/cookies/<host>/header.txt",
|
|
48
48
|
"cookies_index": "$GLIDER/cookies/domains.json",
|
|
49
49
|
"cookie_jar_verb": "glider cookie-jar sync|read|list|add|rm|rebuild",
|
package/lib/glider-daemon.sh
CHANGED
|
@@ -7,8 +7,9 @@ DAEMON_PATH="$SCRIPT_DIR/glider-daemon.sh"
|
|
|
7
7
|
BSERVE="$SCRIPT_DIR/bserve.js"
|
|
8
8
|
LOG_DIR="${GLIDER:-$HOME/.glider}"
|
|
9
9
|
PORT="${GLIDER_PORT:-${RELAY_PORT:-19988}}"
|
|
10
|
+
# Optional structured log sink. Both env vars required; no hardcoded host paths.
|
|
10
11
|
AGLOG_NAMESPACE="${GLIDER_AGLOGS_NAMESPACE:-}"
|
|
11
|
-
AGLOG_BIN="${GLIDER_AGLOG_BIN
|
|
12
|
+
AGLOG_BIN="${GLIDER_AGLOG_BIN:-}"
|
|
12
13
|
|
|
13
14
|
case "$PORT" in
|
|
14
15
|
''|*[!0-9]*|0|0*) echo "glider-daemon: invalid relay port: $PORT" >&2; exit 2 ;;
|
|
@@ -45,8 +46,12 @@ management_lock_owned=0
|
|
|
45
46
|
|
|
46
47
|
mkdir -p "$LOG_DIR"
|
|
47
48
|
|
|
49
|
+
if [ -n "$AGLOG_NAMESPACE" ] && [ -z "$AGLOG_BIN" ]; then
|
|
50
|
+
echo "glider-daemon: GLIDER_AGLOGS_NAMESPACE set but GLIDER_AGLOG_BIN is empty" >&2
|
|
51
|
+
exit 78
|
|
52
|
+
fi
|
|
48
53
|
if [ -n "$AGLOG_NAMESPACE" ] && [ ! -x "$AGLOG_BIN" ]; then
|
|
49
|
-
echo "glider-daemon:
|
|
54
|
+
echo "glider-daemon: log adapter is unavailable: $AGLOG_BIN" >&2
|
|
50
55
|
exit 78
|
|
51
56
|
fi
|
|
52
57
|
|
|
@@ -470,7 +475,7 @@ write_pid_record
|
|
|
470
475
|
initial_handoff=1
|
|
471
476
|
while true; do
|
|
472
477
|
emit_log_line "[$(date)] Starting relay on port $PORT..." || {
|
|
473
|
-
echo "glider-daemon:
|
|
478
|
+
echo "glider-daemon: log adapter start event failed" >&2
|
|
474
479
|
exit 74
|
|
475
480
|
}
|
|
476
481
|
|
|
@@ -533,7 +538,7 @@ while true; do
|
|
|
533
538
|
write_pid_record
|
|
534
539
|
|
|
535
540
|
emit_log_line "[$(date)] Relay exited with code $EXIT_CODE, restarting in 2s..." || {
|
|
536
|
-
echo "glider-daemon:
|
|
541
|
+
echo "glider-daemon: log adapter restart event failed" >&2
|
|
537
542
|
exit 74
|
|
538
543
|
}
|
|
539
544
|
sleep 2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glidercli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.38",
|
|
4
4
|
"description": "Browser automation CLI. Control a configured Chromium browser through an extension CDP relay, run YAML tasks, and execute bounded autonomous loops.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"glider": "bin/glider.js"
|