Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/fm-osc7501.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
# codex-cli >= 0.163.0 (openai/codex#52725, first released in
# rust-v0.163.0, verified 2026-11-01), and Grok >= 1.0.67 and Muse Code
# >= 1.4.11 (the lowest versions verified reporting on Rex,
# docs/verification/runtime-backends.md) send their own root records;
# docs/verification/runtime-backends.md), and Antigravity CLI >= 1.4.0
# (`agy changelog` dates its OSC 7501 reporting to 1.4.0; 1.5.15 seen
# writing app=antigravity records on herdr-core, 2026-11-23) send their
# own root records;
# a terminal keeps one root record per pane, so a firstmate record would
# only replace theirs. The probe runs --agent-bin; one of these
# harnesses whose version cannot be read counts as native, so no
Expand Down Expand Up @@ -262,6 +265,7 @@ osc_native() {
codex) floor=0.163.0 ;;
grok) floor=1.0.67 ;;
muse) floor=1.4.11 ;;
agy) floor=1.4.0 ;;
*) return 1 ;;
esac
ver=$(osc_probe_version "$2") || return 0
Expand Down
1 change: 1 addition & 0 deletions bin/fm-spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8013,6 +8013,7 @@ if [ "$RAW_LAUNCH" = 0 ]; then
case "$HARNESS" in
pi | pi-signed) OSC7501_AGENT_BIN=${PI_BIN:-} ;;
muse) OSC7501_AGENT_BIN=${MUSE_BIN:-} ;;
agy) OSC7501_AGENT_BIN=${AGY_BIN:-} ;;
*) OSC7501_AGENT_BIN=$HARNESS ;;
esac
else
Expand Down
2 changes: 2 additions & 0 deletions tests/fm-agy-harness.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ test_agy_launch_carries_the_brief_with_model_effort_and_autonomy() {
expect_code 0 "$rc" "agy spawn with a listed model should succeed"
launch=$(cat "$CASE_DIR/launch.log")
assert_contains "$launch" "$FAKEBIN_DIR/agy" "agy launch did not pin the resolved absolute binary"
assert_contains "$launch" "--agent-bin '$FAKEBIN_DIR/agy'" \
"agy OSC gate did not probe the resolved binary the launch runs"
assert_contains "$launch" "--prompt-interactive" "agy launch did not carry the brief via --prompt-interactive"
assert_contains "$launch" "--model 'gemini-3.8-flash-low'" "agy launch did not carry the requested model"
assert_contains "$launch" "--effort 'low'" "agy launch did not carry the requested effort"
Expand Down
36 changes: 36 additions & 0 deletions tests/fm-osc7501.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,41 @@ t_native_codex_threshold() {
pass "native gate: codex >= 0.163.0 or of unreadable version arms nothing, older codex keeps the generic reporter"
}

# Antigravity CLI added its own OSC 7501 records in 1.4.0 (`agy changelog`).
# Left to the generic reporter, a 1.4.0+ agy and the bridge take turns
# replacing the pane's root record (app=antigravity, then app=firstmate-agy):
# 1.4.0 arms nothing, 1.3.9 still gets the generic reporter, and an agy whose
# version cannot be read is treated as native.
t_native_agy_threshold() {
local d=$TMP_ROOT/nativeagy
mkhome "$d"; mkfake "$d" agy '1.4.0'
mkfake "$d/old" agy '1.3.9'
start_term "$d"
env "${CLEAN_UNSET[@]}" REX_BLOCK=b1 FM_OSC7501_TTY="$TERM_SLAVE" \
PATH="$d/old/bin:$d/bin:$PATH" bash "$SCRIPT" arm \
--task t27 --harness agy --backend rex --kind ship \
--state "$d/state" --config "$d/config" --agent-bin "$d/bin/agy"
sleep 0.3
assert_equals "" "$(cat "$d/cap" 2>/dev/null)" "native agy: terminal sees zero bytes despite an older PATH agy"
[ -z "$(ls "$d/state"/.osc7501watch-* 2>/dev/null)" ] || fail "native agy 1.4.0 armed a watcher despite an older PATH agy"
mkfake "$d" agy '1.3.9'
env "${CLEAN_UNSET[@]}" REX_BLOCK=b1 FM_OSC7501_TTY="$TERM_SLAVE" \
PATH="$d/bin:$PATH" bash "$SCRIPT" arm \
--task t27 --harness agy --backend rex --kind ship \
--state "$d/state" --config "$d/config" --agent-bin agy
local wpid
wpid=$(watcher_pid "$d/state") || fail "agy 1.3.9 armed no generic watcher"
mkfake "$d" agy 'agy dev build'
env "${CLEAN_UNSET[@]}" REX_BLOCK=b1 FM_OSC7501_TTY="$TERM_SLAVE" \
PATH="$d/bin:$PATH" bash "$SCRIPT" arm \
--task t27 --harness agy --backend rex --kind ship \
--state "$d/state" --config "$d/config" --agent-bin agy
wait_gone "$wpid" || fail "agy relaunch left the old generic reporter running"
[ -z "$(ls "$d/state"/.osc7501watch-* 2>/dev/null)" ] || fail "an agy with an unreadable version armed a watcher"
stop_term
pass "native gate: agy >= 1.4.0 or of unreadable version arms nothing, older agy keeps the generic reporter"
}

# --- shared root record --------------------------------------------------------

# A native writer and the bridge share one root record. Codex's own working
Expand Down Expand Up @@ -1189,6 +1224,7 @@ fm_test_run \
t_launch_without_agent_bin_skips \
t_inplace_upgrade_reprobes_native \
t_native_codex_threshold \
t_native_agy_threshold \
t_unknown_activity_leaves_native_root \
t_unknown_activity_keeps_record_honest \
t_final_record_with_unknown_activity \
Expand Down
Loading