capabilities
Standard capability effect sets — named groups of the interrupt effects the standard library raises, for use in raises clauses.
A raises clause is an allowlist (an upper bound), so these sets are composable building blocks you union together to say what a function or node is permitted to do:
import { FileRead, Network } from "std::capabilities"
// may read files and make network calls — nothing else
node main() raises <FileRead, Network> { ... }
// read-only inspection
node audit() raises <FileRead> { ... }
// guaranteed to perform no interrupting actions
def pure() raises <> { ... }The sets are purely mechanical groupings by capability; they encode no security judgement (e.g. there is intentionally no "read-only" set that decides whether a network fetch counts as a read). Compose the pieces you need.
Note: these constrain callers. Individual functions should still declare the specific effect they raise (e.g. raises <std::read>), not a whole capability set.
Types
FileRead
Read-only filesystem access: reading files and listing/searching paths.
/** Read-only filesystem access: reading files and listing/searching paths. */
export effectSet FileRead = <std::read, std::readBinary, std::ls, std::glob, std::grep>(source)
FileWrite
Filesystem mutation: creating, editing, moving, copying, and deleting.
/** Filesystem mutation: creating, editing, moving, copying, and deleting. */
export effectSet FileWrite = <std::write, std::writeBinary, std::edit, std::applyPatch, std::mkdir, std::move, std::copy, std::remove>(source)
FileSystem
All filesystem access — reads and writes.
/** All filesystem access — reads and writes. */
export effectSet FileSystem = <FileRead, FileWrite>(source)
Shell
Arbitrary command / process execution. The sharpest edge — grant with care.
/** Arbitrary command / process execution. The sharpest edge — grant with care. */
export effectSet Shell = <std::bash, std::exec, std::run>(source)
Network
Anything that talks to the outside world over the network.
/** Anything that talks to the outside world over the network. */
export effectSet Network = <std::http::fetch, std::http::fetchJSON, std::http::fetchMarkdown, std::search, std::tavilySearch, std::weather, std::browserUse, std::wikipedia::article, std::wikipedia::search, std::wikipedia::summary, std::gdelt, std::fred, std::dbnomics, std::edgar, std::littlesis, std::yc, std::hackernews, std::wikidata>(source)
DataFinance
The std::data/finance connectors (news + macro + filings). Each also raises std::http::fetchJSON, which is covered by the broader Network set.
/** The std::data/finance connectors (news + macro + filings). Each also raises
std::http::fetchJSON, which is covered by the broader Network set. */
export effectSet DataFinance = <std::gdelt, std::fred, std::edgar, std::dbnomics>(source)
Messaging
Sending messages to people: email, SMS, and iMessage.
/** Sending messages to people: email, SMS, and iMessage. */
export effectSet Messaging = <std::sendEmail, std::sendSms, std::sendIMessage>(source)
Secrets
Reading and writing credentials in the system keyring.
/** Reading and writing credentials in the system keyring. */
export effectSet Secrets = <std::getSecret, std::setSecret, std::deleteSecret>(source)
Auth
OAuth-style authorization flows: granting, fetching, and revoking access.
/** OAuth-style authorization flows: granting, fetching, and revoking access. */
export effectSet Auth = <std::authorize, std::getAccessToken, std::revokeAuth>(source)
Calendar
Calendar access: listing and mutating events (incl. calendar authorization).
/** Calendar access: listing and mutating events (incl. calendar authorization). */
export effectSet Calendar = <std::listEvents, std::createEvent, std::updateEvent, std::deleteEvent, std::authorizeCalendar>(source)
Memory
Agent long-term memory: recall, remember, forget, and enable/disable.
/** Agent long-term memory: recall, remember, forget, and enable/disable. */
export effectSet Memory = <std::memory::recall, std::memory::remember, std::memory::forget, std::memory::enableMemory, std::memory::disableMemory>(source)