APIs
I/O and runtime
Connector-bound calls record their intent in Studio and deliver for real only when Live I/O is on and a matching connector is wired. Simulated results include simulated: true.
HTTP can take an explicit URL (allowlisted when live). Database calls always target a connector id, never a raw DSN. Parameters are bound — do not interpolate SQL.
const rows = sirius.db.query("warehouse", "select name from sites where id = ?", [id]);
const ref = sirius.http.get({ url: "https://example.org/sites/" + id });
sirius.store.put("message", "site", id);
if (sirius.dedupe.check(sirius.idempotency.key(msg.raw))) {
result = { message: msg.raw };
} else {
sirius.route.push(sirius.json.decode(ref.body));
result = { message: rows.rows };
}
Scopes for sirius.store: "message", "component", "global". Tables are seeded from env keys table:<id> in Studio and from managed lookup resources at runtime.
This page lists 51 symbols. The same catalog drives Studio autocomplete.
See also: Overview · Core · Standards · Devices
sirius.http
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.http.delete | sirius.http.delete({ url, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP DELETE via a Sirius destination connector |
sirius.http.get | sirius.http.get({ url, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP GET via a Sirius destination connector |
sirius.http.head | sirius.http.head({ url, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP HEAD via a Sirius destination connector |
sirius.http.options | sirius.http.options({ url, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP OPTIONS via a Sirius destination connector |
sirius.http.patch | sirius.http.patch({ url, body?, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP PATCH via a Sirius destination connector |
sirius.http.post | sirius.http.post({ url, body?, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP POST via a Sirius destination connector |
sirius.http.put | sirius.http.put({ url, body?, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP PUT via a Sirius destination connector |
sirius.http.trace | sirius.http.trace({ url, headers?, timeout_ms?, destination? }) | { ok, status, body, simulated } | HTTP TRACE via a Sirius destination connector |
sirius.db
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.db.exec | sirius.db.exec(connector, sql, params?, options?) | { columns, rows, rows_affected, truncated } | run a SQL write against a configured relational connector (alias of db.query that reads naturally for writes) |
sirius.db.ping | sirius.db.ping(connector) | { ok, driver, connector_kind, elapsed_ms, error } | verify connectivity to a configured relational connector without running a statement (reuses the pooled connection) |
sirius.db.query | sirius.db.query(connector, sql, params?, options?) | { columns, rows, rows_affected, truncated } | run a SQL statement (read OR write) against a configured relational connector; params are bound |
sirius.file
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.file.read | sirius.file.read({ path, source? }) | { ok, body, simulated } | read a file via a Sirius File source connector |
sirius.file.write | sirius.file.write({ path, body, destination? }) | { ok, simulated } | write a file via a Sirius File destination connector |
sirius.net
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.net.ftp.get | sirius.net.ftp.get({ host, path, destination? }) | { ok, body, simulated } | fetch a file over FTP via a Sirius connector |
sirius.net.ftps.get | sirius.net.ftps.get({ host, path, destination? }) | { ok, body, simulated } | fetch a file over FTPS via a Sirius connector |
sirius.net.sftp.get | sirius.net.sftp.get({ host, path, destination? }) | { ok, body, simulated } | fetch a file over SFTP via a Sirius connector |
sirius.net.smtp.send | sirius.net.smtp.send({ host, from, to, subject?, body?, destination? }) | { ok, simulated } | send mail over SMTP via a Sirius connector |
sirius.net.tcp.connect | sirius.net.tcp.connect({ host, port, body?, read?, destination? }) | { ok, body, simulated } | open a raw TCP peer and send bytes (optionally read a framed response) |
sirius.smtp
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.smtp.send | sirius.smtp.send({ host, from, to, subject?, body?, destination? }) | { ok, simulated } | send mail via a Sirius SMTP destination connector |
sirius.route
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.route.filter | sirius.route.filter(ok, reason?) | bool | keep the message only when ok is true, else reject with reason |
sirius.route.push | sirius.route.push(message) | — | queue a message for delivery (collected into result) |
sirius.route.reply | sirius.route.reply(message) | — | reply on the inbound source (source-response only) |
sirius.emit
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.emit | sirius.emit(message) | — | deliver a message (collected into result) |
sirius.output
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.output | sirius.output(seed?) | message handle | create a mutable outbound message (seeded from the inbound body), registered as an output; used after a native migration (setBody/setProperty/route handles) |
sirius.done
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.done | sirius.done() | result | collect the run outcome into the result contract (routed/registered outputs as fan-out, else the current message); the trailing call a migrated script can end with |
sirius.reject
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.reject | sirius.reject(reason?) | false | drop the current message with a reason (returns false) |
sirius.store
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.store.delete | sirius.store.delete(scope, key) | — | remove a key from a scope |
sirius.store.get | sirius.store.get(scope, key) | value | read a value from a scope (message/component/global) |
sirius.store.has | sirius.store.has(scope, key) | bool | test presence of a key in a scope |
sirius.store.keys | sirius.store.keys(scope) | list of strings | list keys present in a scope |
sirius.store.put | sirius.store.put(scope, key, value) | value | write a value to a scope |
sirius.table
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.table.has | sirius.table.has(table, key) | bool | test presence of a code in a lookup table |
sirius.table.lookup | sirius.table.lookup(table, key, default?) | value | look up a code in a lookup table, with an optional default |
sirius.component
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.component.config | sirius.component.config() | map | current component config |
sirius.component.guid | sirius.component.guid() | string | current component GUID |
sirius.component.id | sirius.component.id() | string | current component id |
sirius.component.name | sirius.component.name() | string | current component name |
sirius.message
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.message.id | sirius.message.id() | string | current message id |
sirius.idempotency
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.idempotency.key | sirius.idempotency.key(value) | hex string | stable content hash for a value (idempotency key) |
sirius.idempotency.seen | sirius.idempotency.seen(key, ttl?) | bool | record a key and report whether it was already seen (dedupe window) |
sirius.dedupe
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.dedupe.check | sirius.dedupe.check(value, ttl?) | bool | true when a value was already seen this run/window (records it) |
sirius.trace
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.trace.event | sirius.trace.event(name, attrs?) | — | record a point-in-time trace event |
sirius.trace.span | sirius.trace.span(name, attrs?) | — | record a span with a name and optional attributes |
sirius.metric
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.metric.gauge | sirius.metric.gauge(name, value, tags?) | — | set a gauge metric to a value |
sirius.metric.inc | sirius.metric.inc(name, by?, tags?) | — | increment a counter metric |
sirius.metric.observe | sirius.metric.observe(name, value, tags?) | — | record a value into a distribution/histogram metric |
sirius.ai
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.ai.classify | sirius.ai.classify(text, labels) | string (label) | classify text into one of the given labels (governed LLM) |
sirius.ai.complete | sirius.ai.complete(prompt, options?) | string | complete a prompt (governed LLM) |
sirius.ai.extract | sirius.ai.extract(text, schema) | value | extract structured data from text against a schema (governed LLM) |
sirius.schema
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.schema.parse | sirius.schema.parse(raw, schema) | tree | parse against any message schema |
sirius.spec
| Symbol | Signature | Returns | Summary |
|---|---|---|---|
sirius.spec.parse | sirius.spec.parse(raw, spec) | tree | Parse against a message spec |