Skip to main content

Module decode

Module decode 

Source
Expand description

Strict decoders and canonical encoders for every record’s FILE form (ir.mjs). O-records refuse an unknown key by file and key; H-records keep what they do not model in residue.

Structs§

LoadError
A load refusal naming the file and the key (ir.mjs::LoadError).

Constants§

CHAT_TYPES
dm | group | channel | thread.
EXECUTION_COLUMNS
The column list encode_fire_row fills, in order.
FOLDER_OBLIGATION_EXTRA_COLUMNS
Our folder’s two columns beyond Hermes’s delivery_obligations shape.
HERMES_JOB_ORDER
Hermes 0.21.0’s canonical key order for a job record.
OBLIGATION_COLUMNS
The column list encode_obligation_row fills, in order.

Functions§

credential_ref_name
The .env name for a credential.
decode_access
access.yaml.
decode_binding_row
One bindings row of our own state.db.
decode_channel
One platforms.<name> block; credential VALUES go to the vault, refs into the record.
decode_context_from
context_from: a job id, a list of job ids, or self (cron/jobs.py:2486-2492).
decode_env_value
A worker env value: a string, or {env} | {dotenv}.
decode_expiry
expiry: block of config.yaml.
decode_fire_row
Fire status words on the Hermes boundary.
decode_home
home: block of config.yaml.
decode_job
One job record of cron/jobs.json.
decode_obligation_row
One delivery_obligations row.
decode_repeat
Hermes 0.21.0 stores repeat as {times: N | null, completed: M}; older bool/number forms load.
decode_route
One profile_routes[] entry.
decode_subscription
One webhook_subscriptions.json entry; the secret’s value goes to the vault.
decode_surface_key
A surface key from the IR’s own JSON ({platform, chat_type, chat_id, thread_id?, participant_id?}).
decode_worker
worker: block of config.yaml.
encode_access
access.yaml as a JSON value (YAML-rendered by the caller); the ttl only when set.
encode_channel
A platform block; with a vault (a Hermes export) values are inlined, without one the refs are written.
encode_fire_row
The executions row of a fire (Hermes’s own status word; residue fills the process columns).
encode_job
A job record in Hermes’s canonical key order, mapped fields then residue (ir.mjs::encodeJob). Returned as an ordered key list because serde_json’s object order is a cargo feature.
encode_obligation_folder_extras
The values for FOLDER_OBLIGATION_EXTRA_COLUMNS.
encode_obligation_row
The delivery_obligations row of an obligation, in OBLIGATION_COLUMNS order.
encode_route
A route back in Hermes’s form.
encode_subscription
A subscription back in Hermes’s form; the secret inlined when a vault is given, else a placeholder.
encode_surface_key
The orchestration’s JSON of a surface key (kind, as the ontology spells it; absent optionals omitted).
is_credential_key
Whether a config key names a credential (ir.mjs::CREDENTIAL_KEY).
parse_target
Hermes deliver word → Target: origin | local | home | <platform>[:<chat_id>[:<thread_id>]].
placeholder_ref
The .env name inside a ${dotenv:NAME} / ${env:NAME} placeholder.
surface_key_string
The map key of a binding: <platform>|<chat_type>|<chat_id>|<thread_id>|<participant_id>.