Skip to content

code-yeongyu/oh-my-openagent / packages/omo-senpi/skills/omo-relay

omo-relay

Verified

Works on the account's other devices through omo's built-in relay from a js eval cell: run a command or a long job on another machine, read, write, edit or search its files, copy a directory tree to or from it, and run one operation on every machine, on chosen machines or on several threads at once with one outcome per target. Use when the user names another device, machine, host or computer of the account, asks for something on every machine or on all or several threads at once, or wants a fan-out or a remote command or file.

references/parallel.md

View on GitHub
# Parallel work

Every helper answers a `BatchResult`: one outcome per target, in the order you gave the targets (the device list's order for the every-* helpers), and one target's failure never rejects the batch.

```ts
type Settled<Target, Value> =
  | { kind: "fulfilled"; target: Target; value: Value }
  | { kind: "rejected"; target: Target; error: { code: string; message: string; next_action: string; uncertain?: true } }
  | { kind: "skipped"; target: Target; reason: string }
type BatchResult<Target, Value> = { outcomes: Settled[]; fulfilled: Settled[]; rejected: Settled[]; skipped: Settled[]; ok: boolean }
```

`ok` is true only when nothing was rejected or skipped.

## Machines

| Shape | Call | Target in each outcome |
|---|---|---|
| Every machine of the account | `relay.onEveryMachine(fleet, op, { timeoutMs?, concurrency? })` | `{ id, alias, state }` |
| The machines you name (ids or aliases) | `relay.onMachines(fleet, ["device-b", id], op, { timeoutMs?, concurrency? })` | the name you passed |
| One machine | `relay.onMachine(fleet, "device-b", op)` | the name you passed; answers one `Settled`, not a batch |

`op` is `async (m, { signal }) => value`. `timeoutMs` is per machine: when it passes, that machine settles as rejected and the others carry on. Every machine starts at once unless you pass `concurrency`.

Observed on a seven-device account, `onEveryMachine(fleet, (m) => m.shell("uname -s"), { timeoutMs: 30000 })` answered in under a second: five fulfilled (this device among them), one skipped `machine_offline`, one skipped `machine_unsupported`. With a callback that threw on `device-b` only, `device-b` came back rejected with the thrown message and the other outcomes were unchanged.

A name that matches no machine is rejected with `not_found`; an alias two machines share is rejected with `ambiguous` (use the id). Neither runs anything.

## Threads

Bind the port with `relay.threadPortFromTools(tool)`; each helper calls the thread tools for you and turns a tool error into that thread's rejected outcome.

| Shape | Call |
|---|---|
| Send one message to several threads | `relay.sendToThreads(threads, [thread, ...], message, { delivery?, all_scope?, concurrency? })` |
| Read several threads | `relay.readThreads(threads, [thread, ...], { wait_ms?, max_bytes?, all_scope?, concurrency? })` |
| Any thread call on several threads | `relay.onThreads([thread, ...], (thread) => threads.read(thread), { concurrency? })` |
| Every listed thread | `relay.onEveryThread(threads, (row) => ..., { list: { all_scope?, state? }, concurrency? })` |

A thread is named by the `thread` value of a `tool.thread_list()` row. `onEveryThread` lists once and rejects only when that list fails (`ThreadListError` with its `code` and `next_action`): then nothing ran.

## Report the batch

```js
const r = await relay.onEveryMachine(fleet, (m) => m.shell("uname -a"), { timeoutMs: 30000 })
print(r.outcomes.map((o) => `${o.target.alias}: ${
  o.kind === "fulfilled" ? o.value.stdout.trim() : o.kind === "rejected" ? `failed ${o.error.code} (${o.error.next_action})` : `skipped ${o.reason}`
}`).join("\n"))
```

Give the user one line per target, failures and skips included.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall