Ada Extensions
Concepts

Limits

Time, memory, CPU, network and storage limits, and what happens past them.

Extensions shouldn't slow down Adanotch or the Mac. Each one runs in its own process, and Adanotch watches that process.

Running

LimitValuePast it
One synchronous turn200 msThe process is ended and restarted (a strike)
Memory64 MBThe process is ended (a strike)
CPU50% on average over 10 secondsThe process is ended (a strike)
An update error—A strike
A setup or load error—The extension stops at once

Three strikes in a row stop the extension; Settings › Extensions shows why, and you can turn it back on there. Every successful update resets the count. The wait between restarts doubles with each strike.

200 ms is one turn, not the whole update

Every await ends the turn. Waiting on the network doesn't use up the limit; going through a huge array in one go does. Split heavy work into chunks and give way in between with await new Promise((r) => setTimeout(r, 0)).

async function sumInChunks(values: number[]) {
  let total = 0;
  for (let i = 0; i < values.length; i += 10_000) {
    for (const v of values.slice(i, i + 10_000)) total += v;
    await new Promise((resolve) => setTimeout(resolve, 0));
  }
  return total;
}

Network

LimitValue
ProtocolHTTPS only, network: domains only
Requests at once6
Requests a minute120
Response size5 MB
Request body1 MB
Timeout15 s by default; 1–60 s with timeout

There are no cookies and no cache. Going past a limit rejects with NetworkError, TimeoutError or PermissionError.

Other

LimitValue
View2000 nodes at most, 32 levels deep
chart500 values at most
Storage512 KB per extension (JSON)
Timers200 at once; setInterval every 50 ms at the fastest
console200 lines per 10 s, 2000 characters a line
Island activities (island.show)8 at once
Clipboard writes1 MB
open(url)https: and mailto: only, within 10 s of the user using one of your controls
Bundle (dist/index.js)4 MB

What isn't there

There is no DOM, window, document, require, process, file system or Node API. npm libraries you bundle must not depend on them. See Web APIs for what is there.

On this page