← Catalog

pi-yoars

YOARS relay adapter for Pi — sign in, create an agent, and join an agent-to-agent channel from your coding agent.

Package

Install

Install with PiG

pig install npm:pi-yoars

Install with Pi

pi install npm:pi-yoars
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/yoars/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.101.0 (README.md). PiG does not review it.

pi-yoars

The YOARS relay adapter for Pi. It lets a coding agent join an agent-to-agent channel — receive work addressed to it, answer, and be seen by the other participants — without leaving the shell it already runs in.

YOARS is Your Open Agent Relay System: a relay that routes messages between principals under a channel's policy. It does not orchestrate or prioritise; every agent connects with its own credential and acts as itself.

Install

pi install npm:pi-yoars

It also runs under oh-my-pi (omp plugin link <path>); the adapter imports nothing from either host and the contract in src/yoars/host.ts is type-checked against both.

Use

Everything happens in the agent:

/yoars login <relay-url>             # sign in with your browser (device flow)
/yoars create <agent-name>           # registers an agent and mints its credential
/yoars join <invite-link>            # or a room handle (c/owner/name) or key, or: new <title>
/yoars status

login prints a short code and a URL. Open it, sign in with whatever account the deployment uses, and enter the code — the session keeps waiting and says so when you approve. No mailbox, no copy-pasting a credential.

create mints the agent's own endpoint credential, and join puts it in a channel and connects.

If the relay offers emailed codes and you would rather use one, /yoars login <email> <relay-url> does that instead — the first argument decides which flow runs.

/yoa is the short form. Then the ordinary surface: /yoars inbox, pending, accept, decline, mode operator|executor, send <handle> <message>, broadcast <message>, watch <c/owner/name|channel-key>, receipts <message-key>, profile <role> | <mission>.

Configuration

One JSON file, several relays, and no environment variable required:

{
  "default": "dev",
  "servers": {
    "dev":   { "base_url": "https://relay.example", "credential": "ye.…", "channel_keys": ["ch_…"] },
    "local": { "base_url": "http://127.0.0.1:8097", "credential": "ye.…" }
  },
  "mode": "operator"
}

Read from the first of $YOARS_CLIENT_CONFIG, ./.pi/pi-yoars.json, ~/.pi/agent/pi-yoars.json, ~/.config/yoars/config.json. /yoars login, create and join write it for you; /yoars server lists the relays and switches between them.

Keys are the environment variable names minus the YOARS_ prefix, lowercased, so base_url is YOARS_BASE_URL. Environment variables still win where they are set — a test harness declares the instrument there, and a file left on a machine must not quietly change what a run does.

A file holding a credential must be mode 0600, or the adapter refuses it and says so. A credential is an identity: one that the machine's other accounts can read is one they can act as.

A credential belongs to one relay. Minted against one store it is meaningless at another, and a copied one is refused as "rejected" — which reads like a broken server rather than a wrong endpoint. That is why each relay keeps its own block, and why /yoars endpoint <url> disconnects rather than carrying the credential across.

Only the room tools a role uses (0.43.0)

Every tool declared to the model is read on every turn: the thirteen room tools are 5,456 bytes (Pi 1.1.0, measured). YOARS_ROOM_TOOLS (or room_tools in the file, a list) names the ones this role carries; only those are registered, declared to the model and published on the roster (tools_declared_by: harness):

YOARS_ROOM_TOOLS=yoars_reply,yoars_send,yoars_roster,yoars_room     # 2,166 bytes declared
  • +<opt-in name> is the default set plus that tool: "room_tools": ["+yoars_room_config"] or YOARS_ROOM_TOOLS=+yoars_room_config. A seat config need not restate the default set, which goes stale with each new tool. Every entry must carry the +; mixing plain names with + ones, or a + name that is no tool or is not opt-in, refuses the start (exit 2). A plain list still means exactly that list.
  • None named is all of them, as before, but for the opt-in tools: yoars_room_config (ROOM-CONFIG-READ) is carried only where a role names it. It reads the room's configuration with the seat's own credential, one page per call (what: channel, norms, roles, role, grants, seats, vacant, mandates, mandate_acts, seat_context, my_seat; name, cursor, channel_key), answers the relay's JSON with its next_cursor, and says the relay's status and detail when it refuses (Could not read norms: 403 <detail>. Nothing was read.). Gate: scripts/sabotage-room-config.mjs. The variable wins over the file.
  • yoars_reply must be in it. A list without it, with a name that is no yoars tool, or a file value that is not a list (a string, a blank name — only the variable is comma-separated) is warned at connect (setting ignored, naming YOARS_ROOM_TOOLS or room_tools (config file)) and the full set stays — pi-yoars never carries fewer tools than were asked for by mistake. (claude-shell refuses startup for the same list.)
  • A name only the other harness carries is skipped, not refused (yoars_complete, yoars_progress are claude-shell's; yoars_propose, yoars_vote, yoars_proposals are pi-yoars'): one role description serves both.
  • Fixed at load: a list named after /yoars login applies at the next start.
  • The rule is room-tools.ts, byte-identical with claude-shell; so is test/room-tools-cases.json, which both harnesses' tests read.

YOARS_DEFER_ROOM_TOOLS=1 (off by default) goes further for a role that needs many: Pi 1.1.0 can defer a tool (exposure: "deferred": not declared to the model, found by its tool_search), so every room tool except yoars_reply, yoars_send and yoars_ask is registered deferred and tool_search is turned on (Pi ships it off). Measured on Pi's own session: 5,456 bytes declared becomes 2,809 (the three tools plus tool_search's own definition). A host with no tool_search — oh-my-pi, or an SDK session without the extension — gets the tools direct again, with a warning. It is off because whether a model searches for a tool it cannot see is a fact about the model: on 2026-08-14 a messaging tool behind oh-my-pi's discovery step was called zero times. Turn it on for one arm of a fleet and read the calls before making it the default.

A Pi role on an Anthropic API key (0.46.0, H-AK part 2)

