@vibelord/lanes 1.2.0 → 1.3.0
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/package.json +1 -1
- package/payload/lanes/README.md +4 -3
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin/lanes +301 -45
- package/payload/lanes/container/lane +42 -1
- package/payload/lanes/container/lane-mcp +65 -6
- package/payload/lanes/container/lane_core.py +178 -0
- package/payload/lanes/docs/ARCHITECTURE.md +192 -20
- package/payload/lanes/docs/DESIGN.md +6 -3
- package/payload/lanes/docs/INSTALL.md +25 -8
- package/payload/lanes/docs/RUNBOOK.md +369 -8
- package/payload/lanes/docs/USERGUIDE.md +201 -25
- package/payload/lanes/holders.lock +5 -0
- package/payload/lanes/install/enable-docs.sh +78 -0
- package/payload/lanes/install/host-install.sh +39 -5
- package/payload/lanes/libexec/docs_store.py +995 -0
- package/payload/lanes/libexec/docsd.py +2010 -0
- package/payload/lanes/libexec/mdlite.py +575 -0
- package/payload/lanes/libexec/members.py +5 -0
- package/payload/lanes/libexec/notify.py +65 -5
- package/payload/lanes/libexec/sidebar.py +106 -13
- package/payload/lanes/libexec/statusd.py +97 -5
- package/payload/lanes/libexec/tokens.py +31 -9
- package/payload/lanes/libexec/update.py +94 -22
- package/payload/lanes/libexec/uploads.py +538 -0
- package/payload/lanes/systemd/lanes-docsd.service +29 -0
- package/payload/lanes/web/Caddyfile +24 -1
- package/payload/lanes/web/README.md +86 -8
- package/payload/lanes/web/browser.js +2 -4
- package/payload/lanes/web/docs.css +52 -0
- package/payload/lanes/web/docs.js +36 -0
- package/payload/lanes/web/mobile.js +3 -2
- package/payload/lanes/web/upload.css +17 -0
- package/payload/lanes/web/upload.js +84 -0
- package/payload/manifest.json +4 -3
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
# (sha256), terminfo, the catalog: a failure here leaves the installed release running exactly as it was;
|
|
9
9
|
# commit install/services.py --install: every unit, then current.previous, then the flip of `current` (W9 U1);
|
|
10
10
|
# post-commit libexec/update.py post-commit, from the tree just installed: daemon-reload, `lanes sync`, restart
|
|
11
|
-
# lanes-statusd, try-restart each optional service
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# the
|
|
11
|
+
# lanes-statusd, try-restart each optional service (right after lanes-docsd's, install/enable-docs.sh:
|
|
12
|
+
# the docs page's pinned Mermaid, a warning when it is skipped or refused, W10 W8), `lanes
|
|
13
|
+
# install-container` per container, `lanes reload-views`, `lanes ensure --if-layout-changed` — each step
|
|
14
|
+
# runs whatever the one before it returned (`lanes sync` exiting 1 — a board with an error — is a warning
|
|
15
|
+
# in the record, which leaves the result `ok`; never the end of the update).
|
|
15
16
|
# Every run is recorded in $LANES_STATE/update/last.json (DM-LANES-UPDATE-RECORD: result ok | partial | refused |
|
|
16
17
|
# failed, each phase and step with its exit status) and logged in full to update/last.log; the terminal or the journal
|
|
17
|
-
# gets one line per phase and step. A full install (no --update-only)
|
|
18
|
+
# gets one line per phase and step. A full install (no --update-only) records nothing; it runs enable-docs.sh right
|
|
19
|
+
# after lanes-docsd's restart, never fatally, and its summary names the Mermaid outcome.
|
|
18
20
|
# One install or update at a time: every run but --check first takes the run lock $LANES_STATE/update/.lock and holds
|
|
19
21
|
# it to its end (fd 9); a run that finds it held writes nothing — no log, no record — and exits 3.
|
|
20
22
|
# A full install enables lanes-update.timer with the other timers (plan W9 U3, LNS-91): `lanes update --timer`, 15 min
|
|
@@ -154,6 +156,15 @@ for command in python3 curl tar sha256sum infocmp tic install systemctl docker t
|
|
|
154
156
|
command -v "$command" >/dev/null 2>&1 || { echo "Missing prerequisite: $command (see docs/INSTALL.md)" >&2; exit 1; }
|
|
155
157
|
done
|
|
156
158
|
python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 9) else "Python 3.9+ is required")'
|
|
159
|
+
# --- docs store encryption at rest (W10 W5, LNS-106) ------------------------------------------------------------
|
|
160
|
+
# LANES_DOCS_AGE_RECIPIENT in lanes-docsd.service's drop-in encrypts each document's docs-store copy with `age -r`
|
|
161
|
+
# (default off; RUNBOOK "Docs service", encryption at rest). Set where no `age` binary is on PATH, every upload and
|
|
162
|
+
# publish would fail: refused here, before anything is installed, with libexec/docs_store.py's reason.
|
|
163
|
+
check_docs_age() {
|
|
164
|
+
python3 "$repo/libexec/docs_store.py" check-age || exit 1
|
|
165
|
+
}
|
|
166
|
+
check_docs_age
|
|
167
|
+
# --- end docs store encryption at rest -------------------------------------------------------------------------
|
|
157
168
|
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
|
158
169
|
if [ "$start" = 1 ]; then
|
|
159
170
|
systemctl --user show-environment >/dev/null
|
|
@@ -224,6 +235,7 @@ if [ "$update_only" = 1 ]; then
|
|
|
224
235
|
*) printf 'partial: the post-commit ended with exit %s (log %s)\n' "$status" "$log" >&3; exit 4 ;;
|
|
225
236
|
esac
|
|
226
237
|
fi
|
|
238
|
+
mermaid="not installed (--no-start) — sh $repo/install/enable-docs.sh installs it"
|
|
227
239
|
if [ "$start" = 1 ]; then
|
|
228
240
|
systemctl --user daemon-reload
|
|
229
241
|
# A failing sync (a board's container down, a registry it cannot read) is reported; the services still start.
|
|
@@ -236,11 +248,33 @@ if [ "$start" = 1 ]; then
|
|
|
236
248
|
# The enrolment service (libexec/enrold.py) runs the code of THIS install: enable, then (re)start it.
|
|
237
249
|
systemctl --user enable lanes-enrold.service
|
|
238
250
|
systemctl --user restart lanes-enrold.service
|
|
251
|
+
# The docs service (libexec/docsd.py, W10 W3) likewise; it refuses every request until `lanes enrol mode request`
|
|
252
|
+
# pins the Serve header check.
|
|
253
|
+
systemctl --user enable lanes-docsd.service
|
|
254
|
+
systemctl --user restart lanes-docsd.service
|
|
255
|
+
# --- the docs page's pinned Mermaid (W10 W8, LNS-109) ---------------------------------------------------------
|
|
256
|
+
# install/enable-docs.sh (RUNBOOK "Mermaid pin"), never fatal: the install goes on whatever it exits, and the
|
|
257
|
+
# summary below names the outcome — 0 ok (installed, or already present with the pinned digest: no download),
|
|
258
|
+
# 1 skipped (a prerequisite or the download), 3 refused (no valid pin, a digest mismatch: nothing installed), any
|
|
259
|
+
# other status failed. An update (--update-only) runs it as a post-commit step (libexec/update.py DOCS_STEP).
|
|
260
|
+
mermaid_rc=0
|
|
261
|
+
mermaid_said=$(sh "$repo/install/enable-docs.sh" 2>&1 9>&-) || mermaid_rc=$?
|
|
262
|
+
[ -z "$mermaid_said" ] || printf '%s\n' "$mermaid_said"
|
|
263
|
+
mermaid_reason=$(printf '%s\n' "$mermaid_said" | awk 'NF { line = $0 } END { print line }')
|
|
264
|
+
[ -n "$mermaid_reason" ] || mermaid_reason="exit $mermaid_rc, no output"
|
|
265
|
+
case $mermaid_rc in
|
|
266
|
+
0) mermaid='ok' ;;
|
|
267
|
+
1) mermaid="skipped ($mermaid_reason) — diagrams show as source until sh $repo/install/enable-docs.sh succeeds" ;;
|
|
268
|
+
3) mermaid="refused ($mermaid_reason) — nothing was installed; see RUNBOOK \"Mermaid pin\"" ;;
|
|
269
|
+
*) mermaid="failed (exit $mermaid_rc: $mermaid_reason) — sh $repo/install/enable-docs.sh" ;;
|
|
270
|
+
esac
|
|
271
|
+
# --- end the docs page's pinned Mermaid -----------------------------------------------------------------------
|
|
239
272
|
# A running web frontend reads the Caddyfile of the tree it was started from; an npm update stages a new tree,
|
|
240
273
|
# so a reload would keep the old routes (/enrol/ included): restart it, only when it runs. Clients reconnect.
|
|
241
274
|
systemctl --user try-restart lanes-mobile.service
|
|
242
275
|
fi
|
|
243
276
|
printf '\nServer installed from %s\n' "$repo"
|
|
277
|
+
echo "Mermaid for the docs page: $mermaid"
|
|
244
278
|
echo 'Configure boards in ~/.config/lanes/workspaces/; see workspaces.example/README.md.'
|
|
245
279
|
echo 'Next: lanes install-container CONTAINER; lanes sync; lanes doctor'
|
|
246
280
|
echo 'Web access and host cleanup/guard timers remain opt-in; see docs/INSTALL.md.'
|