mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 06:17:23 +01:00
* fix(deploy): install Chromium with the app's own Playwright; /api/health says whether pictures work Every picture on the box answered no-browser. The deploy installed Chromium with the runner's Playwright, which npm resolves from package.json's ranges (there is no package-lock.json), while the app is built from pnpm's lockfile: two versions, two Chromium revisions, and the app never found the one that was installed. The install now runs the Playwright the standalone ships, as the app user, and a failure's output stays in the deploy log. /api/health carries `pictures` (Playwright present, the browser path, ok), so a server that cannot photograph a page says so on the one line everyone reads. A missing Playwright is its own reason (no-playwright); the two places that word a missing browser treat it the same. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1 * fix(build): the standalone carries Playwright, so the box can take pictures at all /api/health read pictures.playwright=false after #1285: the standalone build never contained Playwright. Being in serverExternalPackages makes the bundler leave it alone; it does not make the tracer copy it. outputFileTracingIncludes now names it (and pnpm's real files under node_modules/.pnpm) for every route, and playwright moves from devDependencies to dependencies, which is what it is: a runtime need of the server. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1 * chore(control): regenerate control-states.generated.sh (awaiting_you was added to the source, not the output) The build's prebuild regenerates this file from the TypeScript states; main's copy lacked the awaiting_you state, so every local build left the tree dirty. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1 --------- Co-authored-by: Claude <noreply@anthropic.com>
70 lines
3.2 KiB
Bash
70 lines
3.2 KiB
Bash
#!/usr/bin/env bash
|
|
# GENERATED FILE — DO NOT EDIT BY HAND.
|
|
# Source of truth: src/lib/control-states.ts (STATE_DEFINITIONS).
|
|
# Regenerate: npx tsx scripts/generate-bash-state-vocab.ts
|
|
#
|
|
# Variables exposed:
|
|
# FC_STATE_KEYS — space-separated list of all state keys
|
|
# FC_LABEL_<KEY> — short human label (badge text)
|
|
# FC_DESCRIPTION_<KEY> — one-line WHY this state is true
|
|
# FC_COUNTER_CATEGORY_<KEY> — chip bucket: working|waiting|idle|offline
|
|
#
|
|
# Usage from bash:
|
|
# source "$(dirname "$0")/control-states.generated.sh"
|
|
# echo "$FC_LABEL_OFFLINE" # → "Offline"
|
|
# echo "$FC_DESCRIPTION_OPEN_IDLE" # → "Agent process detected …"
|
|
|
|
|
|
FC_STATE_KEYS='offline not_running recently_active tab_open open_idle working ready awaiting_you orchestration_ready closing completed'
|
|
|
|
FC_LABEL_OFFLINE='Offline'
|
|
FC_DESCRIPTION_OFFLINE='The builder hasn'\''t pushed fresh state for this project — we don'\''t know what'\''s happening right now.'
|
|
FC_COUNTER_CATEGORY_OFFLINE='offline'
|
|
|
|
FC_LABEL_NOT_RUNNING='Not running'
|
|
FC_DESCRIPTION_NOT_RUNNING='No agent process and no terminal tab detected for this project.'
|
|
FC_COUNTER_CATEGORY_NOT_RUNNING='idle'
|
|
|
|
FC_LABEL_RECENTLY_ACTIVE='Active recently'
|
|
FC_DESCRIPTION_RECENTLY_ACTIVE='No live agent process is visible to Loki, but a dispatch or run landed for this project recently — work likely happened in a terminal Loki can'\''t observe.'
|
|
FC_COUNTER_CATEGORY_RECENTLY_ACTIVE='idle'
|
|
|
|
FC_LABEL_TAB_OPEN='Tab open'
|
|
FC_DESCRIPTION_TAB_OPEN='Terminal workspace exists for this project but no agent process is running in it.'
|
|
FC_COUNTER_CATEGORY_TAB_OPEN='idle'
|
|
|
|
FC_LABEL_OPEN_IDLE='Agent idle'
|
|
FC_DESCRIPTION_OPEN_IDLE='Agent process detected but no recent lifecycle signal. It may be at a prompt, stalled, or simply quiet; Loki has no evidence that it asked you a question.'
|
|
FC_COUNTER_CATEGORY_OPEN_IDLE='idle'
|
|
|
|
FC_LABEL_WORKING='Working'
|
|
FC_DESCRIPTION_WORKING='Agent is mid-turn — actively reading files, calling tools, or writing.'
|
|
FC_COUNTER_CATEGORY_WORKING='working'
|
|
|
|
FC_LABEL_READY='Ready for next step'
|
|
FC_DESCRIPTION_READY='Stop hook fired recently — the agent finished a turn and is ready for the next instruction. The handoff lists the suggested next move.'
|
|
FC_COUNTER_CATEGORY_READY='waiting'
|
|
|
|
FC_LABEL_AWAITING_YOU='Waiting for you'
|
|
FC_DESCRIPTION_AWAITING_YOU='The agent stopped and handed control back — its session reports it is blocked on you. It will not continue until you reply.'
|
|
FC_COUNTER_CATEGORY_AWAITING_YOU='waiting'
|
|
|
|
FC_LABEL_ORCHESTRATION_READY='Ready for next step'
|
|
FC_DESCRIPTION_ORCHESTRATION_READY='Latest orchestration run completed and produced a result. Pick the next intent or accept the suggested next-best.'
|
|
FC_COUNTER_CATEGORY_ORCHESTRATION_READY='waiting'
|
|
|
|
FC_LABEL_CLOSING='Closing'
|
|
FC_DESCRIPTION_CLOSING='Closing hook fired — the agent process is shutting down.'
|
|
FC_COUNTER_CATEGORY_CLOSING='idle'
|
|
|
|
FC_LABEL_COMPLETED='Completed'
|
|
FC_DESCRIPTION_COMPLETED='Closed hook fired — the agent exited cleanly.'
|
|
FC_COUNTER_CATEGORY_COMPLETED='idle'
|
|
|
|
# Returns 0 if the generated file looks structurally sane,
|
|
# 1 if the FC_STATE_KEYS variable is missing or empty.
|
|
fc_state_vocab_sanity_check() {
|
|
[ -n "${FC_STATE_KEYS:-}" ] || return 1
|
|
return 0
|
|
}
|