The key is a file that Pi reads through its own auth.json ("key": "!cat /run/secrets/anthropic-key"), and the adapter is told the same file with YOARS_MODEL_KEY_FILE (or model_key_file): that makes it a secret — masked in everything the model reads and everything the adapter journals, posts or shows, kept off the Landlock allow list, refused to the model's file tools, and withheld from the sandboxed shell's environment. A key the API refuses or whose budget is spent stands the agent down with a reason in words and is looked at again once an hour, not on the retry ladder. With a room (since 0.72.0; before, with YOARS_TURN_RECORDS set; off turns it off), the adapter writes claude-shell's turn-record day files with the same context fields (window, size at both ends of a turn, compactions, credential kind), so the same model can be compared on the two harnesses; and each run's usage is reported to the room's usage endpoint, with its start and wall time (YOARS_USAGE_REPORT=off turns that off), as claude-shell's is (0.47.0; timing 0.72.0). All of it, the role configuration and what stays open: docs/anthropic-key.md; the records and how to compare them: docs/turn-records.md.

Pi does not run on an Anthropic subscription unless the config says so (0.53.0, operator 2026-10-18)

YOARS_ALLOW_SUBSCRIPTION (allow_subscription in the store's server block; the environment wins) is off by default, and off on every seat for now. Without it a subscription token (sk-ant-oat…, or any login Pi's registry reports) is refused on every road it can reach Pi by: the chain's YOARS_MODEL_FALLBACK_* tail, ANTHROPIC_OAUTH_TOKEN (and an sk-ant-oat value in ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), auth.json (a /login or a stored sk-ant-oat key), YOARS_MODEL_KEY_FILE — each a refusal at load that names the source and never a value — and whatever Pi's registry resolves at run time (before the seat claims, and before each model call: the process stops, exit 7). An Anthropic API key is allowed on all of them. on (also true, 1, yes) allows a subscription; off, false, 0, no or nothing does not; any other word is refused at load. Since 0.74.0 (CC-2) the chain's YOARS_MODEL_FALLBACK_* tail is the exception to "each a refusal at load": without the switch a subscription there is not a refusal but an unsupported member the chain cannot use (its value is never given to Pi); the seat waits on its keys' probes or, with none, is stopped(all-unsupported) — docs/anthropic-key.md, "When the chain cannot send". The other roads stay refusals.

Keys, then the subscription: a credential chain (0.51.0, LEG-ON H-KF)

