Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(agents): Avibe Agent E2E acceptance fixes (#2363)

Call Whitef39f9cdab2cc
diff --git a/config/platform_registry.py b/config/platform_registry.py
index 035c05016..174f16238 100644
--- a/config/platform_registry.py
+++ b/config/platform_registry.py
@@ -314,8 +314,8 @@ PLATFORM_REGISTRY: dict[str, PlatformDescriptor] = {
supports_quick_replies=True,
supports_message_editing=True,
markdown_upload_returns_message_id=True,
- supports_typing_indicator=True,
- supports_reaction_indicator=True,
+ # ``AvibeBot`` shows neither typing nor reactions, so the ack message is the
+ # indicator; declaring them made every turn try both and then downgrade.
),
),
}
diff --git a/core/agent_core/agent/recovery.py b/core/agent_core/agent/recovery.py
index 85f9a72c0..22725e11f 100644
--- a/core/agent_core/agent/recovery.py
+++ b/core/agent_core/agent/recovery.py
@@ -15,10 +15,13 @@ from core.agent_core.harness.store import ContextEntry, TranscriptStore
from core.agent_core.messages import ToolCallBlock, ToolResultMessage, text
from core.agent_core.tools.base import JobHost, JobStatus, ToolResult
-RecoveryRenderer = Callable[[ToolCallBlock, str, JobStatus, Optional[str]], Awaitable[ToolResult]]
+#: ``None`` means the job holds no result for the call (it never ran, or ended for an unrecorded reason).
+RecoveryRenderer = Callable[[ToolCallBlock, str, JobStatus, Optional[str]], Awaitable[Optional[ToolResult]]]
# recovery.md T2: no job evidence can establish whether a file mutation ran.
UNRECORDED_EFFECT = "[tool call interrupted; it may or may not have completed; re-read the file before continuing]"
+#: ``details`` key on every result T2 commits: the call's run ended before the tool returned one.
+RECOVERED = "recovered"
async def settle_open_calls(
@@ -41,25 +44,27 @@ async def settle_open_calls(
second recovery or Agent.run for that Session is not permitted.
Without job state, the result explicitly leaves the effect uncertain.
The adapter settles the interrupted Turn after this step; no tool or model
- is invoked and only a new user input starts another Turn (T4).
+ is invoked and only a new user input starts another Turn (T4). The adapter
+ also runs it when a run ends without completing (a Stop), so the calls that
+ run left open carry their jobs' recorded reason at once.
"""
committed: list[ContextEntry] = []
rows = list(await store.load(session_id))
for owner, call in open_tool_calls(rows):
job_id = job_ids.get((owner.session_id, call.id))
message = interrupted_result(call)
- details = {}
+ details = {RECOVERED: True}
if job_id is None:
message = ToolResultMessage(call.id, call.name, (text(UNRECORDED_EFFECT),), is_error=True)
else:
status = jobs.status(job_id)
details["job_id"] = job_id
- if status.state in {"running", "exited"}:
- watch_id = await jobs.hand_over(job_id) if status.state == "running" else None
- result = await render_result(deepcopy(call), job_id, status, watch_id)
+ watch_id = await jobs.hand_over(job_id) if status.state == "running" else None
+ result = await render_result(deepcopy(call), job_id, status, watch_id)
+ if result is not None:
message = ToolResultMessage(call.id, call.name, result.content, result.is_error)
details.update(deepcopy(dict(result.details)))
- details["job_id"] = job_id
+ details.update({RECOVERED: True, "job_id": job_id})
if watch_id is not None:
details["watch_id"] = watch_id
if status.state == "exited":
diff --git a/core/agent_core/agent/scratch.py b/core/agent_core/agent/scratch.py
index b398da3be..2115bf3ef 100644
--- a/core/agent_core/agent/scratch.py
+++ b/core/agent_core/agent/scratch.py
@@ -25,7 +25,7 @@ from typing import Any, Mapping, Optional
from core.agent_core.tools.args import ToolInputError, error_result, str_arg, text_result
from core.agent_core.tools.base import ToolResult
-from core.agent_core.tools.edit import MAX_EDIT_BYTES, _edits_arg, prepare_edit_arguments
+from core.agent_core.tools.edit import MAX_EDIT_BYTES, _edits_arg, edit_summary, prepare_edit_arguments
from core.agent_core.tools.edit_diff import EditError, ResultTooLarge, apply_edits
from core.agent_core.tools.text import decode_file, encode_file
@@ -99,7 +99,7 @@ class ScratchRoot:
return error_result(f"Could not edit file: {path}. It is not a regular file.")
if len(raw) > MAX_EDIT_BYTES:
return error_result(f"File {path} is over the edit limit. Write it again instead.")
- new_text, _, _ = apply_edits(decode_file(raw), edits, path, max_result_chars=MAX_EDIT_BYTES)
+ new_text, _, _, counts = apply_edits(decode_file(raw), edits, path, max_result_chars=MAX_EDIT_BYTES)
self._publish(name, encode_file(new_text), expected=identity)
except EditError as exc:
return error_result(str(exc))
@@ -109,7 +109,7 @@ class ScratchRoot:
return error_result(f"Could not edit file: {path}. It changed while the edit was being applied; read it again.")
except OSError as exc:
return error_result(f"Could not edit file: {path}. {os.strerror(exc.errno) if exc.errno else exc}.")
- return text_result(f"Successfully replaced {len(edits)} block(s) in {path}.")
+ return text_result(edit_summary(path, edits, counts))
# --- descriptor-relative steps ------------------------------------------------------------
diff --git a/core/agent_core/tools/bash.py b/core/agent_core/tools/bash.py
index 051a758f8..3ed8ff5ed 100644
--- a/core/agent_core/tools/bash.py
+++ b/core/agent_core/tools/bash.py
@@ -111,12 +111,16 @@ def _timed_out_line(timeout_s: float) -> str:
return f"Command timed out after {format_number(timeout_s)} seconds"
+#: Avibe change to Pi's ``Command aborted``: an abort is the user's Stop, and the model should know who ended it.
+ABORTED_LINE = "Stopped by the user; the command was terminated."
+
+
def _stopped_line(reason: Optional[str], timeout_s: Optional[float]) -> Optional[str]:
- """Pi's status line for a job someone stopped, from the reason recorded when it was stopped."""
+ """The status line for a job someone stopped, from the reason recorded when it was stopped."""
if reason == STOP_TIMEOUT and timeout_s is not None:
return _timed_out_line(timeout_s)
if reason == STOP_ABORTED:
- return "Command aborted"
+ return ABORTED_LINE
return None
@@ -138,25 +142,36 @@ async def handover_result(output: JobOutput, watch_id: str) -> ToolResult:
return text_result("\n".join(lines), details={**output.details(truncation), "watch_id": watch_id})
-async def settle_bash_call(jobs: LocalJobHost, session_id: str, tool_call_id: str) -> Optional[ToolResult]:
- """The durable result for a ``bash`` call left open by a crash (``recovery.md``).
+async def recovered_result(
+ jobs: LocalJobHost, job_id: str, status: JobStatus, watch_id: Optional[str]
+) -> Optional[ToolResult]:
+ """The result of a ``bash`` call whose run ended before it committed one (``recovery.md`` T2).
- A finished job gets its final output, a job stopped at its deadline or by an
- abort gets that result, and a running one is handed to Watch. ``None`` means
- the job is gone for another reason, never ran, or does not exist: the caller
- commits the synthetic interrupted result.
+ The one renderer for a crash, a restart, and a Stop: a job handed to ``watch_id``
+ gets the hand-over result, a finished job its final output, and a job stopped at
+ its deadline or by an abort that result. ``None`` means the job is gone for
+ another reason or never ran: the caller commits the synthetic interrupted result.
"""
+ output = JobOutput(jobs, job_id)
+ if watch_id is not None:
+ return await handover_result(output, watch_id)
+ if status.state == "exited":
+ return await final_result(output, status)
+ if status.state != "gone":
+ return None
+ line = _stopped_line(jobs.stop_reason(job_id), jobs.meta(job_id).get("timeout_s"))
+ return await stopped_result(output, line) if line else None
+
+
+async def settle_bash_call(jobs: LocalJobHost, session_id: str, tool_call_id: str) -> Optional[ToolResult]:
+ """The durable result for a ``bash`` call left open by a crash; a running job is handed to Watch first."""
job_id = jobs.find_job(session_id, tool_call_id)
if job_id is None:
return None
await jobs.enforce_deadline(job_id)
status = jobs.status(job_id)
- if status.state == "running":
- return await handover_result(JobOutput(jobs, job_id), await jobs.hand_over(job_id))
- if status.state == "exited":
- return await final_result(JobOutput(jobs, job_id), status)
- line = _stopped_line(jobs.stop_reason(job_id), jobs.meta(job_id).get("timeout_s"))
- return await stopped_result(JobOutput(jobs, job_id), line) if line else None
+ watch_id = await jobs.hand_over(job_id) if status.state == "running" else None
+ return await recovered_result(jobs, job_id, status, watch_id)
class BashTool:
@@ -232,7 +247,7 @@ class BashTool:
return await final_result(output, status, note=note)
if ctx.cancel.cancelled:
await self._jobs.kill(job_id, reason=STOP_ABORTED)
- return await stopped_result(output, "Command aborted")
+ return await stopped_result(output, ABORTED_LINE)
if hand_over:
watch_id, handover_error = await self._hand_over(job_id)
if watch_id is not None:
diff --git a/core/agent_core/tools/edit.py b/core/agent_core/tools/edit.py
index 3cb6675c2..ff0bc8fe8 100644
--- a/core/agent_core/tools/edit.py
+++ b/core/agent_core/tools/edit.py
@@ -127,6 +127,17 @@ def _edits_arg(arguments: Mapping[str, Any]) -> list[Edit]:
return parsed
+def edit_summary(path: str, edits: list[Edit], counts: tuple[int, ...]) -> str:
+ """Pi's result line, or, when an item used ``replaceAll`` (Avibe), the occurrences each item replaced."""
+ if not any(edit.replace_all for edit in edits):
+ return f"Successfully replaced {len(edits)} block(s) in {path}."
+ total = sum(counts)
+ summary = f"Successfully replaced {total} occurrence{'' if total == 1 else 's'} in {path}"
+ if len(counts) > 1:
+ summary += " (" + ", ".join(f"edits[{index}]: {count}" for index, count in enumerate(counts)) + ")"
+ return summary + "."
+
+
class _TooLarge(Exception):
def __init__(self, size: int) -> None:
super().__init__(size)
@@ -144,8 +155,10 @@ def _line_count(text: str) -> int:
return text.count("\n") + text.count("\r") - text.count("\r\n") + 1
-def _plan_edits(absolute: str, edits: list[Edit], path: str) -> tuple[int, bytes, str, str, FileIdentity]:
- """Read the file and compute its new bytes: ``(size, data, view_before, view_after, identity)``.
+def _plan_edits(
+ absolute: str, edits: list[Edit], path: str
+) -> tuple[int, bytes, str, str, FileIdentity, tuple[int, ...]]:
+ """Read the file and compute its new bytes: ``(size, data, view_before, view_after, identity, counts)``.
One descriptor gives the size and the contents, read up to the limit, so a file that grew after an
earlier check by path cannot get past it. ``surrogateescape`` carries bytes that are not UTF-8
@@ -168,8 +181,8 @@ def _plan_edits(absolute: str, edits: list[Edit], path: str) -> tuple[int, bytes
lines = _line_count(text)
if lines > MAX_EDIT_LINES:
raise _TooManyLines(lines)
- new_text, before, after = apply_edits(text, edits, path, max_result_chars=MAX_EDIT_BYTES)
- return len(raw), encode_file(new_text), before, after, FileIdentity.of(real, st)
+ new_text, before, after, counts = apply_edits(text, edits, path, max_result_chars=MAX_EDIT_BYTES)
+ return len(raw), encode_file(new_text), before, after, FileIdentity.of(real, st), counts
class EditTool:
@@ -204,7 +217,9 @@ class EditTool:
if not os.access(absolute, os.R_OK | os.W_OK):
return error_result(f"Could not edit file: {path}. Error code: EACCES.")
try:
- size, data, base, new_content, identity = await to_thread_joined(_plan_edits, absolute, edits, path)
+ size, data, base, new_content, identity, counts = await to_thread_joined(
+ _plan_edits, absolute, edits, path
+ )
if len(data) > MAX_EDIT_BYTES:
raise ResultTooLarge()
if ctx.cancel.cancelled:
@@ -243,7 +258,7 @@ class EditTool:
except OSError as exc:
return error_result(f"Could not edit file: {path}. Error code: {errno_name(exc)}.")
- result = f"Successfully replaced {len(edits)} block(s) in {path}."
+ result = edit_summary(path, edits, counts)
if max(size, len(data)) > MAX_DIFF_BYTES:
# The diff is for display only, and difflib is superlinear on large inputs.
return text_result(result, details={"diff_skipped": True})
diff --git a/core/agent_core/tools/edit_diff.py b/core/agent_core/tools/edit_diff.py
index c13b9fbb6..7ed96e8d8 100644
--- a/core/agent_core/tools/edit_diff.py
+++ b/core/agent_core/tools/edit_diff.py
@@ -353,8 +353,9 @@ def _line_groups(lines: _Lines, normalized: str, matches: list[_Replacement]) ->
def apply_edits(
text: str, edits: list[Edit], path: str, max_result_chars: Optional[int] = None
-) -> tuple[str, str, str]:
- """Apply every edit to the file's ``text``; return the new text and the LF views before and after.
+) -> tuple[str, str, str, tuple[int, ...]]:
+ """Apply every edit to the file's ``text``; return the new text, the LF views before and after, and
+ how many occurrences each edit replaced.
Each edit matches in its own tier against the original, in the file's LF view. Exact edits replace
exactly the text they matched; a normalized edit rewrites the whole lines it touches from the
@@ -384,6 +385,7 @@ def apply_edits(
fuzzy: list[_Replacement] = []
inserted = 0
replacements_made = 0
+ counts: list[int] = []
for index, edit in enumerate(edits):
used_normalized, haystack, needle, count = _tier(lines.view, normalized, edit.old_text)
if not count:
@@ -391,6 +393,7 @@ def apply_edits(
if not edit.replace_all and count > 1:
raise _duplicate(path, index, total, count)
replacements_made += count
+ counts.append(count)
if replacements_made > MAX_REPLACEMENTS:
raise _too_many(path, total, replacements_made)
# The result holds at least every inserted text, so this bound never refuses a result that fits.
@@ -407,7 +410,7 @@ def apply_edits(
new_text = _apply(text, replacements)
if new_text == text:
raise _no_change(path, total)
- return new_text, lines.view, lf_view(new_text)
+ return new_text, lines.view, lf_view(new_text), tuple(counts)
def lf_view(text: str) -> str:
diff --git a/core/backend_failure_retry.py b/core/backend_failure_retry.py
index 66456ed7a..3f3d62123 100644
--- a/core/backend_failure_retry.py
+++ b/core/backend_failure_retry.py
@@ -38,6 +38,8 @@ def _notice(conn: Connection, session_id: str, notice_id: str) -> dict[str, Any]
or not metadata.get("failure_id")
or not metadata.get("turn_id")
or metadata.get("detached")
+ # The Turn's running commands continue as Watches: a retry would run them twice.
+ or metadata.get("watch_ids")
):
raise RetryUnavailable("retry_not_available")
return notice
diff --git a/core/controller.py b/core/controller.py
index b040b4b50..3e463283f 100644
--- a/core/controller.py
+++ b/core/controller.py
@@ -1106,10 +1106,6 @@ class Controller:
# A no-op in any process that does not hold the service lock, so the
# embedded and test paths that run a controller are unaffected.
self._publish_readiness_unless_im_runtime_failed()
- try:
- await self._recover_avibe_agent_runtime_state()
- except Exception:
- logger.exception("Failed to recover the Avibe Agent's runtime state")
try:
await self.update_checker.check_and_send_post_update_notification(ready_platform="avibe")
except Exception as e:
@@ -1176,6 +1172,14 @@ class Controller:
if coordinator is not None:
coordinator.restore_migration_blocks()
+ # recovery.md: T2 before T4. The Avibe Agent hands the commands a restart left running
+ # to their Watches first, so the interruption notice of their Turn can say so instead
+ # of asking for a resend. Best effort: its single owner retries what it could not settle.
+ try:
+ await self._recover_avibe_agent_runtime_state()
+ except Exception:
+ logger.exception("Failed to recover the Avibe Agent's runtime state")
+
recover_deliveries = getattr(
self.session_turns,
"recover_durable_delivery_state",
diff --git a/core/session_turns.py b/core/session_turns.py
index 2982b1afd..18872b86a 100644
--- a/core/session_turns.py
+++ b/core/session_turns.py
@@ -64,6 +64,7 @@ from core.services.agent_steering import (
)
from storage import messages_service
from storage import message_deliveries as delivery_store
+from storage.agent_transcript import recovered_watch_ids
from storage.agent_session_rows import reserve_write_lock
from storage.db import get_cached_sqlite_engine
from storage.background import (
@@ -212,6 +213,15 @@ SCHEDULED_TARGET_AGENT_KEY = "scheduled_target_agent_name"
_NON_RESTORABLE_RUNTIME_BACKENDS = frozenset({"claude", "codex", "avibe"})
_MAX_AUTOMATIC_UNKNOWN_START_REPLAYS = 1
_MAX_PREWRITE_START_ATTEMPTS = 3
+# A lost Turn whose running commands recovery handed to Watches (recovery.md T2) gets
+# this copy, for one Watch and for several, instead of asking for a resend that would
+# run them twice; its notice then offers no Retry either (``watch_ids``).
+_HANDED_OVER_NOTICE_KEYS = {
+ "turn.interrupted.serviceRestart": (
+ "turn.interrupted.serviceRestartWatch",
+ "turn.interrupted.serviceRestartWatches",
+ ),
+}
_UNKNOWN_START_REPLAY_INSTRUCTION = (
"[Avibe recovery: this request may have been delivered before restart. "
"Before any irreversible action, check whether the work is already complete.]\n\n"
@@ -6312,6 +6322,19 @@ class SessionTurnManager:
)
return ""
+ def _recovered_watch_ids(self, session_id: str, turn_id: str) -> list[str]:
+ """The Watches startup recovery handed the lost Turn's running commands to (T2 runs before T4)."""
+
+ if not turn_id or not self._durable_schema_available():
+ return []
+ try:
+ with self._sqlite_engine().connect() as conn:
+ return recovered_watch_ids(conn, session_id, turn_id)
+ except Exception:
+ # The notice still goes out, with the copy for a Turn that handed nothing over.
+ logger.warning("hand-over lookup failed for turn=%s", turn_id, exc_info=True)
+ return []
+
def _controller_language(self) -> str:
language_getter = getattr(self.controller, "_get_lang", None)
if callable(language_getter):
@@ -6521,18 +6544,30 @@ class SessionTurnManager:
by anything else.
"""
+ language = self._controller_language()
+ text = i18n_t(message_key, language)
+ metadata: dict[str, Any] = {"turn_id": turn_id or None, "replayed": True}
+ watch_ids = self._recovered_watch_ids(session_id, turn_id)
+ handed_over = _HANDED_OVER_NOTICE_KEYS.get(message_key)
+ if watch_ids and handed_over is not None:
+ one, many = handed_over
+ if len(watch_ids) == 1:
+ text = i18n_t(one, language, watch=watch_ids[0])
+ else:
+ text = i18n_t(many, language, watches=", ".join(watch_ids))
+ metadata["watch_ids"] = watch_ids
try:
delivered = await self.controller.emit_agent_message(
context,
"notify",
- i18n_t(message_key, self._controller_language()),
+ text,
# Recovery already settled this Turn. Carry its exact identity
# through delayed sends without granting another settlement or
# guessing the target from the Session's current Turn.
output=backend_failure_notification_output(
context,
backend,
- output=MessageOutput(metadata={"turn_id": turn_id or None, "replayed": True}),
+ output=MessageOutput(metadata=metadata),
# A legacy Turn has no durable id; its context token names it.
failure_id=f"turn:{turn_id}" if turn_id else None,
failure_id_authoritative=bool(turn_id),
diff --git a/docs/plans/agent-core-contracts/recovery.md b/docs/plans/agent-core-contracts/recovery.md
index 0fd4a9d9a..dca6d4043 100644
--- a/docs/plans/agent-core-contracts/recovery.md
+++ b/docs/plans/agent-core-contracts/recovery.md
@@ -24,9 +24,9 @@ at-least-once, and that is stated where it applies.
| ID | Invariant | Proof |
| --- | --- | --- |
| T1 | `project()` reads only committed rows; the same rows always produce the same request. | projection before and after job state changes |
-| T2 | At resume, before the first projection, every tool call without a committed `tool_result` gets exactly one, chosen from its job state (exited: the output; running: handover; never ran: the interrupted result). A call without job state (`write`, `edit`) gets `[tool call interrupted; it may or may not have completed; re-read the file before continuing]`. Retries settle nothing twice, and neither do concurrent writers: the store's `append_tool_result` returns the result already committed for the call instance instead of writing a second. | crash between settlement steps, then resume twice |
+| T2 | At resume, before the first projection, and when a run ends without completing (a Stop), every tool call without a committed `tool_result` gets exactly one, chosen from its job state (exited: the output; running: handover; stopped with a recorded reason: that result; never ran: the interrupted result). A call without job state (`write`, `edit`) gets `[tool call interrupted; it may or may not have completed; re-read the file before continuing]`. Retries settle nothing twice, and neither do concurrent writers: the store's `append_tool_result` returns the result already committed for the call instance instead of writing a second. | crash between settlement steps, then resume twice |
| T3 | Inputs accepted by `steer` or `follow_up` are never dropped: they enter the context, including after a crash. They belong to the Turn that accepted them and are never re-queued as a new P3 Turn. A run that ended by design runs again for them within its Turn; after a stop, an error, or a crash they are admitted into the context (at the end of the run, or at the Session's resume) and share the Turn's outcome. | a terminating tool while a steer is queued; a crash before consumption |
-| T4 | An unsettled Turn found at startup is settled as interrupted after T2; the agent never continues it on its own (a hook `end`, an abort, or a crash all leave the same safe state). The user's next message starts a new Turn with the full context. | crash after an `end` hook and after a mid-turn commit |
+| T4 | An unsettled Turn found at startup is settled as interrupted after T2; the agent never continues it on its own (a hook `end`, an abort, or a crash all leave the same safe state). The user's next message starts a new Turn with the full context. When T2 handed the Turn's running commands to Watches, its notice names them and offers no Retry, because a resend would run them twice. | crash after an `end` hook and after a mid-turn commit |
## Delivery (adapter wave)
@@ -44,6 +44,8 @@ The only cross-lane shapes recovery adds:
- `meta.json` (`job.schema.json`): `deadline_at` (absolute, nullable), and `process` with the identity fields of
`PersistedProcessIdentity` (`core/process_isolation.py`), recorded before the command can run (J2).
+- `tool_result` `details.recovered`: `true` on every result T2 commits, so T4 tells the Watches recovery created for
+ the Turn's running commands from those the Turn handed over itself (`storage.agent_transcript.recovered_watch_ids`).
- Watch `job` target: keyed by `job_id`, created by adopt-or-create (J6). The hand-over takes the Watch's Agent and
authority from the job's owning Turn, never from the caller of the hand-over, and records that authority
explicitly: the Turn's remote snapshot, a local marker, or an unverifiable snapshot (a remote Turn whose
diff --git a/docs/plans/agent-core-contracts/tools.md b/docs/plans/agent-core-contracts/tools.md
index d6492f2f3..04c66164b 100644
--- a/docs/plans/agent-core-contracts/tools.md
+++ b/docs/plans/agent-core-contracts/tools.md
@@ -108,7 +108,10 @@ is true". Logic, from Pi's `edit-diff.ts`:
4. Apply all edits against the original, restore line endings and BOM, write once. Nothing is written if any edit
fails.
-Result: `Successfully replaced {n} block(s) in {path}.`; the diff goes to `details` for display only. Errors:
+Result: `Successfully replaced {n} block(s) in {path}.`; the diff goes to `details` for display only. Avibe: when an
+item uses `replaceAll`, the result counts occurrences instead, `Successfully replaced {total} occurrences in {path}.`
+(`1 occurrence` when singular), followed for several items by ` (edits[0]: {count}, edits[1]: {count})` before the
+period, so the model need not read the file again to count them. Errors:
- `Could not find edits[{i}] in {path}. The oldText must match exactly including all whitespace and newlines.`; when
the normalization budget was reached, Avibe ends it with `: the file is too large to match it loosely after Unicode
@@ -150,7 +153,9 @@ continue in the background as an Avibe Watch; you get a follow-up message when t
counts the whole line, including bytes the normalizer dropped from its start.
- Exit 0 is a normal result; otherwise an error result ending in `Command exited with code {code}`. `(no output)` when
empty.
-- `timeout` kills the process tree: `Command timed out after {n} seconds`. Abort kills it: `Command aborted`.
+- `timeout` kills the process tree: `Command timed out after {n} seconds`. Abort kills it: `Stopped by the user; the
+ command was terminated.` (Avibe change to Pi's `Command aborted`: an abort is the user's Stop, and the model should
+ know who ended the command). The adapter commits that result when the run ends (recovery's renderer, T2).
- Handover (Avibe), when `watch: true` or the foreground window passes: the result is not an error and reads
`Command is still running and is now Watch {watch_id}. You will get a follow-up message when it finishes.` followed
by the output so far (tail rules above), `{label}: {path}`, and `Check: vibe watch show {watch_id}`,
diff --git a/docs/plans/agent-core-contracts/transcript-rows.schema.json b/docs/plans/agent-core-contracts/transcript-rows.schema.json
index e2b4fc848..98ed53de8 100644
--- a/docs/plans/agent-core-contracts/transcript-rows.schema.json
+++ b/docs/plans/agent-core-contracts/transcript-rows.schema.json
@@ -80,6 +80,10 @@
"watch_id": {
"type": "string"
},
+ "recovered": {
+ "type": "boolean",
+ "description": "Committed by T2 settlement (recovery.md) after the call's run ended, not by the tool."
+ },
"exit_code": {
"type": [
"integer",
diff --git a/modules/agents/avibe/agent.py b/modules/agents/avibe/agent.py
index 5b0af65a3..f60409e41 100644
--- a/modules/agents/avibe/agent.py
+++ b/modules/agents/avibe/agent.py
@@ -298,6 +298,8 @@ class AvibeAgent(BaseAgent):
async for event in turn.agent.run(agent_input, turn_id=turn.turn_id):
await self._on_event(turn, event)
agent_input = await self._continuing_input(turn)
+ if turn.reason not in _COMPLETED:
+ await self._settle_left_open(runtime)
await self._settle(turn)
self._maybe_backfill_session_title(request, session_id)
@@ -714,6 +716,19 @@ class AvibeAgent(BaseAgent):
logger.exception("Avibe Agent could not rebuild sender facts for input %s", delivery.get("id"))
return None
+ async def _settle_left_open(self, runtime: _SessionRuntime) -> None:
+ """T2 as soon as a run ends without completing (a Stop, a failure), not at the Session's next resume.
+
+ The calls the run was executing then carry what their jobs recorded, such as a
+ Stop's reason, while the Turn's own outcome is still being settled.
+ """
+ try:
+ await self._settle_open_calls(runtime)
+ except Exception:
+ # The calls stay open, and the recovery owner settles them once this Turn releases the Session.
+ logger.exception("Avibe Agent could not settle the calls a run left open in Session %s", runtime.session_id)
+ self._schedule_recovery()
+
async def _settle_open_calls(self, runtime: _SessionRuntime) -> None:
"""T2: one committed result for every open tool call, chosen from its job's state."""
session_id = runtime.session_id
diff --git a/modules/agents/avibe/prompt.py b/modules/agents/avibe/prompt.py
index 98bf45c8a..f30731b45 100644
--- a/modules/agents/avibe/prompt.py
+++ b/modules/agents/avibe/prompt.py
@@ -9,7 +9,9 @@ model saw.
Preamble, tool snippets, and rules ported from Pi (MIT, Copyright (c) 2025 Mario
Zechner), ``packages/coding-agent/src/core/system-prompt.ts`` and
``packages/coding-agent/src/core/tools/{read,write,edit,bash}.ts`` at ``7fbbd5f``;
-Pi-specific lines (its docs, ``PI_*`` variables) are left out.
+Pi-specific lines (its docs, ``PI_*`` variables) are left out. ``FINAL_REPLY_RULE`` is
+Avibe's: text between tool calls reaches the user only above the shared interim
+threshold (``ConsolidatedMessageDispatcher._is_interim_worthy``).
"""
from __future__ import annotations
@@ -51,6 +53,7 @@ TOOL_GUIDELINES: dict[str, tuple[str, ...]] = {
"write": ("Use write only for new files or complete rewrites.",),
}
TOOL_ORDER = ("read", "bash", "edit", "write")
+FINAL_REPLY_RULE = "Only your final reply is reliably shown to the user; put anything the user must see in it"
def coding_prompt(tool_names: Iterable[str]) -> str:
@@ -63,7 +66,7 @@ def coding_prompt(tool_names: Iterable[str]) -> str:
rules.append("Use bash for file operations like ls, rg, find")
for name in names:
rules.extend(TOOL_GUIDELINES.get(name, ()))
- rules += ["Be concise in your responses", "Show file paths clearly when working with files"]
+ rules += ["Be concise in your responses", "Show file paths clearly when working with files", FINAL_REPLY_RULE]
return "\n\n".join(
(
PREAMBLE,
diff --git a/modules/agents/avibe/tools.py b/modules/agents/avibe/tools.py
index df029ab72..05b0369d4 100644
--- a/modules/agents/avibe/tools.py
+++ b/modules/agents/avibe/tools.py
@@ -48,10 +48,9 @@ def local_tool_suite(jobs_dir: Optional[str] = None, *, route: Optional[HandOver
and T2 recovery) goes through the host's ``on_hand_over``, which takes the Watch's
Agent and authorization from ``route``: the job's owning Turn.
"""
- from core.agent_core.tools.bash import final_result, handover_result
+ from core.agent_core.tools.bash import recovered_result
from core.agent_core.tools.coding import create_coding_tools
from core.agent_core.tools.jobs import LocalJobHost
- from core.agent_core.tools.output import JobOutput
from core.watches import ManagedWatchStore, agent_jobs_dir
async def hand_over(meta: Mapping[str, Any]) -> str:
@@ -75,8 +74,7 @@ def local_tool_suite(jobs_dir: Optional[str] = None, *, route: Optional[HandOver
return create_coding_tools(jobs, image_sink=image_sink)
async def render(call: Any, job_id: str, status: Any, watch_id: Optional[str]) -> Any:
- output = JobOutput(host, job_id)
- return await handover_result(output, watch_id) if watch_id else await final_result(output, status)
+ return await recovered_result(host, job_id, status, watch_id)
def prune(call_settled: CallSettled) -> list[str]:
# J5: a job's files stay until its call has a durable result and no Watch still manages it.
diff --git a/storage/agent_transcript.py b/storage/agent_transcript.py
index fd57178fa..111594b7a 100644
--- a/storage/agent_transcript.py
+++ b/storage/agent_transcript.py
@@ -635,6 +635,30 @@ def source_tool_result(
return _event_entry(row["session_id"], row) if row is not None else None
+def recovered_watch_ids(conn: Connection, session_id: str, turn_id: str) -> list[str]:
+ """The Watches recovery handed a Turn's open calls to (``recovery.md`` T2), in context order.
+
+ Only results T2 committed count: a call the Turn handed over itself (``watch: true``,
+ the foreground window) was already reported to the model, so it is not work the
+ Turn lost.
+ """
+ from core.agent_core.agent.recovery import RECOVERED
+
+ rows = conn.execute(
+ select(agent_events.c.content_json)
+ .where(
+ agent_events.c.session_id == session_id,
+ agent_events.c.turn_id == turn_id,
+ agent_events.c.event_type == _EVENT_TYPE_BY_KIND["tool_result"],
+ agent_events.c.visibility == CONTEXT_VISIBILITY,
+ func.json_extract(agent_events.c.content_json, f"$.details.{RECOVERED}") == 1,
+ func.json_extract(agent_events.c.content_json, "$.details.watch_id").is_not(None),
+ )
+ .order_by(agent_events.c.context_seq)
+ ).scalars()
+ return [str(json.loads(raw)["details"]["watch_id"]) for raw in rows]
+
+
def fork_link(conn: Connection, session_id: str) -> Optional[tuple[str, int]]:
"""``(source_session_id, anchor_seq)`` when the Session inherits a context."""
raw = conn.execute(
diff --git a/tests/agent_core/agent/test_recovery.py b/tests/agent_core/agent/test_recovery.py
index efa90f042..6e27475ac 100644
--- a/tests/agent_core/agent/test_recovery.py
+++ b/tests/agent_core/agent/test_recovery.py
@@ -27,12 +27,16 @@ from tests.agent_core.fakes import (
async def _never_rendered(*_args):
- pytest.fail("missing/gone jobs must not invoke the renderer")
+ pytest.fail("a call without a job must not invoke the renderer")
def renderer(jobs):
async def render(call, job_id, status, watch_id):
output, _ = jobs.output(job_id)
+ if status.state == "gone":
+ # Only a recorded stop reason gives an ended job a result of its own (bash's ``recovered_result``).
+ reason = jobs.stop_reason(job_id)
+ return ToolResult((text(f"{output.decode()}; stopped={reason}"),), is_error=True) if reason else None
content = (
f"still running, now Watch {watch_id}"
if watch_id is not None
@@ -57,6 +61,7 @@ def renderer(jobs):
("bash", "running"),
("bash", "exited"),
("bash", "gone"),
+ ("bash", "stopped"),
],
)
async def test_resume_settles_each_job_state_once_and_projection_never_rechecks_it(tool_name, state):
@@ -69,20 +74,18 @@ async def test_resume_settles_each_job_state_once_and_projection_never_rechecks_
if state != "missing":
job_ids[("session", "call")] = "job_1"
jobs.states["job_1"] = JobStatus(
- "gone" if state == "never-ran" else state, exit_code=7 if state == "exited" else None
+ "gone" if state in {"never-ran", "stopped"} else state, exit_code=7 if state == "exited" else None
)
jobs.outputs["job_1"] = b"final output"
+ if state == "stopped":
+ jobs.stop_reasons["job_1"] = "aborted"
committed = await settle_open_calls(
session_id="session",
store=store,
jobs=jobs,
job_ids=job_ids,
- render_result=(
- renderer(jobs)
- if state in {"running", "exited"}
- else _never_rendered
- ),
+ render_result=_never_rendered if state == "missing" else renderer(jobs),
)
assert len(committed) == 1
assert (
@@ -95,6 +98,7 @@ async def test_resume_settles_each_job_state_once_and_projection_never_rechecks_
"gone": INTERRUPTED,
"running": "still running, now Watch watch_job_1",
"exited": "final output; exit=7",
+ "stopped": "final output; stopped=aborted",
}[state]
)
assert committed[0].message.is_error == (state != "running")
diff --git a/tests/agent_core/tools/test_bash.py b/tests/agent_core/tools/test_bash.py
index db9a0f6d9..6af8e8c50 100644
--- a/tests/agent_core/tools/test_bash.py
+++ b/tests/agent_core/tools/test_bash.py
@@ -225,7 +225,7 @@ async def test_abort_kills_the_command(tmp_path, make_ctx):
assert seen == ["started\n"]
assert result.is_error
- assert result_text(result) == "started\n\n\nCommand aborted"
+ assert result_text(result) == "started\n\n\nStopped by the user; the command was terminated."
assert _process_gone(int((tmp_path / "sh.pid").read_text()))
@@ -233,7 +233,7 @@ async def test_abort_kills_the_command(tmp_path, make_ctx):
("arguments", "abort", "expected"),
[
({"command": "echo started; sleep 30", "timeout": 1.5}, False, "started\n\n\nCommand timed out after 1.5 seconds"),
- ({"command": "echo started; sleep 30"}, True, "started\n\n\nCommand aborted"),
+ ({"command": "echo started; sleep 30"}, True, "started\n\n\nStopped by the user; the command was terminated."),
],
ids=["timeout", "abort"],
)
@@ -317,7 +317,7 @@ async def test_a_flood_of_output_never_stalls_the_event_loop(tmp_path, make_ctx,
finally:
ticking.cancel()
- assert result_text(result).endswith("Command aborted")
+ assert result_text(result).endswith("Stopped by the user; the command was terminated.")
assert time.monotonic() - started < 6.0
# Following the output costs the loop about 0.1 s at worst (it took 3 to 5 s on the loop before);
# the host's own small reads may add a slow disk's latency on top (ledger A56).
diff --git a/tests/agent_core/tools/test_write_edit.py b/tests/agent_core/tools/test_write_edit.py
index 7866c56d6..bfab00d66 100644
--- a/tests/agent_core/tools/test_write_edit.py
+++ b/tests/agent_core/tools/test_write_edit.py
@@ -116,10 +116,23 @@ async def test_replace_all_replaces_every_occurrence(tmp_path, make_ctx):
{"oldText": "bar", "newText": "qux"},
)
- assert result_text(result) == "Successfully replaced 2 block(s) in f.txt."
+ # The model learns how many occurrences each item replaced without reading the file again.
+ assert result_text(result) == "Successfully replaced 4 occurrences in f.txt (edits[0]: 3, edits[1]: 1)."
assert (tmp_path / "f.txt").read_text() == "baz(1)\nqux\nbaz(2)\nbaz(3)\n"
[email protected](("content", "summary"), [
+ ("color=red\nborder=red\naccent=red\n", "Successfully replaced 3 occurrences in f.txt."),
+ ("color=red\n", "Successfully replaced 1 occurrence in f.txt."),
+])
+async def test_a_single_replace_all_reports_its_occurrences(tmp_path, make_ctx, content, summary):
+ (tmp_path / "f.txt").write_text(content)
+
+ result = await _edit(make_ctx, "f.txt", {"oldText": "red", "newText": "blue", "replaceAll": True})
+
+ assert result_text(result) == summary
+
+
async def test_text_copied_from_read_edits_a_file_with_invalid_bytes(tmp_path, make_ctx):
"""read and edit show undecodable bytes the same way, so a block copied from read matches."""
(tmp_path / "f.txt").write_bytes(b"a\xffb\xe2\x82c\nkeep\x80\n")
diff --git a/tests/scenarios/message_delivery/catalog.yaml b/tests/scenarios/message_delivery/catalog.yaml
index ea1ba1f12..a5b2a14c4 100644
--- a/tests/scenarios/message_delivery/catalog.yaml
+++ b/tests/scenarios/message_delivery/catalog.yaml
@@ -368,5 +368,11 @@ scenarios:
kind: regression
layer: contract
test: tests/test_opencode_steer_superseded_reply.py::test_steer_keeps_superseded_completed_reply
+ - id: MESSAGE-DELIVERY-322
+ name: A restart notice names the Watch that continues the interrupted command and offers no Retry
+ status: covered
+ kind: recovery
+ layer: contract
+ test: tests/test_backend_failure_retry.py::test_restart_notice_names_the_watch_running_the_command_and_offers_no_retry
next_priority:
- - MESSAGE-DELIVERY-322
+ - MESSAGE-DELIVERY-323
diff --git a/tests/scenarios/message_delivery/observations.yaml b/tests/scenarios/message_delivery/observations.yaml
index fbd5dd260..1cca1f3fd 100644
--- a/tests/scenarios/message_delivery/observations.yaml
+++ b/tests/scenarios/message_delivery/observations.yaml
@@ -1,6 +1,17 @@
version: 1
capability: message_delivery
observations:
+ - id: OBS-MESSAGE-DELIVERY-010
+ source: avibe_agent_phase1_e2e_acceptance
+ related_scenarios:
+ - MESSAGE-DELIVERY-322
+ summary: After a restart, the interruption notice asked the user to resend a command recovery had already handed to a Watch.
+ previous_assumption: An interrupted Turn always lost its work, so a resend or Retry was the safe next step.
+ observed_behavior: The Watch finished and reported back, while the notice and its Retry offered to run the side effects again.
+ required_updates:
+ - run the Avibe Agent's tool-call settlement before Turn recovery at startup (T2 before T4)
+ - branch the shared restart notice on the hand-over record T2 commits, not on text
+ - name the Watch and suppress Retry in both the Web action and the server admission
- id: OBS-MESSAGE-DELIVERY-009
source: issue_2049_and_hermetic_native_reproduction
related_scenarios:
diff --git a/tests/test_avibe_agent.py b/tests/test_avibe_agent.py
index b1c2ddd73..add575497 100644
--- a/tests/test_avibe_agent.py
+++ b/tests/test_avibe_agent.py
@@ -1439,6 +1439,8 @@ async def test_the_system_prompt_lists_every_tool_the_run_offers(engine, session
system = harness.provider.requests[0].system
assert all(f"- {name}: " in system for name in ("read", "bash", "edit", "write"))
assert "Use edit for precise changes" in system
+ # Short text between tool calls may never reach the user's transcript (the shared interim threshold).
+ assert "- Only your final reply is reliably shown to the user; put anything the user must see in it" in system
async def test_an_idle_session_holds_no_adapter_state(engine, session, tmp_path, published) -> None:
@@ -2042,6 +2044,28 @@ async def test_bash_runs_with_the_turns_caller_environment(engine, session, tmp_
assert "hub-token" not in output
+async def test_a_stop_settles_the_running_command_with_its_recorded_reason(engine, session, tmp_path, published) -> None:
+ call = ToolCallBlock(id="call_bash", name="bash", arguments={"command": "echo started; sleep 30"})
+ suite = local_tool_suite(str(tmp_path / "jobs"))
+ harness = _Harness(engine, tmp_path, "avibe", [[Done(assistant("", calls=(call,)))]], suite=suite)
+ request = harness.request("run it")
+
+ running = asyncio.create_task(harness.agent.handle_message(request))
+ await _until(lambda: suite.find_job(SESSION, "call_bash") is not None, "the command never started")
+ job_id = suite.find_job(SESSION, "call_bash")
+ await _until(lambda: b"started" in suite.jobs.output(job_id)[0], "the command printed nothing")
+ assert await harness.agent.handle_stop(AgentRequest(**{**request.__dict__, "message": "stop"})) is True
+ await running
+
+ # Settled at Stop, before any later Turn, with why the job ended rather than an unexplained interruption.
+ result = (await harness.context_rows())[-1]
+ assert result.kind == "tool_result" and result.message.is_error
+ body = result.message.content[0].text
+ assert body.startswith("started\n") and body.endswith("\n\nStopped by the user; the command was terminated.")
+ assert suite.jobs.stop_reason(job_id) == "aborted" and suite.jobs.status(job_id).state != "running"
+ assert harness.controller.terminals == [{"turn": _turn(request.context), "is_error": False, "settled_by": "stopped"}]
+
+
@pytest.mark.parametrize("state", ["exited", "running"])
async def test_resume_settles_a_real_bash_job_through_the_real_renderer(
engine, session, tmp_path, published, state
diff --git a/tests/test_backend_failure_retry.py b/tests/test_backend_failure_retry.py
index 609edcbac..38c8a33f8 100644
--- a/tests/test_backend_failure_retry.py
+++ b/tests/test_backend_failure_retry.py
@@ -20,8 +20,12 @@ from tests.test_ui_session_stream import _accepted_dispatch, _make_session, isol
from tests.ui_server_test_helpers import csrf_headers
-def _restart_failure_notice(tmp_path, *, backend, delivery="ready"):
- """Recover an accepted Turn through the real notice dispatcher and storage."""
+def _restart_failure_notice(tmp_path, *, backend, delivery="ready", before_restart=None):
+ """Recover an accepted Turn through the real notice dispatcher and storage.
+
+ ``before_restart(engine, session_id, turn_id)`` writes what the previous process
+ and the startup steps before Turn recovery left behind.
+ """
from core.message_dispatcher import ConsolidatedMessageDispatcher
from core.session_turns import SessionTurnManager
from tests.scenario_harness.message_delivery import MessageDeliveryController
@@ -56,6 +60,8 @@ def _restart_failure_notice(tmp_path, *, backend, delivery="ready"):
context=context(session_id),
))
starts.clear()
+ if before_restart is not None:
+ before_restart(engine, session_id, str(original.turn_id))
manager._active_identity = lambda *_args: None
manager._transport_can_deliver = lambda _platform: delivery != "unready"
asyncio.run(manager.recover_durable_delivery_state(session_id, service_restart=True))
@@ -143,6 +149,55 @@ def test_restart_notice_retries_through_web_and_controller(isolated_state, tmp_p
assert reloaded["content"]["failure_retry"]["state"] == "accepted"
+def _hand_over_the_open_command(engine, session_id, turn_id):
+ """The restart left the Turn's bash command running; startup recovery made it a Watch (T2)."""
+ from core.agent_core.agent.recovery import settle_open_calls
+ from core.agent_core.messages import ToolCallBlock, UserMessage, text
+ from core.agent_core.tools.base import JobStatus, ToolResult
+ from storage.agent_transcript import SQLiteTranscriptStore
+ from tests.agent_core.fakes import FakeJobHost, assistant
+
+ with engine.connect() as conn:
+ input_id = message_deliveries.delivery_for_turn(conn, turn_id)["message_id"]
+ store, jobs = SQLiteTranscriptStore(engine), FakeJobHost()
+ jobs.states["job_1"] = JobStatus("running")
+ call = ToolCallBlock(id="call_bash", name="bash", arguments={"command": "sleep 60; echo done >> s6.txt"})
+
+ async def handed_over(_call, _job_id, _status, watch_id):
+ return ToolResult((text(f"Command is still running and is now Watch {watch_id}."),))
+
+ async def previous_process_then_t2():
+ await store.consume_input(session_id, input_id, UserMessage((text("run it"),)))
+ await store.append_response(session_id, assistant("", calls=(call,)), final=False)
+ await settle_open_calls(
+ session_id=session_id, store=store, jobs=jobs,
+ job_ids={(session_id, "call_bash"): "job_1"}, render_result=handed_over,
+ )
+
+ asyncio.run(previous_process_then_t2())
+ assert jobs.watches == {"job_1": "watch_job_1"}
+
+
+def test_restart_notice_names_the_watch_running_the_command_and_offers_no_retry(isolated_state, tmp_path):
+ """MESSAGE-DELIVERY-322: resending a command that still runs as a Watch would run its effects twice."""
+ from vibe.ui_server import app
+
+ session_id, notice = _restart_failure_notice(
+ tmp_path, backend="avibe", before_restart=_hand_over_the_open_command
+ )
+
+ assert "watch_job_1" in notice["text"] and "重新发送" not in notice["text"]
+ assert notice["metadata"]["watch_ids"] == ["watch_job_1"]
+ client = app.test_client()
+ with patch("vibe.internal_client.dispatch_async", AsyncMock()) as dispatch:
+ response = client.post(
+ f"/api/sessions/{session_id}/messages", headers=csrf_headers(client),
+ json={"retry_for": notice["id"]},
+ )
+ assert response.status_code == 409
+ dispatch.assert_not_awaited()
+
+
@pytest.mark.parametrize("change", ["newer", "busy", "unlinked"])
def test_restart_notice_keeps_retry_boundary_guards(isolated_state, tmp_path, change):
from vibe.ui_server import app
diff --git a/tests/test_controller_im_ready.py b/tests/test_controller_im_ready.py
index 484e1d2ca..ef677386a 100644
--- a/tests/test_controller_im_ready.py
+++ b/tests/test_controller_im_ready.py
@@ -212,6 +212,39 @@ def test_runtime_owner_recovery_isolates_optional_model_hub_failure(
assert "Model Hub runtime recovery failed" in caplog.text
[email protected]("avibe_recovery_fails", [False, True])
+def test_runtime_owner_recovery_settles_avibe_tool_calls_before_turns(avibe_recovery_fails: bool) -> None:
+ # recovery.md: T2 before T4. A Turn the restart interrupted is reported only after its
+ # running command became a Watch, so the notice can say so instead of asking for a resend.
+ order: list[str] = []
+
+ async def avibe_pass() -> list[str]:
+ order.append("avibe T2")
+ if avibe_recovery_fails:
+ raise OSError("jobs directory unreadable")
+ return []
+
+ async def turns_pass(**_kwargs) -> list[str]:
+ order.append("Turn T4")
+ return []
+
+ controller = Controller.__new__(Controller)
+ controller.avibe_recovery = SimpleNamespace(start=AsyncMock(side_effect=avibe_pass))
+ controller.session_turns = SimpleNamespace(
+ recover_durable_delivery_state=AsyncMock(side_effect=turns_pass),
+ recover_persisted_agent_run_queue=AsyncMock(return_value=[]),
+ )
+ controller.scheduled_task_service = SimpleNamespace(recover_processing_requests=Mock())
+ controller.runtime_work_supervisor = SimpleNamespace(activate=AsyncMock())
+ controller._delivery_recovery_complete = asyncio.Event()
+
+ asyncio.run(controller._recover_runtime_owners())
+
+ # Best effort, as before: the Avibe pass retries on its own and never blocks the delivery owners.
+ assert order == ["avibe T2", "Turn T4"]
+ assert controller._delivery_recovery_complete.is_set()
+
+
def test_runtime_ready_fails_closed_after_queue_recovery_failure() -> None:
controller = Controller.__new__(Controller)
controller.agent_service = SimpleNamespace(agents={})
diff --git a/tests/test_processing_indicator_reaction.py b/tests/test_processing_indicator_reaction.py
index 831d25b6e..b8eacbc96 100644
--- a/tests/test_processing_indicator_reaction.py
+++ b/tests/test_processing_indicator_reaction.py
@@ -239,5 +239,42 @@ class QueuedReactionLifecycleTests(unittest.IsolatedAsyncioTestCase):
self.assertEqual(request.ack_reaction_message_id, "m1")
+class WorkbenchAckModeTests(unittest.IsolatedAsyncioTestCase):
+ """The Workbench client shows only an ack message, so its turns start with one, whatever ack_mode says."""
+
+ async def _start_and_promote(self, ack_mode: str) -> tuple[ProcessingIndicatorHandle, list[str]]:
+ from modules.im.avibe import AvibeBot, AvibeConfig
+
+ published: list[str] = []
+
+ async def publish(event, **payload):
+ published.append(payload["text"])
+
+ bot = AvibeBot(AvibeConfig())
+ bot.bind_sse_publisher(publish)
+ controller = SimpleNamespace(
+ config=SimpleNamespace(ack_mode=ack_mode, language="en"),
+ get_im_client_for_context=lambda ctx: bot,
+ im_client=bot,
+ )
+ svc = ProcessingIndicatorService(controller)
+ context = MessageContext(user_id="u1", channel_id="ses_1", message_id="msg_user", platform="avibe")
+
+ handle = await svc.start(context, "avibe")
+ # The ack message is the indicator from the start: nothing is deferred to the runtime gate.
+ self.assertEqual(published, [svc._get_ack_text("avibe")])
+ await svc.promote_reaction_to_running(handle, agent_name="avibe")
+ return handle, published
+
+ async def test_every_ack_mode_starts_with_the_ack_message_and_no_downgrade_warning(self):
+ for ack_mode in ("reaction", "typing", "message"):
+ with self.subTest(ack_mode=ack_mode):
+ with self.assertNoLogs("core.processing_indicator", level="WARNING"):
+ handle, published = await self._start_and_promote(ack_mode)
+ self.assertIsNotNone(handle.ack_message_id)
+ self.assertIsNone(handle.ack_reaction_emoji)
+ self.assertEqual(len(published), 1)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/ui/src/components/settings/SettingsBackendsPage.test.tsx b/ui/src/components/settings/SettingsBackendsPage.test.tsx
index 210878b5a..d65973c32 100644
--- a/ui/src/components/settings/SettingsBackendsPage.test.tsx
+++ b/ui/src/components/settings/SettingsBackendsPage.test.tsx
@@ -6,6 +6,8 @@ import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import i18n from '@/i18n';
+import { modelsApi } from './models/modelsApi';
+import type { AgentSupply } from './models/types';
import { SettingsBackendPage } from './SettingsBackendPage';
import { SettingsBackendsPage } from './SettingsBackendsPage';
@@ -39,7 +41,10 @@ beforeEach(async () => {
mocks.api.mutateConfig.mockResolvedValue({ agents: { avibe: { enabled: true } } });
});
-afterEach(cleanup);
+afterEach(() => {
+ cleanup();
+ vi.restoreAllMocks();
+});
describe('in-process backend settings', () => {
// Native-only fixtures never reached the missing-CLI default or showed which
@@ -88,3 +93,38 @@ describe('in-process backend settings', () => {
expect(mocks.api.restartBackend).not.toHaveBeenCalled();
});
});
+
+describe('backend attention', () => {
+ it('flags the backend whose Agent has no model once enabling it creates that Agent', async () => {
+ const withoutModel = [
+ {
+ backend: 'avibe', cli_present: false, mode: 'hub', menu_kind: 'fixed',
+ named_agents: [{ name: 'avibe', effective_model_id: null, supply_status: null }],
+ },
+ {
+ backend: 'claude', cli_present: true, mode: 'hub', menu_kind: 'fixed',
+ named_agents: [{ name: 'claude', effective_model_id: 'claude-opus-5-5', supply_status: 'ok' }],
+ },
+ ] as AgentSupply[];
+ // Disabled, the backend has no named Agent yet; enabling it creates the built-in one.
+ const listAgents = vi.spyOn(modelsApi, 'listAgents')
+ .mockResolvedValueOnce(withoutModel.slice(1))
+ .mockResolvedValue(withoutModel);
+ render(
+ <I18nextProvider i18n={i18n}>
+ <MemoryRouter initialEntries={['/settings/backends']}>
+ <SettingsBackendsPage />
+ </MemoryRouter>
+ </I18nextProvider>,
+ );
+ const row = async (name: string) => (await screen.findByText(name)).closest('.rounded-xl') as HTMLElement;
+ const avibe = await row('Avibe Agent');
+ await waitFor(() => expect(listAgents).toHaveBeenCalledTimes(1));
+ expect(within(avibe).queryByText('No model selected')).toBeNull();
+
+ fireEvent.click(within(avibe).getByRole('switch'));
+
+ expect(await within(avibe).findByText('No model selected')).toBeTruthy();
+ expect(within(await row('Claude Code')).queryByText('No model selected')).toBeNull();
+ });
+});
diff --git a/ui/src/components/settings/SettingsBackendsPage.tsx b/ui/src/components/settings/SettingsBackendsPage.tsx
index 7d9fe6441..bb8936b7c 100644
--- a/ui/src/components/settings/SettingsBackendsPage.tsx
+++ b/ui/src/components/settings/SettingsBackendsPage.tsx
@@ -3,10 +3,13 @@ import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { ChevronRight, Settings2 } from 'lucide-react';
+import { Badge } from '../ui/badge';
import { Button } from '../ui/button';
import { SettingsResourceRow, ToggleSwitch } from './SettingsPrimitives';
import { BackendLifecycleChip } from './BackendLifecycleChip';
import { SettingsPageShell } from './SettingsPageShell';
+import { modelsApi } from './models/modelsApi';
+import { agentsWithoutModel } from './models/supply';
import { useApi } from '@/context/ApiContext';
import { useToast } from '@/context/ToastContext';
import { AGENT_BACKENDS, DEFAULT_AGENT_STATE, getBackendUiMeta } from '@/lib/agentBackends';
@@ -54,6 +57,20 @@ export const SettingsBackendsPage: React.FC = () => {
const [loaded, setLoaded] = useState(false);
const [agents, setAgents] = useState<Record<string, AgentState>>(DEFAULT_AGENTS);
+ // Backends with an enabled Agent whose next turn fails for want of a model (the Models page's reading).
+ const [withoutModel, setWithoutModel] = useState<ReadonlySet<string>>(() => new Set());
+
+ const refreshModelAttention = React.useCallback(async () => {
+ try {
+ setWithoutModel(new Set(agentsWithoutModel(await modelsApi.listAgents()).map((named) => named.backend)));
+ } catch {
+ // Without the Model Hub projection there is nothing to flag.
+ }
+ }, []);
+
+ useEffect(() => {
+ void refreshModelAttention();
+ }, [refreshModelAttention]);
useEffect(() => {
let cancelled = false;
@@ -124,6 +141,8 @@ export const SettingsBackendsPage: React.FC = () => {
const handleToggle = async (name: string, enabled: boolean) => {
setAgents((prev) => ({ ...prev, [name]: { ...prev[name], enabled } }));
await persistBackendField(name, { enabled });
+ // Enabling a backend can create its built-in Agent, with no model selected yet.
+ await refreshModelAttention();
};
const refreshDetectionFor = async (name: string, cli_path?: string) => {
@@ -167,6 +186,9 @@ export const SettingsBackendsPage: React.FC = () => {
detail={t(meta.descriptionKey)}
actions={
<>
+ {agent.enabled && withoutModel.has(meta.id) && (
+ <Badge variant="warning">{t('settings.models.gateway.agentIssues.modelMissing')}</Badge>
+ )}
{meta.capabilities.supports_runtime_refresh && <BackendLifecycleChip
name={meta.id}
enabled={agent.enabled}
diff --git a/ui/src/components/settings/models/BackendSupplyModeCard.test.tsx b/ui/src/components/settings/models/BackendSupplyModeCard.test.tsx
index 8865c4efa..d0d11675f 100644
--- a/ui/src/components/settings/models/BackendSupplyModeCard.test.tsx
+++ b/ui/src/components/settings/models/BackendSupplyModeCard.test.tsx
@@ -79,6 +79,22 @@ describe('BackendSupplyModeCard', () => {
expect(setMode).not.toHaveBeenCalled();
});
+ it.each([
+ ['en', 'On the gateway · no source enabled yet, the next turn will fail. Add or enable a source on the Models page to bring it back.'],
+ ['zh', '已接入模型网关 · 还没有启用任何供应商,下一个回合会失败。去「模型」页添加或启用供应商即可恢复。'],
+ ])('punctuates the warning and its fix as one %s sentence pair', async (language, banner) => {
+ await i18n.changeLanguage(language);
+ vi.mocked(modelsApi.listAgents).mockResolvedValue([
+ { backend: 'avibe', cli_present: false, mode: 'hub', menu_kind: 'fixed', sources: { order: [] } },
+ ]);
+ render(
+ <MemoryRouter>
+ <I18nextProvider i18n={i18n}><BackendSupplyModeCard backend="avibe" /></I18nextProvider>
+ </MemoryRouter>,
+ );
+ expect((await screen.findByText(banner)).textContent).toBe(banner);
+ });
+
it.each([
['switching to the gateway', /Gateway mode/, true],
['importing from the Direct strip', null, false],
diff --git a/ui/src/components/settings/models/BackendSupplyModeCard.tsx b/ui/src/components/settings/models/BackendSupplyModeCard.tsx
index ea04e5fbe..fd5f70bdb 100644
--- a/ui/src/components/settings/models/BackendSupplyModeCard.tsx
+++ b/ui/src/components/settings/models/BackendSupplyModeCard.tsx
@@ -215,9 +215,12 @@ export const BackendSupplyModeCard: React.FC<{ backend: AgentBackend }> = ({ bac
<div className="flex items-start gap-2 rounded-lg border border-gold/40 bg-gold/[0.08] px-3.5 py-2.5 text-[12px] leading-relaxed text-foreground">
<Info className="model-hub-ink-gold mt-0.5 size-3.5 shrink-0" />
<span>
- {t(`settings.models.supply.${hubOutcome}`)}
- {(hubOutcome === 'noSources' || hubOutcome === 'interrupted') &&
- ` ${t('settings.models.supplyMode.fixHint')}`}
+ {hubOutcome === 'noSources' || hubOutcome === 'interrupted'
+ ? t('settings.models.supplyMode.warningWithFix', {
+ warning: t(`settings.models.supply.${hubOutcome}`),
+ fixHint: t('settings.models.supplyMode.fixHint'),
+ })
+ : t(`settings.models.supply.${hubOutcome}`)}
</span>
</div>
)}
diff --git a/ui/src/components/settings/models/supply.ts b/ui/src/components/settings/models/supply.ts
index 76780428d..1bce48f40 100644
--- a/ui/src/components/settings/models/supply.ts
+++ b/ui/src/components/settings/models/supply.ts
@@ -6,6 +6,7 @@
import { processAvailabilityOf } from './eligibility';
import { catalogModelIds } from './backendCatalog';
import type {
+ AgentBackend,
AgentSupply,
ModelSupply,
Source,
@@ -131,3 +132,18 @@ export function attribution(agent: AgentSupply): SupplyAttribution {
export const hasAttribution = (a: SupplyAttribution): boolean =>
a.interrupted.length > 0 || a.waiting.length > 0 || a.unassignedModels.length > 0;
+
+/**
+ * Enabled named Agents whose next turn fails because no model is selected: on the
+ * gateway a turn's route starts from the Agent's model. The reading behind the
+ * attention strip's 「No model selected」, for the pages that show such an Agent,
+ * or its backend, as enabled.
+ */
+export const agentsWithoutModel = (
+ supplies: readonly AgentSupply[],
+): { backend: AgentBackend; name: string }[] =>
+ supplies
+ .filter((supply) => supply.mode === 'hub')
+ .flatMap((supply) => (supply.named_agents ?? [])
+ .filter((named) => named.effective_model_id === null)
+ .map((named) => ({ backend: supply.backend, name: named.name })));
diff --git a/ui/src/components/workbench/AgentsPage.test.tsx b/ui/src/components/workbench/AgentsPage.test.tsx
index 001ddeee2..4630b1e99 100644
--- a/ui/src/components/workbench/AgentsPage.test.tsx
+++ b/ui/src/components/workbench/AgentsPage.test.tsx
@@ -10,6 +10,8 @@ import type { InstanceCapabilities, InstanceRole } from '../../lib/sessionInfo';
import { OWNER_INSTANCE_CAPABILITIES } from '../../lib/sessionInfo';
import { RouteSurfaceActiveContext } from '../../lib/routeSurfaceActivity';
import { capabilitiesFor } from '../../lib/testing/instanceRoleCapabilities';
+import { modelsApi } from '../settings/models/modelsApi';
+import type { AgentSupply } from '../settings/models/types';
import { AgentsPage } from './AgentsPage';
type FakeApi = {
@@ -231,6 +233,31 @@ describe('AgentsPage load requests follow the rank that can serve them', () => {
});
describe('AgentsPage contextual selection', () => {
+ it('marks an enabled Agent the gateway reports without a model, as the Models page does', async () => {
+ // Enabling the Avibe backend creates its built-in Agent before any model is selected.
+ vi.spyOn(modelsApi, 'listAgents').mockResolvedValue([
+ {
+ backend: 'avibe', cli_present: false, mode: 'hub', menu_kind: 'fixed',
+ named_agents: [{ name: 'avibe', effective_model_id: null, supply_status: null }],
+ },
+ {
+ backend: 'codex', cli_present: true, mode: 'hub', menu_kind: 'fixed',
+ named_agents: [{ name: 'codex', effective_model_id: 'gpt-5', supply_status: 'ok' }],
+ },
+ ] as AgentSupply[]);
+ const api = makeApi(vi.fn().mockResolvedValue(listResult([
+ { ...brief('avibe', 'Default Agent'), backend: 'avibe' },
+ { ...brief('codex', ''), model: 'gpt-5' },
+ ])));
+ renderPage(api);
+ const row = (name: string) => screen.getAllByText(name).find((node) => node.closest('button'))!.closest('button')!;
+
+ await waitFor(() => expect(
+ within(row('avibe')).getByText('settings.models.gateway.agentIssues.modelMissing'),
+ ).toBeTruthy());
+ expect(within(row('codex')).queryByText('settings.models.gateway.agentIssues.modelMissing')).toBeNull();
+ });
+
it('lists, selects and edits an Avibe Agent without a native import option or CLI detail', async () => {
const agent = { ...brief('local-helper', 'before'), backend: 'avibe' };
const changed = { ...agent, description: 'updated in place' };
diff --git a/ui/src/components/workbench/AgentsPage.tsx b/ui/src/components/workbench/AgentsPage.tsx
index bd7d35098..0d676250a 100644
--- a/ui/src/components/workbench/AgentsPage.tsx
+++ b/ui/src/components/workbench/AgentsPage.tsx
@@ -64,6 +64,8 @@ import {
type Backend,
} from '../../lib/backendAccent';
import { getBackendUiMeta, type NativeCliBackend } from '@/lib/agentBackends';
+import { modelsApi } from '../settings/models/modelsApi';
+import { agentsWithoutModel } from '../settings/models/supply';
import { errorMessage } from '@/lib/errorMessage';
// Tab set + its cross-visit memory live together so the remembered value can
// never name a tab this page no longer renders (see agentsViewMemory).
@@ -303,6 +305,8 @@ export const AgentsPage: React.FC = () => {
const [runningActiveCount, setRunningActiveCount] = useState<number | null>(null);
const [eventBridgeConnected, setEventBridgeConnected] = useState(false);
const [agents, setAgents] = useState<VibeAgentBrief[]>([]);
+ // Agents the gateway cannot run for want of a model, read again whenever the list changes.
+ const [withoutModel, setWithoutModel] = useState<ReadonlySet<string>>(() => new Set());
const [defaultName, setDefaultName] = useState<string | null>(null);
const [selected, setSelected] = useState<VibeAgentFull | null>(null);
const [loading, setLoading] = useState(false);
@@ -1113,6 +1117,21 @@ export const AgentsPage: React.FC = () => {
void refreshOnboarding();
}, [refreshOnboarding]);
+ // The Models page's per-Agent projection: an Agent shown as enabled whose next turn fails
+ // for want of a model says so here too. A role that cannot read it sees no marker.
+ useEffect(() => {
+ let active = true;
+ modelsApi.listAgents().then(
+ (supplies) => {
+ if (active) setWithoutModel(new Set(agentsWithoutModel(supplies).map((named) => named.name)));
+ },
+ () => {},
+ );
+ return () => {
+ active = false;
+ };
+ }, [agents]);
+
// Auto-select the default agent on first load so the detail panel has
// something to show — eliminates the empty "select an agent" state
// that confused users on first visit.
@@ -1603,6 +1622,7 @@ export const AgentsPage: React.FC = () => {
agent={agent}
isSelected={selected?.name === agent.name}
isDefault={defaultName === agent.name}
+ modelMissing={agent.enabled && withoutModel.has(agent.name)}
onSelect={() => selectAgent(agent.name, true)}
/>
))}
@@ -1784,10 +1804,12 @@ interface AgentRowProps {
agent: VibeAgentBrief;
isSelected: boolean;
isDefault: boolean;
+ /** Enabled, but its next turn fails: the gateway has no model selected for it. */
+ modelMissing: boolean;
onSelect: () => void;
}
-const AgentRow: React.FC<AgentRowProps> = ({ agent, isSelected, isDefault, onSelect }) => {
+const AgentRow: React.FC<AgentRowProps> = ({ agent, isSelected, isDefault, modelMissing, onSelect }) => {
const { t } = useTranslation();
const description = [agent.model, agent.reasoning_effort, agent.description].filter(Boolean).join(' · ');
return (
@@ -1817,6 +1839,11 @@ const AgentRow: React.FC<AgentRowProps> = ({ agent, isSelected, isDefault, onSel
</div>
{description && <div className="text-[11px] text-muted">{description}</div>}
</div>
+ {modelMissing && (
+ <Badge variant="warning" className="shrink-0">
+ {t('settings.models.gateway.agentIssues.modelMissing')}
+ </Badge>
+ )}
<Badge variant={agent.enabled ? 'success' : 'secondary'} className="font-mono uppercase">
<span className={clsx('size-1.5 rounded-full', agent.enabled ? 'bg-mint' : 'bg-muted')} />
{agent.enabled ? t('agents.statusEnabled') : t('agents.statusDisabled')}
diff --git a/ui/src/components/workbench/FailureRetry.test.tsx b/ui/src/components/workbench/FailureRetry.test.tsx
index 0588352d8..436e4809f 100644
--- a/ui/src/components/workbench/FailureRetry.test.tsx
+++ b/ui/src/components/workbench/FailureRetry.test.tsx
@@ -51,6 +51,21 @@ describe('failed-turn retry action', () => {
expect(screen.getByRole('button', { name: '已请求重试' })).toBeTruthy();
});
+ it('MESSAGE-DELIVERY-322: offers no retry when the interrupted command continues as a Watch', () => {
+ mount({
+ message: {
+ ...notice,
+ text: '⚠️ 本轮执行被中断——Avibe 服务在它运行期间重启。正在运行的命令已作为 Watch w_1 继续执行,结果会发到这里。',
+ metadata: {
+ event: 'backend_failure', backend: 'avibe',
+ failure_id: 'turn:interrupted-turn', turn_id: 'interrupted-turn', detached: false,
+ replayed: true, watch_ids: ['w_1'],
+ },
+ },
+ });
+ expect(screen.queryByRole('button', { name: '重试' })).toBeNull();
+ });
+
it('locks a click burst and reports only an admitted retry', async () => {
let finish!: (value: boolean) => void;
const pending = new Promise<boolean>((resolve) => { finish = resolve; });
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index aacbb3b51..fdf34c84b 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -2023,7 +2023,8 @@
"detected": "Existing direct config detected: {{detail}} — import it into the gateway in one click",
"import": "Import to gateway…"
},
- "fixHint": "Add or enable a source on the Models page to bring it back."
+ "fixHint": "Add or enable a source on the Models page to bring it back.",
+ "warningWithFix": "{{warning}}. {{fixHint}}"
},
"migration": {
"open": "Migrate configuration",
diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.json
index bd8594456..aa29e7e3e 100644
--- a/ui/src/i18n/zh.json
+++ b/ui/src/i18n/zh.json
@@ -2023,7 +2023,8 @@
"detected": "检测到现有直连配置:{{detail}},可一键导入模型网关",
"import": "导入模型网关…"
},
- "fixHint": "去「模型」页添加或启用供应商即可恢复。"
+ "fixHint": "去「模型」页添加或启用供应商即可恢复。",
+ "warningWithFix": "{{warning}}。{{fixHint}}"
},
"migration": {
"open": "迁移配置",
diff --git a/ui/src/lib/chatMessageTypes.ts b/ui/src/lib/chatMessageTypes.ts
index f0cbc9247..52d9072b9 100644
--- a/ui/src/lib/chatMessageTypes.ts
+++ b/ui/src/lib/chatMessageTypes.ts
@@ -72,7 +72,9 @@ export function isBackendFailureNotice(
}
// This is action eligibility, not transcript visibility. The server additionally
-// rechecks the durable failed-Turn boundary and current Session authority.
+// rechecks the durable failed-Turn boundary and current Session authority. A
+// Turn whose running commands continue as Watches (``watch_ids``) is not retried:
+// that would run them twice.
export function isRetryableFailureNotice(
message: TerminalAgentMessageCandidate & { source?: string | null },
): boolean {
@@ -80,7 +82,8 @@ export function isRetryableFailureNotice(
return isBackendFailureNotice(message)
&& typeof metadata?.turn_id === 'string'
&& !!metadata.turn_id
- && !metadata.detached;
+ && !metadata.detached
+ && !(Array.isArray(metadata.watch_ids) && metadata.watch_ids.length > 0);
}
// A terminal reply the TRANSCRIPT shows: the catalog's terminal activity role
diff --git a/vibe/i18n/en.json b/vibe/i18n/en.json
index fe2359a9c..09d183bb7 100644
--- a/vibe/i18n/en.json
+++ b/vibe/i18n/en.json
@@ -1047,7 +1047,9 @@
"turn": {
"interrupted": {
"backendRefresh": "⚠️ This turn was interrupted — its Agent runtime was restarted while it was still running, for example after switching between the Model Hub and direct mode or saving Agent settings. Send the request again if the work still needs doing.",
- "serviceRestart": "⚠️ This turn was interrupted — the Avibe service restarted while it was still running. Send the request again if the work still needs doing."
+ "serviceRestart": "⚠️ This turn was interrupted — the Avibe service restarted while it was still running. Send the request again if the work still needs doing.",
+ "serviceRestartWatch": "⚠️ This turn was interrupted — the Avibe service restarted while it was still running. Its running command continues as Watch {watch}, and the result will follow here.",
+ "serviceRestartWatches": "⚠️ This turn was interrupted — the Avibe service restarted while it was still running. Its running commands continue as Watches {watches}, and their results will follow here."
}
},
"runtime": {
diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.json
index 82490a076..585b3609a 100644
--- a/vibe/i18n/zh.json
+++ b/vibe/i18n/zh.json
@@ -1047,7 +1047,9 @@
"turn": {
"interrupted": {
"backendRefresh": "⚠️ 本轮执行被中断——它运行期间 Agent 运行时被重启(例如在模型网关和直连之间切换,或保存了 Agent 设置)。如果这项工作仍然需要完成,请重新发送请求。",
- "serviceRestart": "⚠️ 本轮执行被中断——Avibe 服务在它运行期间重启。如果这项工作仍然需要完成,请重新发送请求。"
+ "serviceRestart": "⚠️ 本轮执行被中断——Avibe 服务在它运行期间重启。如果这项工作仍然需要完成,请重新发送请求。",
+ "serviceRestartWatch": "⚠️ 本轮执行被中断——Avibe 服务在它运行期间重启。正在运行的命令已作为 Watch {watch} 继续执行,结果会发到这里。",
+ "serviceRestartWatches": "⚠️ 本轮执行被中断——Avibe 服务在它运行期间重启。正在运行的命令已作为 Watch {watches} 继续执行,结果会发到这里。"
}
},
"runtime": {