Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.automation.host

Python host surface for automations. Results never hold a webhook or callback secret: a person creates secrets in the Companion app or the TUI.

Python host surface for automations. Results never hold a webhook or callback
secret: a person creates secrets in the Companion app or the TUI.
raw docstring

create-automationclj

(create-automation env definition)

Create an automation from one definition dict. Required: name, prompt, triggers and target. Optional: enabled (default True), delivery, model and deliver_only.

Triggers (1 to 8):

  • {"kind": "cron", "expression": "0 8 * * 1-5", "timezone": "Europe/Warsaw"}: five cron fields or a macro such as @daily. Without timezone, the gateway time zone.
  • {"kind": "every", "seconds": 3600}: 60 seconds or more.
  • {"kind": "once", "at": <epoch milliseconds>}.
  • {"kind": "webhook", "signature": "github" | "standard" | "generic" | "token", "events": [...], "filters": [{"field": "action", "equals": "opened"}]}: a signed POST to /v1/hooks/<id>. The prompt can use {dot.path} and {__raw__} from the payload.

Targets: {"mode": "session", "session_id": ...} queues a turn in that session. {"mode": "new"} keeps a new session for each run. {"mode": "temporary"} keeps only the answer. new and temporary accept root, and new accepts group_id.

Delivery: {"push": True, "callback": {"url": "https://..."}}. An answer that starts with [SILENT] sends nothing. deliver_only sends the rendered prompt without a model.

The person creates webhook and callback secrets in the Companion app or the TUI. This tool never returns a secret.

Create an automation from one definition dict. Required: `name`, `prompt`, `triggers` and
`target`. Optional: `enabled` (default True), `delivery`, `model` and `deliver_only`.

Triggers (1 to 8):
- `{"kind": "cron", "expression": "0 8 * * 1-5", "timezone": "Europe/Warsaw"}`:
  five cron fields or a macro such as `@daily`. Without `timezone`, the gateway time zone.
- `{"kind": "every", "seconds": 3600}`: 60 seconds or more.
- `{"kind": "once", "at": <epoch milliseconds>}`.
- `{"kind": "webhook", "signature": "github" | "standard" | "generic" | "token",
  "events": [...], "filters": [{"field": "action", "equals": "opened"}]}`: a
  signed POST to `/v1/hooks/<id>`. The prompt can use `{dot.path}` and `{__raw__}` from the
  payload.

Targets: `{"mode": "session", "session_id": ...}` queues a turn in that session.
`{"mode": "new"}` keeps a new session for each run. `{"mode": "temporary"}` keeps
only the answer. `new` and `temporary` accept `root`, and `new` accepts `group_id`.

Delivery: `{"push": True, "callback": {"url": "https://..."}}`. An answer that starts
with `[SILENT]` sends nothing. `deliver_only` sends the rendered prompt without a model.

The person creates webhook and callback secrets in the Companion app or the TUI.
This tool never returns a secret.
sourceraw docstring

delete-automationclj

(delete-automation env automation-id)

Delete an automation and its run history. Ask the person first.

Delete an automation and its run history. Ask the person first.
sourceraw docstring

get-automationclj

(get-automation env automation-id)

Read one automation by its id.

Read one automation by its id.
sourceraw docstring

list-automationsclj

(list-automations env)

List the automations of this machine with their triggers, prompt, target, delivery, state, next run and last run.

List the automations of this machine with their triggers, prompt, target, delivery, state,
next run and last run.
sourceraw docstring

list-runsclj

(list-runs env)
(list-runs env opts)

List recent runs, newest first. Optional keywords: automation_id, status (queued, running, completed, failed, cancelled, skipped or unknown), session_id and limit (1 to 200, default 50).

List recent runs, newest first. Optional keywords: `automation_id`, `status` (queued, running,
completed, failed, cancelled, skipped or unknown), `session_id` and `limit` (1 to 200, default
50).
sourceraw docstring

promptclj

(prompt _env)

Short guidance for creating automations.

Short guidance for creating automations.
sourceraw docstring

run-automationclj

(run-automation env automation-id)

Start one run now, outside its triggers. The run waits in the queue. Follow it with automations.runs(automation_id=...).

Start one run now, outside its triggers. The run waits in the queue. Follow it with
`automations.runs(automation_id=...)`.
sourceraw docstring

symbolsclj

source

update-automationclj

(update-automation env automation-id changes)

Replace the given top-level fields of an automation, for example {"enabled": False} to pause it. triggers, target and delivery are replaced as a whole.

Replace the given top-level fields of an automation, for example `{"enabled": False}` to
pause it. `triggers`, `target` and `delivery` are replaced as a whole.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close