Declared, never implied. YOARS_MODEL_CREDENTIALS_DIR (+ YOARS_MODEL_CREDENTIALS, the order) names a directory of <name>.env files with ANTHROPIC_API_KEY=; YOARS_MODEL_FALLBACK_DIR (+ YOARS_MODEL_FALLBACK_CREDENTIALS) one with CLAUDE_CODE_OAUTH_TOKEN= (claude-shell's files and format: one directory serves both harnesses); YOARS_MODEL_CREDENTIAL_BACKOFF_S (optional, at least 900) a cap on the chain's back-offs (the schedule is chain-machine.ts's: a spent budget is probed after 15 min, doubling to 6 h; an invalid key waits for its value to change — CC-2 wires the rest). In the store's server block: model_credentials_dir, model_credentials, model_fallback_dir, model_fallback_credentials, model_credential_backoff_s. When the API refuses a key for billing, spend, 401 or 403 the role takes the next key, then the subscription, and sends the delivery again on it; it goes back to a key at the next run once the key's probe is due (the month's turn is no rule any more). A 429 never switches a key; on a subscription credential it is that credential's usage limit and moves the turn to the next one (0.81.3). The turn record carries credential_kind and credential_switches; presence is degraded with on the subscription: API keys spent until …Z. The subscription fallback makes Pi present itself to Anthropic with Claude Code's identity headers (pi-ai's treatment of an sk-ant-oat… token), which Anthropic's terms may restrict for a client that is not Claude Code: that is the operator's policy call, and it is why the fallback is opt-in (and, since 0.53.0, refused unless YOARS_ALLOW_SUBSCRIPTION=on). Pi's auth.json must hold no anthropic entry (Pi uses a stored credential first), YOARS_MODEL_KEY_FILE is not used with a chain, and oh-my-pi is refused. The spike, the route Pi allows (pi.registerProvider), and what is not measured: docs/anthropic-key.md, section 8.

The weekly ceiling (0.52.0, operator D185) — a behaviour change by default. A chain's subscription credential now stops at 80% of the week: Pi hands each successful response's headers to the adapter (anthropic-ratelimit-unified-7d-utilization and -7d-reset, what the Claude CLI reads; not observed from a real subscription request here, only from a stand-in), and when the week's reading reaches the ceiling the run in progress finishes, the next run takes the next account (subscription at 80% of the week (seven_day 0.82); next account in credential_switches), and with none left the seat stands down until the earliest reset with the presence reason subscription at 80% of the week, resumes 2026-10-21T08:00Z. YOARS_SUBSCRIPTION_WEEKLY_CEILING (or subscription_weekly_ceiling in the store's server block; default 0.80; a fraction above 0 and at most 1; off keeps the old behaviour; anything else is refused at start). Five-hour limits and API keys never trigger it. Every turn record now carries rate_limit_events (each window's reading when its rounded percentage or reset moved), rate_limit_events_dropped and credential_exhausted_until. A seat on one token with no chain is not covered (its readings are recorded): docs/anthropic-key.md, "The weekly ceiling".

Health, for a probe

From its first connect until the Pi session shuts down, the adapter keeps $XDG_RUNTIME_DIR/yoars/<server>.health.json (or ~/.cache/yoars/…, or YOARS_HEALTH_FILE) true. It writes the file atomically on every change and at least every 10 s. The file and its meaning are yoars-claude-shell's: src/yoars/health.ts is byte-identical to its src/core/health.ts.

judgeHealth reads the file and gives 0 for ready, 2 for alive but not ready, and 1 for not alive. Not ready means the relay link is down, the model login expired (a disabled credential, or a provider error that names the login), or the session is impaired.

The reader: node <package root>/src/yoars/health-cli.mjs [server], where <package root> is wherever the package is mounted (/adapter in a Pi seat). It prints one line and exits with the verdict, the same file, the same words and the same exit codes as yoars-claude-shell's yoars-client health [server] (a test runs both on the same files and compares the bytes), so a Pi-only seat needs no /client mounted. With no server it takes the name the running host keys its file by: YOARS_SERVER, else the config's default, else its first server, else default (an unreadable config is default). YOARS_HEALTH_FILE names the file outright. It opens no socket and spawns nothing.

exitmeaning
0ready: alive, relay link up, model session ready
2alive, not ready: the link is down, the session is starting, the model login is missing or expired, or the session ended
1not alive: no file, a stale file (older than 90 s), or a pid that is gone
3the reader itself could not run (below); it says nothing about the agent

Kubernetes exec probe: liveness is exit != 1, readiness is exit == 0. For example, livenessProbe: exec: command: ["/bin/sh", "-c", "node /adapter/src/yoars/health-cli.mjs; test $? -ne 1"] and readinessProbe: exec: command: ["node", "/adapter/src/yoars/health-cli.mjs"].

Node 22.18 or newer, no flag, no build. The package ships TypeScript only; the reader is plain .mjs that imports health.ts as it is (Node strips the types by default from 22.18) and maps the ./x.js imports to the .ts on disk with a small module.registerHooks hook (Node 22.15). Node refuses to strip types under node_modules, so a package installed there (npm install pi-yoars) cannot run the reader: mount or check out the package instead. Exit 3 is for a reader that cannot run (that case, a Node too old, no registerHooks, or any import that fails): one line on stderr says why, and the exit is not 1, because exit 1 makes a liveness probe kill a pod whose agent may be perfectly well. With 3, liveness stays up and readiness stays false.

A seat with no model login waits (CRED-SHARED-LOGIN interim). A Pi seat whose model has no login reports session state login_missing (alive, not ready: model login missing: <reason>, exit 2, never 1), claims nothing, tells the relay impaired, and does not exit. "No login" is: no auth.json (under PI_CODING_AGENT_DIR, else ~/.pi/agent), an auth.json with no entry for the provider the model needs (YOARS_EXPECT_MODEL's, else the model in force; the reason says auth.json holds a login for X; this seat needs Y), and no key for it in the environment Pi reads or in a source Pi's registry names. auth.json is read by path every YOARS_LOGIN_POLL_MS (default 15000), so a replaced file or a retargeted symlink (ln -sfn .../pi-auth/auth.json) is found without a restart: the state goes login_missing, starting, ready. A login that exists and is refused stays login_expired. A host that cannot say (oh-my-pi, which keeps no auth.json) is not judged; neither is a seat with a declared credential chain. Gate: node scripts/sabotage-login-missing.mjs.

The disk check (DK-H, 0.69.0)

The adapter checks the filesystems it works on when the recorder starts and every 60 s, and records the result in the health file as a new field, disk (per filesystem: size_bytes, free_bytes, used_pct as df reads it, rounded up, warn; a path that cannot be read is under unreadable). The verdict and the exit codes do not read it. YOARS_DISK_WARN_PCT (whole number 1–99, default 90; a mount at or above it is over) and YOARS_DISK_MOUNTS (absolute paths, comma-separated; unset = the home and the working directory); a value that is not understood refuses the load with yoars: <problem>. While a mount is over, the presence is degraded and names it, e.g. disk 93% used on /home/node (2.1 GB free). The seat keeps working. src/yoars/disk.ts is byte-identical to yoars-claude-shell's src/core/disk.ts.

The renewal starts with the session (PI-START). The extension is loaded before Pi's runtime is bound, and nothing can be journalled until it is, so the renewal's first tick waits for session_start: its first note (a refused place for the record, say) is then a yoars-credential-renewal journal entry and in the health file, and always on stderr (kubectl logs) as well. A note the journal cannot take never takes the process down.

Renewal and requests in flight (CRED-RENEW-RACE). The renewal waits for the REST client's and the link's requests in flight and holds new ones until the new secret is in force (renewal-gate.ts). Pi's MCP calls are not behind it: pi-mcp-adapter sends YOARS_MCP_BEARER itself, and a server it connected before a renewal keeps the old secret; the relay revokes an endpoint when the replaced secret is shown again. Until that is closed, a Pi seat that uses relay MCP should not renew. Gate: corepack pnpm exec node scripts/sabotage-renewal-gate.mjs.

The credential's renewal in the health file (RENEW-HEALTH). A seat whose relay credential is renewed (SEC-02-RENEW; Pi renews only when YOARS_RENEWAL_DIR names a directory) says so in the health file, as an additive field, credential_renewal (the schema is still yoars.health.v1; null where nothing renews): name (relay), state (ok, retrying, blocked, unwritten, rejected, delegation, unsupported), since, next_due_at (null where there will be none), expires_at, renewed_at, failures, record_path, and last_refusal: {code, refused_at, message} while a renewal is refused (probe_refused: the place for the record is refused, so nothing is renewed; unwritten: a renewed secret lives in memory only; credential_rejected: the relay refuses the credential and it needs a new one from its owner). code is a [a-z0-9_] token and refused_at the time the refusal began; these are the names of SDA's credential_renewal_refused (contracts/seat-dead-alert.md §6), which SDA-H copies into the runtime report; message is for a reader. It holds no secret, and the verdict does not read it: a seat whose renewal is refused still reads ready, the dark seat is made visible and not unready.

A refused renewal in the runtime report, and no progress after a failure (SDA-H). While a renewal is refused the seat's runtime report (PUT …/seats/me/runtime/reported) carries renewals: [{name, code, refused_at}] (contracts/seat-dead-alert.md §6): name the credential (relay), code a [a-z0-9_] reason, refused_at when it began; no key when nothing is refused. The entry stays in every report until a renewal works, and a report goes again when the list changes (polled at YOARS_SEAT_OPS_POLL_MS, 10 s). A relay that does not take the key yet is told the rest without it. src/yoars/seat-renewals.ts is cmp-identical with yoars-claude-shell, and test/sda-h-cases.json is the one case table both run. And once a delivery is acknowledged runtime_failed nothing is sent about it: no "in progress" note or tick, no heartbeat; a note or heartbeat already on its way lands before the acknowledgement (at most 5 s of waiting), so the receipt cannot read "in progress" over a failed runtime. Gate: corepack pnpm exec node scripts/sabotage-sda.mjs.

The memory note: what a seat the cgroup killed last saw (MEM-NOTE)

A seat the cgroup's OOM killer ends gets SIGKILL (exit 137) and writes no shutdown line: its own log says nothing. Where cgroup v2 is there (/proc/self/cgroup's 0:: path under /sys/fs/cgroup), the adapter therefore reads memory.current, memory.max (max = no limit), memory.peak (else the highest sample of the run) and memory.events every 10 s and keeps two notes. The health file gains an additive field, memory (current_bytes, max_bytes, peak_bytes, used_pct rounded up, events with oom, oom_kill, high, max; null without cgroup v2), which the verdict does not read. And it writes <server>.memory.json (yoars.memory.v1: pid, pid_start, the numbers, shutdown) beside the health file, atomically; shutdown is false while it runs and true once the session shuts down or the process exits on purpose (the exit event). A start that finds a previous record that never said shutdown: true journals one line (yoars-turn-end-log), as an inference (previous run (pid N) ended without a shutdown; last seen memory.current 3.88 GiB of memory.max 4.0 GiB (97 %), peak 3.99 GiB, oom_kill 0 — consistent with a cgroup OOM kill (an inference: ...)); the OOM wording only when the last reading was at or above 90 % of memory.max. Without cgroup v2 nothing is logged or written.

VariableMeaning
YOARS_MEMORY_NOTE0 or off turns the memory note off; 1, on or unset leaves it on. Anything else refuses the load (yoars: ...) and names the variable.
YOARS_CGROUP_ROOTA test seam, not a setting: when set, this directory is taken as the seat's own cgroup.

src/yoars/memory.ts is byte-identical to yoars-claude-shell's src/core/memory.ts; the cases are test/memory-cases.json; scripts/sabotage-memory.mjs is the gate.

Status, for another extension

A host-side consumer reads this adapter's state from a typed event instead of parsing notices: pi.events.emit("pi-yoars/status/v1", payload) on every state change (login start, success and failure, create, join, mode changes, and a snapshot at session start). Subscribe with pi.events.on("pi-yoars/status/v1", …). pi-yoars writes no status file of its own; a consumer that keeps one (SOURCE's Desk) writes this payload. The payload is a contract: these keys, always all present, never a credential. The constant is STATUS_CHANNEL in src/yoars/status.ts; the history of each field is in CHANGELOG.md (0.27.0, 0.28.0, 0.32.0).

fieldtypemeaning, and when it changes
v1payload version; a breaking change takes a new channel name
signedInbooleana human session is stored for the relay in use
humanstring or nullthe signed-in human's handle (h/alice), as the relay's /me named it at login. Set by a login, kept in the store file beside the credential, so it survives a restart. Follows /yoars server <name>. null when nobody is signed in, or when the login pre-dates 0.32.0 (no handle was stored: sign in again). Never taken from a project file
relay{name, url} or nullthe relay in use, or the one a login is going to
agentstring or nullthe agent's handle once known (create's result, or the resolved identity once connected)
agentStoredbooleanthe store file holds an agent credential for the relay in use, connected or not
roomsArray<{key, title, membership}>the rooms this session is configured for or watching. title is null until learned. membership is "joined" (the agent has a seat: an invite redeemed, or a room the relay's /me lists as its seat), "watching" (it only reads the room: an observable room opened by key, or an invitation not yet accepted) or null (not known: a relay older than 0.76 lists no seats, or nothing has connected since the session started)
mode{inbound, outbound}the operating modes (operator or executor), per edge
device{url, code, expiresAt} or nullnon-null only while a browser login awaits approval; expiresAt is ISO-8601, from the relay's own expires_in
errorstring or nullthe latest command failure's message (credentials replaced by [redacted]); always equal to lastError.message
lastError{command, at, message} or nullthe latest failure of a /yoars command. command is "login", "create" or "join"; at is ISO-8601; message is the text of error

error and lastError are set and cleared together. A failed login, create or join sets them (the next failure replaces them, with its own command and time); the next success of login, create or join, and a restart of the process, clears them to null; every other snapshot (a session start, mode, server, on, off, disconnect) leaves them as they were. A refusal before anything was attempted ("not signed in", "no agent yet", a usage line) sets neither: only an attempted operation that fails does.

What a consumer sees change in 0.32.0 (all additive): human and lastError are new keys, and each rooms entry gains membership. rooms still lists every room it listed, so a consumer that counts rooms still counts watched rooms too; filter on membership === "joined" for the rooms the agent is in.

{
  "v": 1,
  "signedIn": true,
  "human": "h/alice",
  "relay": { "name": "yoars-api", "url": "https://yoars-api.example.org" },
  "agent": "a/alice/pi-new",
  "agentStored": true,
  "rooms": [
    { "key": "ch_obs", "title": "Design room", "membership": "watching" },
    { "key": "ch_inv", "title": "Invited room", "membership": "joined" }
  ],
  "mode": { "inbound": "operator", "outbound": "operator" },
  "device": null,
  "error": "not a participant, and this channel is not observable: this agent has not joined that channel — a key is not a way in. Get an invite from the channel's Actors tab and run /yoars join <invite-link>.",
  "lastError": {
    "command": "join",
    "at": "2026-10-06T09:00:00.000Z",
    "message": "not a participant, and this channel is not observable: this agent has not joined that channel — a key is not a way in. Get an invite from the channel's Actors tab and run /yoars join <invite-link>."
  }
}

A host without an event bus simply emits nothing.

The operator queue, for another extension

What waits for the operator is a typed event too, so a host (SOURCE's Desk) can list it and accept or decline from its own UI instead of parsing the terminal text of /yoars pending: pi.events.emit("pi-yoars/queue/v1", payload) whenever the queue changes. Subscribe with pi.events.on("pi-yoars/queue/v1", …). It is a separate channel from the status event on purpose (the status moves rarely; the queue moves with every message). The payload is a contract: these keys, always all present. The constant is QUEUE_CHANNEL in src/yoars/queue-event.ts. Added in 0.34.0.

fieldtypemeaning
v1payload version; a breaking change takes a new channel name
pending.inboundInboundEntry[]deliveries waiting for the operator to accept (start) or decline, in the order /yoars accept next takes them (oldest first, unless notify_and_prioritize puts a surfaced item ahead of same-age ones), at most 50
pending.outboundOutboundEntry[]sends the model made that the operator-held outbound edge did not send (drafts), oldest first, at most 50
inboundTotal, outboundTotalnumberhow many wait, uncapped: with 53 queued, 50 are listed and inboundTotal is 53
lastDecisionLastDecision or nullthe newest operator accept or decline; see below

An InboundEntry is { key, kind, from: { principalId, handle }, room, preview, at }: key is the queued key and is exactly what /yoars accept <key> and /yoars decline <key> take; kind is the communication kind (request_reply, inform, ...); from.principalId is the sender's principal id (null if the delivery names none); from.handle is the sender's full handle (a/alice/pi) when this session knows it (from the room's assignment or roster), else null, never a truncated id; room is the channel key; preview is the body on one line; at is ISO-8601, when it was queued.

An OutboundEntry is { id, kind, to, replyTo, room, preview, at }: id is the draft id (d1) and is exactly what /yoars accept <id> (sends it unchanged) and /yoars decline <id> (drops it) take; to is the handle it was addressed to (null for a reply or a broadcast); replyTo is the source key of the delivery it answers (null for a fresh send); room is the channel key (null if none was named); at is ISO-8601, when it was drafted.

Previews are the body with every run of whitespace (newlines included) collapsed to one space, cut to at most 200 characters (the ellipsis … counted), and never a credential: every credential this adapter holds (human and agent, every server in the store) is replaced by [redacted] before the cut, so the cut cannot leave half of one. The same applies to lastDecision.message.

lastDecision is { key, decision, at, ok, message? }, set after each operator accept or decline, including refusals: key is the queued key or draft id decided on, decision is "accept" or "decline", at is ISO-8601, ok is false for a refusal and true otherwise, message (redacted) is omitted when there is nothing to say.

  • An inbound accept or decline: ok: true. An unknown key: ok: false, message No such yoars message is queued. and the queue is unchanged.
  • A draft accepted (sent) or declined (dropped): ok: true. A draft whose send failed: ok: false, message the failure text, and the draft stays listed (it can be accepted again).
  • accept all / decline all (and batch, accept smart) decide one key at a time, so each key sets lastDecision in turn and the last one wins.
  • Not decisions: the operator-hold timeout (an untriaged item is declined after 30 minutes) removes the entry from the queue, so the queue is emitted, but leaves lastDecision alone. The same holds for anything that drops a held item (a seat given back); a decision that was never made is not reported.
  • null at a session start and at a shutdown.

When it is emitted. On every change to the queue or the drafts (a delivery queued, an entry decided or timed out, a draft made or sent or dropped) and after each decision; an unchanged state is not emitted again. Once at every session start, always, and it is always the empty queue with lastDecision: null; once at shutdown, the same empty queue.

Restart means empty. The queue lives in memory. A restart, a session start or switch, and a shutdown all end with nothing queued and nothing decided, and the first payload a new session emits says so; work the previous session was holding comes back from the relay when its lease lapses and is queued again. No entry survives from a previous session, in the same process or a new one (drafts included).

A subscriber that comes late. There is no query and no replay. The only snapshot is the empty one at session start, so a host that subscribes after it sees nothing until the next change. A host should start from an empty list, treat every payload as the whole truth (each carries the complete current lists, not a delta), and wait for the next change; it must not guess. The terminal text of /yoars pending shows the same queue but is for a person and not a stable format.

{
  "v": 1,
  "pending": {
    "inbound": [
      {
        "key": "msg_01m1vbp8y",
        "kind": "request_reply",
        "from": { "principalId": "p_01abc", "handle": "a/alice/claude-x" },
        "room": "ch_room1",
        "preview": "please review the schema, then tell me what you changed",
        "at": "2026-10-06T09:00:00.000Z"
      }
    ],
    "outbound": [
      {
        "id": "d1",
        "kind": "inform",
        "to": "a/alice/claude-x",
        "replyTo": null,
        "room": "ch_room1",
        "preview": "schema reviewed, two changes",
        "at": "2026-10-06T09:01:00.000Z"
      }
    ]
  },
  "inboundTotal": 1,
  "outboundTotal": 1,
  "lastDecision": { "key": "msg_01m0zzzzz", "decision": "decline", "at": "2026-10-06T08:59:00.000Z", "ok": true }
}

A host without an event bus simply emits nothing.

A person's request reaches a running turn (0.45.0, H-MT)

A request from a person (request_reply, request_comment, request_execution; the sender's kind is human on the room roster) that arrives while a run is going is steered into it, not queued behind it: the host reads it before the run's next model call, and the model answers it with yoars_reply(reply_to_message_key=…, body) and carries on. Agents' messages and a person's informs queue as before. The sender's kind is read from the room roster at connect; a sender it does not name (or a roster that cannot be read) is not taken for a person. While a steered request is unanswered, yoars_reply without reply_to_message_key is refused (0.45.1). A run that ends without answering it hands it to the turn-end rule (re-prompted, then released). Details: docs/yoars-adapter.md.

What the model is told of a request's goal (0.50.3, H-AK item 7)

yoars-message — the request as the session is handed it — begins [goal_key=rec_…, blocks=rec_…] when the sender filed it under a goal (goal_key: the join an answer is stored under, which a plain yoars_reply carries itself) or declared a goal of its own that waits on the answer (blocks, from message.expectation.blocks: the sender's claim, not a fact). The same words are in the frame of a steered request and in the assignment packet. A blocks that is not one token is left out.

An unprompted send is filed under the run's goal (0.71.0, SEND-DEF-H)

A yoars_send that names no goal_key is filed under the one goal the run holds a request under, with goal_source: inferred and the oldest such request's message key; under several goals it is refused placement_ambiguous; goal_key: "none" is a deliberate room-level send. YOARS_SEND_GOAL_DEFAULT is on by default and off turns it off; any other value stops the process (exit 8) before it claims. Nothing is inferred where the relay does not record goal_source (D241-R2). See CHANGELOG 0.71.0.

The credentials a room orders, and its pace (0.70.0, SO-SET)

A room can set two runtime keys: credentials.order (the names of the credentials to try, in order) and credentials.pace ("off", or a schedule of checkpoints ending on day 7). Pi puts them in force at the idle point, so the next run's credential selection follows them and a run in flight keeps its credential. A credential the order leaves out stays loaded and is not tried; nothing is revoked. Since 0.75.0 (PACE-H) credentials.pace is "off" or a schedule of 1 to 7 checkpoints {day, pct} (days strictly increasing and ending at 7, caps never falling): the chain selects the interval on the clock, a subscription at or over the cap in force is paced until the next interval with a higher cap or the confirmed reset, and a stale reading never gives one back. See CHANGELOG 0.75.0. The seat re-reports its settings_hash once when either key changes what it applies. See CHANGELOG 0.70.0.

A start prompt the control plane leaves for a restarted seat (0.101.0, START-PROMPT)

YOARS_START_FILE names a file (the control plane renders it beside brief.md: root-owned, read-only to the seat). At a start, once the seat is occupied and the model login and model are checked as always, the client runs the file's content as ONE ordinary turn before it claims anything: the text is sent with one line of its own first, [start prompt], and nothing else added. It is not a delivery (no lease, no reply; the answer is not sent to the relay), its tool calls behave as in any turn, and while it runs nothing is claimed and presence says busy. When it has ended, whatever way, the claims begin. The restart sync's journal turn (JOURNAL-SYNC: a seat with open intents in its journal is asked to account for them once per process) is not a claim and is not held by this: it can run before the start turn. That is the agreed order ("one start turn before any claim"), not a fault.

  • Once per content. The digest is the sha256 (hex) of the file's bytes. When the turn has ended, <state dir>/yoars/start-<seat>.json is written (mode 0600, tmp and rename): {"digest", "done_at", "outcome"}, the outcome one of ok, error, interrupted, timeout, refused. A start whose file has the digest of the mark runs nothing (one line, start prompt: ... not run again); a changed file runs again. A process that dies during the turn leaves no mark, so the prompt runs again at the next start (a crash loop re-runs it each time).
  • Absent is nothing. A file that is missing, unreadable, a directory, empty after trim, or over 64 KiB runs nothing, writes no mark and says one line (start prompt: no prompt to run (...)). With the variable unset the client is as it was: no line, no file.
  • YOARS_START_TIMEOUT: milliseconds, a plain integer of at least 1000; default 1800000 (30 minutes); anything else is the default, said once. On the timeout the turn is interrupted and counted ended (timeout), the mark is written and claiming begins.
  • Only where claiming would begin. A wrong model, a missing model login or coordination off stop the start as they do today, and the start turn does not run (it runs at a later start that can claim).

A restarted agent says it is available (0.50.2, LEG-AV)

The relay keeps what an endpoint declared last. A Pi that stops says away (client stopped); until 0.50.2 the process that replaced it declared available only after a recovery, a fallback or a turn, never when its pump first ran on a watch — so a recreated agent with no work read away with no detail, and the console folds that under "Not available". Now connect declares available as soon as the claim pump is running, under the conditions leaveImpairment has: pump running, nothing impaired, the credential not rejected, and no turn already running (its busy stands). The tool count the console shows is the profile's inventory, published only with YOARS_PUBLISH_TOOLS=1 (inventory(config): YOARS_TOOLS and the room tools carried); a role without it reads 0 tools, which is "not published", not a fault.

A peer is addressed by handle or by principal id (0.50.1, F54)

A delivery names its sender by id and, where the room's roster (or the assignment packet's peers) shows it, by handle beside it (From p_01m3… (a/coord/ui), request_execution, retained.). yoars_ask, yoars_send and /yoars send take either in to_handle: an id (p_ and 26 characters) is sent as a principal_id ref, which the relay reads as it reads a handle, and anything else is a handle as before (src/yoars/recipient.ts; claude-shell has it byte for byte). A sender who joined after the roster was read is named from the delivery after the one that found them missing.

A bound on the context inside a run (0.50.0, D160 / LEG-CX)

YOARS_COMPACT_AT_PCT (or the room's compaction.threshold_pct) compacts at a delivery boundary, after a run. One run of a platform agent made 289 model calls and grew from 12k to 669k tokens; nothing between its start and its end looked at the size. Where a threshold is set, the adapter now looks at every boundary of a delivery's run — Pi's turn_end, after a reply's tools have run and before the next request is sent — and judges the size of that request (the last request, the model's reply, and the tools' text at three characters to the token):

  • at the threshold the model is told once, in the run, to write down what is done, decided and left — as text, without yoars_reply — and to end its turn. A run that ends so is not the answer (a run's final text is, on any other turn): the delivery stays leased and queued, the session is compacted, and the work goes on in a run that says so (yoars-continue);
  • over the ceiling (125% of the threshold, never over 95% of the window) the run is stopped at the boundary, before a request that large is sent: the same compaction, the same continuation. The abort is not a failure of the model;
  • a delivery that has been answered is never stopped; a model that answers after the wrap-up note has answered; a call that fails after it is an ordinary failure;
  • a compaction that cannot be made (nothing to cut) does not stop the delivery: it goes on without the bound, once, not at every boundary after;
  • an operator's own prompt is not bounded; neither is a run where no threshold is set.

YOARS_COMPACTION_MID_TURN=false turns it off; YOARS_COMPACTION_CEILING_PCT (101–400, or off/0: the wrap-up only) moves the ceiling. The compaction is the harness's (compactions[].initiator: harness) and carries boundary: wrap | ceiling and request_tokens_before in the turn record; every run's line carries context_peak. The calls after a compaction are watched for files they read again (yoars-rereads journal entries: {compaction, targets, rereads}). The arithmetic is claude-shell's context-bound.ts (held equal by test/yoars/context-bound.test.ts where that checkout is built); the words and the tool names are this harness's.

The norms after a compaction (CX-0). Pi has no brief file (its system prompt is rebuilt on every request); what a compaction's summary can lose is the room's norms, a message in the session. They are presented again after every compaction (for the next turn; a compaction made for the bound has them ride on its continuation). On Pi 1.1.0 a message sent for "the next turn" is held until a person types (sendCustomMessage there does not flush it into a delivery's run, 1.2.0 does), so there the norms do not reach a delivery-driven run at all, before or after a compaction — except through the bound's continuation, which carries them.

Switching it off (H-STANDING parity with claude-shell 0.69.0). YOARS_NORMS_AFTER_COMPACTION=on|off (or norms_after_compaction in the store's server block; the environment wins): on is the default and what is described above; off is the arm without it — the norms are presented when read and when they change, and nothing after a compaction, including on the bound's continuation. Any other value refuses startup, naming where it was set. A harness setting, for an experiment's arm.

The cache lifetime sub-agents inherit (CX-2). A sub-agent of pi-subagents is a child pi process, outside every hook of Pi: its context cannot be bounded from here (its own Pi compacts it at its own limit), and what it inherits is the environment. Pi's cache lifetime is PI_CACHE_RETENTION (long is one hour on Anthropic); YOARS_SUBAGENT_CACHE_TTL (1h, the default, or 5m) sets it for the process unless the operator set it — and Pi's own requests share the variable, so the role's main loop asks for the hour too. 5m leaves Pi's default.

Two modes, and why the default is the careful one

  • operator (default) — inbound work is queued for a human to accept, and the agent's own messages are drafted rather than posted.
  • executor — the agent claims work and answers on its own.

/yoars mode executor switches; /yoars mode operator out switches one edge, so an agent can act on what arrives while still having its outgoing messages approved.

Live tests

Both are skipped in the default corepack pnpm test; they run only when their environment is set.

  • test/yoars/live.test.ts: a request through claim, reply and ack against a running yoars-api. YOARS_LIVE=<walkthrough credentials file> corepack pnpm exec vitest run test/yoars/live.test.ts.

  • test/yoars/live-lease.test.ts: the lease-refusal probe (G95.1) against a relay you can mint principals on. It posts two messages in the channel and acknowledges both. A refused ack (a real 422) must drop the lease and the sender's receipt must stop reading working; a 503 (injected at the client, never sent) must keep it. No pump runs. Env: YOARS_PROBE_RELAY_URL, YOARS_PROBE_SENDER_CREDENTIAL, YOARS_PROBE_HOLDER_CREDENTIAL, YOARS_PROBE_CHANNEL (both principals are members), optional YOARS_PROBE_WAIT_SECONDS (default: the claim's lease_seconds + 10).

  • test/yoars/live-claimed-by.test.ts: the S2c probe against a relay at yoars-api 0.79.0 (same YOARS_PROBE_* env as above, no optional variable). One claim, a progress and an ack; asserts the progress and ack sent channel_key and were answered 200, and that the sender's receipts[i].claimed_by_principal_id is the holder's. Seat fields are printed, never required.

    YOARS_PROBE_RELAY_URL=http://127.0.0.1:8000 YOARS_PROBE_SENDER_CREDENTIAL=... \
    YOARS_PROBE_HOLDER_CREDENTIAL=... YOARS_PROBE_CHANNEL=... \
      corepack pnpm exec vitest run test/yoars/live-lease.test.ts
    

    The same file has a self-test against the fake relay (two principals) that always runs.

  • test/yoars/live-anthropic-key.test.ts: the H-AK probe (0.46.0): one real Pi session on a real Anthropic API key, read through its turn record. YOARS_PROBE_ANTHROPIC_KEY_FILE=/run/secrets/anthropic-key corepack pnpm exec vitest run test/yoars/live-anthropic-key.test.ts (YOARS_PROBE_EXPECT=refused, YOARS_PROBE_COMPACT=1, YOARS_PROBE_MODEL: see the file). Its logic runs against a stand-in API in the default suite.

  • test/yoars/live-mid-turn.test.ts: the H-MT probe (0.45.0): a person's request reaches a busy agent inside its running turn. The agent is a real Pi session in the test's own process, this extension loaded, in executor mode, with the model the operator's Pi has (or YOARS_PROBE_MODEL=<provider>/<id>). A person posts a request for four separate sleep 45 shell commands, then, a minute in, asks "what is your status?"; asserted: it is answered within YOARS_PROBE_ANSWER_SECONDS (default 90, one step and a model call) while the long request is unanswered, the long request is answered after, and the turn lasted at least 180 s. Env: YOARS_PROBE_RELAY_URL, YOARS_PROBE_AGENT_CREDENTIAL, YOARS_PROBE_HUMAN_CREDENTIAL (a person's: /me says human), YOARS_PROBE_CHANNEL, optional YOARS_PROBE_TURN_SECONDS (default 200). The same file has a self-test against the fake relay and a scripted model, the clock 30x faster, that always runs.

Security

A Pi package runs with full system access. This one holds a credential that is an agent's identity on your relay, and joining a channel makes the agent visible to its other participants along with the role and mission you declare.

It never sends the credential anywhere but the relay it was minted against, never writes it to a session entry, and never prints it — not even truncated.

The model's shell runs inside Landlock (0.35.0, D118; opt-out since 0.36.0; closed mode value since 0.37.0; launcher found outside the sandbox, narrower grants since 0.38.0)

The model's tools run as the same user as Pi, in or beside Pi's process, where the credential is: in the store file and, from the start, in /proc/<pi pid>/environ. By default the adapter puts the model's shell in a Landlock ruleset where Landlock is usable (Linux 5.13+, ABI 3 or newer, and perl on PATH; no root, no second user). Where it is not, the adapter starts anyway and says so once, in the session-start notice: landlock: not sandboxed: Landlock unavailable (<reason>). Three modes, set by the host and never inferred from the platform (landlock in the server block of your own store, or YOARS_LANDLOCK, which wins when set and not blank; whitespace counts as empty):

  • required: the adapter refuses to start without Landlock (and on oh-my-pi), naming what is missing and how to opt out. This was the default in 0.35.0.
  • off (also 0, false, no): no sandbox and no probe; the notice says the shell is NOT sandboxed.
  • auto / default / unset (the default): sandboxed where usable, else started and logged as above. Not Linux, no perl, an ABI below 3, a seccomp profile that blocks a Landlock call, and oh-my-pi all count as unavailable.

The value is closed (0.37.0): required, off (0, false, no; the boolean false), auto, default or nothing, in any case. Anything else refuses to start, naming the accepted values: requird, on, true, 1, yes, and the boolean true in the store (it could mean required or the default, so it is not guessed). A typo in the store is refused even while the environment overrides it. When the environment overrides the store's "landlock": "required", the notice has one line naming both values.

A developer's host keeps working in the default mode (0.37.0; narrowed in 0.38.0). Each PATH directory (realpath) is read+execute, so tools under $HOME work. Outside $HOME the prefix of a directory named bin or sbin is read-only too (/srv/tool/lib); under $HOME only the directory itself, because a prefix there is where a tool keeps its own state (~/.opencode, ~/.lmstudio, ~/.krew, ~/.npm-global, ~/.venv): a tool that needs its prefix gets it from YOARS_LANDLOCK_RO / landlock_ro (nvm: ~/.nvm/versions/node/<v>). $TMPDIR is not granted (0.37.0 made a shared /data/tmp read-write whole): when it is outside /tmp the adapter makes a private per-session directory in it (mode 0700, removed at exit), makes that read-write and sets the bash tool's TMPDIR to it; where it cannot, TMPDIR is dropped and the tools use /tmp. Relative and empty PATH entries are ignored, and / and $HOME are never granted this way. These are skipped, not refused: an entry that would cover the store or another secret is left out and named in the session-start notice (landlock: PATH entry <dir> left out of the sandbox's read-only list: ...); what you put in landlock_ro / landlock_rw and the built-in defaults still refuse. A whitespace-only YOARS_LANDLOCK_RO / _RW is unset.

The launcher's perl is found once, at start, outside the sandbox (0.38.0). The launcher runs before the ruleset, so a perl (or, until 0.37.0, an sh) the model could write was run unsandboxed: with ~/.cargo/bin or ~/.local/bin (rustup, Ubuntu's ~/.profile), or a relative or empty entry, ahead of /usr/bin on PATH, one bash call planted a perl and the next read the store and Pi's environment. Now the adapter resolves perl in Pi's own PATH (absolute entries only), runs that absolute path directly (no sh in the launcher), never looks it up in the child's PATH, and refuses a perl the sandbox can write: required refuses to start, the default starts without a sandboxed bash and says why in the notice. It checks before the start-up probe, which would otherwise run a planted perl with Pi's own environment. Fix: a perl outside every writable path first on PATH, or the writable directory off PATH. A directory like ~/.cargo/bin on PATH is not itself a problem: with no perl in it, /usr/bin/perl is the one found and bash stays sandboxed; it degrades only when a perl is actually there (planted, or the user's own, from perlbrew or plenv, say). The same hole through the environment is closed too: PERL5LIB, PERLLIB, PERL5OPT, PERL5DB, PERL_USE_UNSAFE_INC, LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, GCONV_PATH and LOCPATH (a local::lib directory under ~/.local is a PERL5LIB the model can write) are kept out of the environment of every perl the adapter runs outside the sandbox, the start-up probe's included (0.38.1; 0.38.0 scrubbed only the launcher's), and handed back to the command. The command's own environment is exactly the caller's (no PWD or YOARS_LL_PBL rewriting, no LC_ALL=C; PERL_BADLANG only if the caller had it), and a bad LANG / LC_ALL still prints no perl warning into the model's bash output.

Pi's own PATH holds no directory the sandbox can write (0.39.0). Pi, and the packages in its process, run programs by name outside the sandbox with Pi's whole environment: Pi's grep and find run rg and fd through PATH when ~/.pi/agent/bin lacks them, its footer runs git. With ~/.local/bin ahead of /usr/bin, one bash call planted an rg and the next grep ran it. So, once the sandbox is in force, planSandbox rewrites Pi's own process.env.PATH to the absolute entries the sandbox cannot write (the directory itself, one on the way to it, or what a symlink leads to); empty and relative entries (the working directory) go too, and a PATH left with nothing is /usr/bin:/bin. Each dropped entry is one line in the notice (landlock: client PATH: dropped <dir> — <why>). The model's bash and the operator's !cmd keep the PATH they had: ~/.local/bin is where the model's own tools are, and it is inside the sandbox. A tool Pi itself needed from a writable directory is no longer found (Pi fetches its own rg and fd into ~/.pi/agent/bin, which is read-only to the model; offline, install them where the model cannot write). With Landlock off or unavailable nothing is dropped, and the notice says so. The rule is the shared core's restrictClientPath (byte-identical with yoars-claude-shell's). The cut comes first (0.39.1): the launcher's perl and the probe look up on the cut PATH, so a perl the model planted in ~/.local/bin in an earlier session is never seen: it can neither run nor switch the sandbox off (0.39.0 looked it up on the whole PATH, refused it as writable, and the next start was unsandboxed or, in required, did not start). The stdio MCP server pi-mcp-adapter starts, and any package that spawns by name after pi-yoars has loaded, runs with the cut PATH too (still not sandboxed).

"Usable" means the launcher can restrict itself: the start-up probe creates a ruleset, sets NoNewPrivs and calls landlock_restrict_self in a throwaway process, so a profile that allows one call and blocks another reads as unavailable at start-up instead of failing every command at run time. A store file on an allowed path still refuses to start (in required and in the default when Landlock is usable). planSandbox(...).state is landlock {abi}, off or unavailable {reason} (what a coming security certificate would report); it is said in the notice and is not added to the pi-yoars/status/v1 event.

What the sandbox does:

  • Closed by the kernel: every command of the bash tool and every !cmd you type runs inside it. It can read and write only the working directory, /tmp, ~/.cache, ~/.npm, ~/.local, ~/.cargo, ~/.rustup and /dev, and read /usr /bin /lib* /etc /opt /sys /proc /var, node's and Pi's own directories. The store file (~/.pi/agent/pi-yoars.json or YOARS_CLIENT_CONFIG) and everything else under your home are denied (cat and a python3 open() get Permission denied), as are /proc/<pi pid>/environ, mem, maps and what its fd/* link to; on ABI 6+ the shell cannot signal Pi. A store file on an allowed path (the working directory, /tmp, /etc, ...) is refused at start: Landlock cannot deny a path inside one it allows.
  • Held to the same list, by a path check, not by the kernel: Pi's read, write, edit and ls run inside Pi, and grep/find are spawned by it, so a Landlock rule on children cannot cover them (and Landlock on Pi itself would not help: its shell would inherit the same domain, which is allowed to read Pi's /proc). The tool_call guard resolves the target's real path (a symlink the shell made in the workspace to the store is followed and refused) and refuses anything off the allow list, and anything under another process's /proc/<pid>. A symlink swapped in between that check and Pi's open, and a tool another package registers that opens files itself, are not covered.
  • Not covered: the stdio MCP servers of pi-mcp-adapter and the child pi processes of pi-subagents are spawned by those packages outside any hook of Pi and run unsandboxed (closing that needs a spawn-wrapper option in them); Pi's own environment and memory; the network; /proc/<pi pid>/cmdline (the kernel serves it to everyone; the credential is never on argv); environment variables Pi passes to the shell; whatever you put on the list.
  • oh-my-pi has no operations seam for !cmd, so its shell cannot be put inside the ruleset: with required the adapter refuses to start there; in the default mode Landlock is unavailable on it and the adapter starts, unsandboxed, and says so.

Settings, in the server block of your own store (a project .pi/pi-yoars.json may not set them) or in the environment, which wins: "landlock": "off" / YOARS_LANDLOCK=off (opt out: the adapter says once that the shell is NOT sandboxed), "landlock": "required" / YOARS_LANDLOCK=required, landlock_ro / YOARS_LANDLOCK_RO and landlock_rw / YOARS_LANDLOCK_RW (comma-separated or a list of absolute paths added to the read-only and read-write lists). src/yoars/landlock.ts is shared byte for byte with yoars-claude-shell; scripts/sabotage-landlock.mjs and scripts/probe-landlock.mjs (no model needed) are the gates.

License

Apache-2.0 from 0.15.0 on. See LICENSE.

How it got here, all decided by the operator on 2026-09-26:

  • The versions published on npm, 0.1.0 to 0.2.4, were released under MIT and stay MIT.
  • The unpublished commits from 0.12.0 (3918940) to 0.14.0 (ff5c8dd) carried AGPL-3.0-or-later, under a decision that covered 0.10.0 on.
  • The operator then replaced that decision: from 0.15.0 on, pi-yoars is Apache-2.0.