Repair native launcher skill rename and fail-closed regression coverage (#1498)
This commit is contained in:
@@ -71,7 +71,7 @@ Class honestly. Never downgrade a question you want answered to `terminal-log`.
|
||||
Silence is not an ack. A refusal with a reason is recoverable; a guess is not.
|
||||
4. No secrets. Messages land in scrollback, logs, and possibly comms daemons.
|
||||
5. Waiting on a condition? Arm `agent-watch` on the condition, not a poll of a
|
||||
colleague's pane. Waiting on a seat? Message them (see ms-agent-watch).
|
||||
colleague's pane. Waiting on a seat? Message them (see ms-watch).
|
||||
|
||||
## Receiving
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ file entry, or queued draft does not prove that another turn will occur.
|
||||
|
||||
- Use existing message delivery for another agent's response. Do not poll its private
|
||||
files or pane. Use an available coordinator's timeout mechanism for overdue requests.
|
||||
- Use ms-agent-watch only when installed, supported, and authorized, for external
|
||||
- Use ms-watch only when installed, supported, and authorized, for external
|
||||
conditions with no existing wake owner. Verify a known-false control and the actual
|
||||
condition, distinguishing pending from errors; handle an already-met condition now.
|
||||
Verify registration, bind to the exact resource/version and destination, and record
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
name: ms-agent-watch
|
||||
name: ms-watch
|
||||
description: Use for all instances where a watch, wait, or agentic status check is needed. This skill avoid the need for wait cycles and other methods used to wait for an action outcome.
|
||||
disable-model-invocation: false
|
||||
---
|
||||
|
||||
# ms-agent-watch — self-armed condition watches
|
||||
# ms-watch — self-armed condition watches
|
||||
|
||||
One CLI call arms an isolated `systemd --user` transient timer per watch. Each
|
||||
tick is a fresh, cgroup-isolated process; no loop, no script, no orphan. You
|
||||
@@ -13,7 +13,8 @@ never `sleep`, never write a watch script, never background anything.
|
||||
## Tool
|
||||
|
||||
```bash
|
||||
tools/agent-watch/agent-watch.sh start \
|
||||
MOSAIC_AGENT_SEND="/absolute/checkout/tools/tmux/agent-send.sh" \
|
||||
/absolute/checkout/tools/agent-watch/agent-watch.sh start \
|
||||
--name <lowercase-id> --session <your-tmux-session> \
|
||||
[--socket <tmux-socket>] # REQUIRED for mosaic-fleet seats using tmux
|
||||
--when '<shell command>' # exit 0 = met; quote it
|
||||
@@ -26,6 +27,14 @@ agent-watch.sh log <name> # what it did and why
|
||||
agent-watch.sh stop <name> # retire + clean state
|
||||
```
|
||||
|
||||
Use the actual checkout path in place of `/absolute/checkout`. The CLI otherwise
|
||||
uses a sender under `$HOME/.config/mosaic`, which may not be this repository's
|
||||
reviewed transport. No timers or meta-watch are installed merely by loading this
|
||||
skill. Live watch operations require assignment authority. `list` and `status`
|
||||
can write stale-notice claims and send messages; they are not read-only probes.
|
||||
The CLI's `status [--json]` returns 0 for clean, 3 for stale/dead meta-watch,
|
||||
and 6 for an unreachable systemd user bus. Do not infer health from a failed query.
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Name it for the thing watched** (`ci-pr1350-green`, `peer-orch-01-reply`),
|
||||
@@ -39,8 +48,11 @@ agent-watch.sh stop <name> # retire + clean state
|
||||
4. **Conditions are cron-style**: clean-ish environment, `cwd=$HOME`. Use
|
||||
absolute paths. Do NOT rely on ambient credentials — resolve tokens through
|
||||
the git credential helper or absolute service-credential paths.
|
||||
5. **rc=2 delivery is DELIVERED** (text reached your pane as a draft — FLEET-COMMS
|
||||
E7); the watcher never retries it. Real failures retry twice then retire loudly.
|
||||
5. **Transport is not application acceptance.** The current watcher treats sender
|
||||
exit 0 and 2 as terminal for retry purposes. Exit 0 means transport dispatched,
|
||||
application acceptance unknown; exit 2 does not prove submission or receipt.
|
||||
Its legacy `delivered` log wording is not an acknowledgement. Other sender
|
||||
failures retry twice, then retire; do not add blind resends.
|
||||
6. **A broken condition (exit ≠ 0/1) retires the watch** with a terminal-log
|
||||
note. Check `log <name>` before re-arming — re-arming a broken condition
|
||||
without fixing it just burns another timeout.
|
||||
@@ -48,8 +60,8 @@ agent-watch.sh stop <name> # retire + clean state
|
||||
each watch should correspond to one pending fact.
|
||||
8. **Retire your watches** when the mission closes (`stop`). `list` shows
|
||||
stale-state entries whose timer is gone; stop removes those too.
|
||||
9. Fleet seats MUST pass `--socket mosaic-fleet` — the default is the default
|
||||
socket and the delivery will not reach you.
|
||||
9. Fleet seats MUST pass `--socket mosaic-fleet`. Socket selection is explicit
|
||||
option, then MOSAIC_TMUX_SOCKET, then unique discovery; ambiguity refuses.
|
||||
|
||||
## When NOT to watch
|
||||
|
||||
@@ -65,5 +77,5 @@ agent-watch.sh stop <name> # retire + clean state
|
||||
|---|---|
|
||||
| `started watcher ...` then nothing, timer inactive | condition broke (exit ≠ 0/1) or timeout hit — `log <name>` says which |
|
||||
| `[watch:x] ... timeout after Ns` | retired; re-arm only if still relevant |
|
||||
| delivered (rc=2) in log | delivered as draft into your pane — go read the pane |
|
||||
| delivered (rc=2) in log | legacy retry classification, not proof of receipt; reconcile through authorized records, not private-pane inspection |
|
||||
| delivery failed rc=1 after 3 attempts | your session was gone; restart it, then re-arm |
|
||||
Reference in New Issue
Block a user