mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 18:28:29 +01:00
- beacon.py: PyQt6 desktop overlay for session stops — countdown auto-continue, Whisper STT voice input, session summary display, confirm popup for destructive commands - agent-hook-lib.sh: shared bash utilities — resolve_tab (pane-file fast path + zellij process tree fallback), inject_prompt, get_prompt, play_sound - agent-hook-bridge.sh: stop/notification handler — writes /tmp sentinel files, launches beacon, injects chosen prompt back into the zellij tab; respects prefer_browser_ready_ui to skip native popup when Cockpit is running - run-codex-task.sh: headless Codex executor that fires agent-hook-bridge stop on exit, bringing Codex into the lifecycle contract for orchestration-dispatched tasks - smoke-beacon-stop.sh: integration smoke test for the full beacon stop chain - sync-agent-runtime-config.py: copies claude-prompts.json → agent-prompts.json, claude-projects.conf → agent-projects.conf for agent-agnostic naming - check-agent-runtime.sh, check-design-system.sh: dev diagnostic utilities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
789 B
Bash
Executable File
39 lines
789 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
if [ "$#" -lt 3 ]; then
|
|
echo "usage: run-codex-task.sh <tab> <project-dir> <prompt-file> [model]" >&2
|
|
exit 2
|
|
fi
|
|
|
|
TAB_NAME="$1"
|
|
PROJECT_DIR="$2"
|
|
PROMPT_FILE="$3"
|
|
MODEL="${4:-gpt-5.4}"
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
|
SESSION_DIR="${AGENT_SESSIONS_DIR:-$HOME/.claude/sessions}"
|
|
|
|
mkdir -p "$SESSION_DIR"
|
|
|
|
source "$HOME/.bashrc" >/dev/null 2>&1 || true
|
|
|
|
cd "$PROJECT_DIR"
|
|
|
|
status=0
|
|
codex exec \
|
|
--model "$MODEL" \
|
|
--cd "$PROJECT_DIR" \
|
|
--sandbox workspace-write \
|
|
--ask-for-approval never \
|
|
--add-dir "$SESSION_DIR" \
|
|
- < "$PROMPT_FILE" || status=$?
|
|
|
|
rm -f "$PROMPT_FILE"
|
|
|
|
printf '%s' "$PROJECT_DIR" \
|
|
| jq -Rs '{cwd:.}' \
|
|
| AGENT_TAB_NAME="$TAB_NAME" "$ROOT/scripts/agent-hook-bridge.sh" stop || true
|
|
|
|
exit "$status"
|