A step behind the operator's own login ended in Loki listing fields to
type. On 2026-10-11 npm's trusted-publisher form took three rounds of chat
and a phone screenshot, and still hid two traps: an autofilled "Bitbaum"
that cannot be edited once saved, and "Allow npm publish" off by default.
Now Fleet Runner opens the page in Loki's own browser window
(persist:loki-browser, so a sign-in sticks), fills it, outlines the final
button and stops. The operator presses it and confirms any passkey.
- config/browser-tasks.ts: recipes are the SSOT and the only thing a
queued row can name — no raw url or free-form steps reach the runner.
First recipe: npm-trusted-publisher.
- lib/browser-fill.ts: one self-contained filler, found by visible label,
React-safe value setter, idempotent, never presses the hand-off button.
- browser_task pending command, channel "local"; validated on both sides.
- Loki chat tool fill_web_form and MCP tool loki_browser_task (loki.act).
- Fleet Runner 0.8.41.
Tests: scripts/test/browser-fill.ts drives a React form built like npm's in
Chromium, against a runner-style bundle and the actual Fleet Runner build
(35/35; mutation-checked: a plain .value set fails 3). mcp-server 75/75,
desktop-command-validator 17/17.
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
Co-authored-by: Claude <noreply@anthropic.com>
* feat(openclaw): the Telegram agent reads screenshots, photos and videos
The Telegram agent is OpenClaw on bitbaum, and OpenClaw already describes
inbound media before the chat model reads the turn — but on defaults that
cut every description at 500 characters and read one attachment per
message. A screenshot lost most of its text; an album was read as its
first picture; video had a one-line "Describe the video." prompt.
- scripts/openclaw/media-understanding.json: versioned tools.media.image
and tools.media.video blocks (Gemini; screenshots transcribed verbatim,
albums read whole; videos returned as transcript + visuals + claims +
authenticity signs so the agent can argue about whether a clip holds up).
tools.media.audio is deliberately untouched — voice notes already work.
- scripts/openclaw/install-media-understanding.sh: the only way it reaches
the box. Refuses without a Gemini key, writes through OpenClaw's own
schema-validating `config set`, restarts the gateway, then proves an
image (and, where ffmpeg exists, a video) is actually described.
- scripts/test/openclaw-media-config.ts: pins the limits and the audio
hands-off rule.
Validated against openclaw@2026.4.23's schema locally. Not yet applied to
the box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD
* refactor(actions): share the decision and the enqueue report; let a turn be read-only
Groundwork for the MCP server, so it calls the same code the chat seams do
instead of a copy of it:
- lib/actions/decide-action.ts: approve/reject one draft, lifted out of
POST /api/actions/[id]/decision (which now calls it; wire shape unchanged).
- lib/actions/enqueue-report.ts: what an enqueue outcome may truthfully be
called (auto-approved / awaiting-approval / deduped), lifted out of
POST /api/actions/propose (wire shape unchanged).
- config/orangecat.ts: the OrangeCat origin and OAuth issuer in a DB-free
module; Auth.js and the identity bridge read the issuer from here instead
of each re-deriving it.
- askLoki / runLokiTurn take `readOnly`: the tool loop drops its propose
tools and the OpenClaw gateway fallback is skipped, so a caller granted
conversation but not action cannot get Loki to act by asking.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD
* feat(mcp): a remote MCP server so AI apps can message Loki and have it act
POST /api/mcp speaks MCP Streamable HTTP (stateless JSON-RPC 2.0; protocol
2025-11-25 / 2025-06-18 / 2025-03-26). claude.ai and ChatGPT connectors,
Claude Code and Cursor can ask Loki, list the approval queue and projects,
dispatch work, book appointments and decide queued actions.
Auth: a ck_* agent token (both scopes), or an OrangeCat RS256 access token
verified with node:crypto against the issuer's JWKS — iss, aud (must be the
Loki resource URL, never a client id), exp. `sub` maps to the Loki user via
orangecatActorId; an unlinked actor gets the sign-in step, not a 500. A
missing or bad token is a 401 whose WWW-Authenticate points at the RFC 9728
metadata served at /.well-known/oauth-protected-resource(/api/mcp).
Scopes loki.chat / loki.act and the tool map are SSOT in src/config/mcp.ts.
Act tools go through injectPrompt, enqueueAction and decideAction — the
functions the Telegram skill's routes call — so the approval queue gates
them exactly as it does there. Both paths are excluded from the session
middleware (proxy.ts, with the reason), registered in api-route-auth and
the demo sandbox. Docs: docs/development/mcp.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD
* fix(openclaw): match the installer's smoke output with a here-string, not a pipe
printf | grep -q can report a miss on a match under pipefail (grep exits,
the writer takes SIGPIPE). no-grep-q-in-a-pipe caught it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD
---------
Co-authored-by: Claude <noreply@anthropic.com>