diff --git a/sdk/cloud/deploy/fly/box.sh b/sdk/cloud/deploy/fly/box.sh index 202d298b..9711e2ce 100755 --- a/sdk/cloud/deploy/fly/box.sh +++ b/sdk/cloud/deploy/fly/box.sh @@ -132,7 +132,11 @@ move) # Sprite itself straight to the new box's file API (it streams to disk), never through this Mac (12-03: through # sprite exec it came at about 4 MB/s), then unpacked there a=$(app "$NAME") - # a try before this one may have left part of an upload + # a home that arrived whole in a try before this one is unpacked, not sent again (a .part is only part of one) + healthy "$NAME" > /dev/null || true + if fly ssh console -a "$a" -q -C "test -s /home/raea/work/.move/home.tar.zst" > /dev/null 2>&1; then + echo "fly box: $NAME's home arrived in a try before this one: unpacking it" + else fly ssh console -a "$a" -q -C "rm -rf /home/raea/work/.move" > /dev/null 2>&1 || true echo "fly box: sending $NAME's home from its Sprite to $(url "$NAME")" # --no-stdin: a dropped link to the Sprite reconnects to the same session (12-03: all four copies lost theirs at @@ -160,7 +164,12 @@ except Exception: print(-1)') wait "$sending" grep -v 'bind: warning' "$CONF/boxes/$NAME.move.log" grep -q SENT-WHOLE "$CONF/boxes/$NAME.move.log" || { echo "fly box: $NAME's home didn't arrive whole (above); nothing unpacked, run move again"; exit 1; } - fly ssh console -a "$a" -q -C "sh -c 'cd /home/raea && zstd -dqc work/.move/home.tar.zst | tar -xf - && rm -rf work/.move && chown -R raea:raea /home/raea && du -sh /home/raea'" + fi + # unpacked there, saying so every 500 MB (a silent unpack of 26 GB looked stalled: 12-03, raea-4 and raea-6) + # run from inside the work folder, which the box's idle stop sees as work going on (server/idle.ts); the box woken + # first, as fly ssh doesn't start a stopped Machine + healthy "$NAME" > /dev/null || true + fly ssh console -a "$a" -q -C "sh -c 'cd /home/raea/work/.move && zstd -dqc home.tar.zst | tar -C /home/raea -xf - --checkpoint=50000 --checkpoint-action=echo=\"fly box: $NAME: %{}T unpacked\" && cd /home/raea && rm -rf work/.move && chown -R raea:raea /home/raea && du -sh /home/raea'" # its own settings on its disk too, as a Sprite kept them fly ssh console -a "$a" -q -C "sh -c 'umask 077; cat > /home/raea/.raea-cloud.env && chown raea:raea /home/raea/.raea-cloud.env'" < "$f" # RAEA_BOX_REGISTER=0: copied, but raea cloud still sends work to the Sprite until deploy/fly/box.sh register NAME diff --git a/sdk/cloud/server/main.ts b/sdk/cloud/server/main.ts index 760c8100..10d7fdd3 100644 --- a/sdk/cloud/server/main.ts +++ b/sdk/cloud/server/main.ts @@ -240,7 +240,9 @@ async function shell(req: IncomingMessage, res: ServerResponse) { const server = createServer(async (req, res) => { const url = new URL(req.url ?? "/", "http://raea-cloud") // a request (other than a platform's health check) keeps an idle box up (idle.ts) - if (url.pathname !== "/healthz") idle?.touch() + // a request is the box at work from when it starts until it ends: a 19-minute upload counted only its start, and the + // box stopped as idle the moment it ended (12-03) + if (url.pathname !== "/healthz") (idle?.touch(), res.on("close", () => idle?.touch())) if (url.pathname === "/healthz") return res.writeHead(200, { "content-type": "text/plain" }).end("ok") // the critic an agent's shell asks (critic.ts): its own session's token, not the box's if (url.pathname === "/host/judge" && req.method === "POST") { diff --git a/sdk/guides/craft/motion/words.md b/sdk/guides/craft/motion/words.md index c0365b12..741ef896 100644 --- a/sdk/guides/craft/motion/words.md +++ b/sdk/guides/craft/motion/words.md @@ -16,6 +16,11 @@ - Size captions at 60 px or more at 1080 wide (scale with the width), with at least 3:1 contrast against the pixels behind them. Keep them in one place unless a move means something, and keep them off cards, logos, burned-in text and the face (`motion/placement`). +- To put a caption or hook in a box that hugs each line, as TikTok draws its text, use `HugText` from + `raea/hug-text`: ``. Each line gets a fill as + wide as its words, with one rounded shape around them all. You give the lines, so you decide where each breaks + (a caption's come from its word groups). Its emoji draw in colour on any machine, as `EmojiText` from the same + module also does. The box is allowed, never required. - Mark each caption: `data-raea-role="caption"` on the element holding its words. A layered export (`raea export capcut`, `raea export xml`; `motion/delivery`) then puts the captions on a track of their own, styled as they're drawn, and writes their words as an .srt beside them; unmarked, they're part of the graphics. diff --git a/skills b/skills index ff03a879..6c71231e 160000 --- a/skills +++ b/skills @@ -1 +1 @@ -Subproject commit ff03a8794afb8e73fe5a632f5a10b56fe13b5c21 +Subproject commit 6c71231e9728a2abc2ef3c896990834d4c9a4f19