Something went wrong. Try again.
Automations and webhooks for the AT Protocol airglow.run
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079{ "lexicon": 1, "id": "run.airglow.automation", "defs": { "main": { "type": "record", "description": "An automation: a trigger followed by an ordered list of steps (conditions, fetches, variables, loops, and actions) that run when the trigger matches.", "key": "tid", "record": { "type": "object", "required": ["name", "trigger", "steps", "createdAt"], "properties": { "name": { "type": "string", "description": "User-defined name for this automation.", "maxLength": 512, "maxGraphemes": 128 }, "description": { "type": "string", "description": "What this automation does, in the author's words.", "maxLength": 4096, "maxGraphemes": 1024 }, "trigger": { "type": "union", "description": "What starts a run of this automation.", "refs": ["#pdsEventTrigger"] }, "steps": { "type": "array", "description": "Steps executed in order when the trigger matches. Branch and loop steps nest child step lists; consumers should expect a nesting depth of up to 3 and a total step count of up to 25.", "minLength": 1, "maxLength": 25, "items": { "type": "union", "refs": [ "#conditionStep", "#fetchStep", "#searchStep", "#variableStep", "#loopStep", "#webhookAction", "#recordAction", "#bskyPostAction", "#patchRecordAction", "#marginBookmarkAction", "#followAction", "#bskyListAddAction", "#sembleSaveAction", "#calendarRsvpAction", "#kipclipAnnotationAction", "#clearScheduledAction", "#collectLinksAction", "#aiAction", "#notificationAction" ] } }, "active": { "type": "boolean", "description": "Whether this automation is currently active.", "default": true }, "dryRun": { "type": "boolean", "description": "When true, runs are simulated: matching events are evaluated and logged, but actions do not execute.", "default": false }, "dedupeBySource": { "type": "boolean", "description": "When true, the automation runs at most once per source record.", "default": true }, "createdAt": { "type": "string", "format": "datetime" } } } }, "pdsEventTrigger": { "type": "object", "description": "Starts a run when a matching repository event is observed on the network.", "required": ["lexicon", "operations"], "properties": { "lexicon": { "type": "string", "description": "NSID of the record collection to listen to.", "format": "nsid", "maxLength": 256 }, "operations": { "type": "array", "description": "The commit operations this trigger responds to. 'delete' cannot be combined with 'create' or 'update'.", "minLength": 1, "maxLength": 2, "items": { "type": "string", "knownValues": ["create", "update", "delete"], "maxLength": 16 } }, "wantedDids": { "type": "array", "description": "Repository DIDs to subscribe to. Supports the {{self}} placeholder for the automation owner's DID.", "maxLength": 10, "items": { "type": "string", "maxLength": 256 } } } }, "conditionStep": { "type": "object", "description": "Checks one or more assertions. Without 'then', a failed check acts as a gate: it ends the run (or, inside a loop, skips the current item). With 'then', it branches: the matching side's child steps run, then flow continues after this step.", "required": ["id", "assertions"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "match": { "type": "string", "description": "How assertions combine: 'all' requires every assertion to hold, 'any' requires at least one.", "knownValues": ["all", "any"], "default": "all", "maxLength": 8 }, "assertions": { "type": "array", "description": "The checks this step evaluates.", "minLength": 1, "maxLength": 10, "items": { "type": "ref", "ref": "#assertion" } }, "then": { "type": "array", "description": "Steps that run when the check holds. Presence of this list makes the step a branch instead of a gate.", "maxLength": 25, "items": { "type": "union", "refs": [ "#conditionStep", "#fetchStep", "#searchStep", "#variableStep", "#loopStep", "#webhookAction", "#recordAction", "#bskyPostAction", "#patchRecordAction", "#marginBookmarkAction", "#followAction", "#bskyListAddAction", "#sembleSaveAction", "#calendarRsvpAction", "#kipclipAnnotationAction", "#clearScheduledAction", "#collectLinksAction", "#aiAction", "#notificationAction" ] } }, "else": { "type": "array", "description": "Steps that run when the check does not hold. Only meaningful alongside 'then'.", "maxLength": 25, "items": { "type": "union", "refs": [ "#conditionStep", "#fetchStep", "#searchStep", "#variableStep", "#loopStep", "#webhookAction", "#recordAction", "#bskyPostAction", "#patchRecordAction", "#marginBookmarkAction", "#followAction", "#bskyListAddAction", "#sembleSaveAction", "#calendarRsvpAction", "#kipclipAnnotationAction", "#clearScheduledAction", "#collectLinksAction", "#aiAction", "#notificationAction" ] } }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "assertion": { "type": "object", "description": "A single check comparing a field against a value. String, numeric, boolean, and presence operators are available; presence operators ignore 'value'.", "required": ["field"], "properties": { "field": { "type": "string", "description": "Path to the value being checked, e.g. 'event.commit.record.text' or a named step output like 'parentPost.record.author'.", "maxLength": 256 }, "operator": { "type": "string", "description": "Comparison operator. Numeric operators (gt, gte, lt, lte) compare numbers; exists and notExists test presence and ignore 'value'.", "knownValues": [ "eq", "neq", "contains", "notContains", "startsWith", "endsWith", "gt", "gte", "lt", "lte", "exists", "notExists" ], "default": "eq", "maxLength": 32 }, "value": { "type": "string", "description": "Value to compare against. Supports {{placeholder}} expressions.", "maxLength": 1024 }, "comment": { "type": "string", "description": "Optional user note about this check.", "maxLength": 1024, "maxGraphemes": 256 } } }, "fetchStep": { "type": "object", "description": "Fetches a record by AT URI and exposes it under this step's name for later steps.", "required": ["id", "name", "uri"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference the fetched record, e.g. 'parentEntry'.", "maxLength": 64 }, "uri": { "type": "string", "description": "AT URI to fetch. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "collection": { "type": "string", "description": "Optional NSID hint for the fetched record's collection, used by editors to offer typed field suggestions.", "format": "nsid", "maxLength": 256 }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "searchStep": { "type": "object", "description": "Searches a repository for a record matching a field filter and exposes the first match under this step's name. Useful for duplicate checks before creating records.", "required": ["id", "name", "repo", "collection", "where"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference the search result.", "maxLength": 64 }, "repo": { "type": "string", "description": "DID of the repository to search. Supports {{placeholder}} expressions.", "maxLength": 256 }, "collection": { "type": "string", "description": "NSID of the collection to search.", "format": "nsid", "maxLength": 256 }, "where": { "type": "array", "description": "Field filter applied to each record. Currently a single clause.", "minLength": 1, "maxLength": 1, "items": { "type": "ref", "ref": "#searchWhere" } }, "limit": { "type": "integer", "description": "Maximum number of matches to return. Currently 1.", "minimum": 1, "maximum": 1, "default": 1 }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "searchWhere": { "type": "object", "description": "A single field filter for a search step.", "required": ["field", "value"], "properties": { "field": { "type": "string", "description": "Dot-path into each candidate record, e.g. 'subject'.", "maxLength": 256 }, "operator": { "type": "string", "description": "Comparison operator.", "knownValues": ["eq"], "default": "eq", "maxLength": 32 }, "value": { "type": "string", "description": "Value to compare against. Supports {{placeholder}} expressions.", "maxLength": 1024 } } }, "variableStep": { "type": "object", "description": "Renders a value once at this position in the run and exposes the result under this step's name. A plain literal value is the common case; the value may also contain {{placeholder}} expressions resolved from earlier steps.", "required": ["id", "name", "value"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference the value.", "maxLength": 64 }, "value": { "type": "string", "description": "The value template. Rendered once when the run reaches this step.", "maxLength": 2048 }, "note": { "type": "string", "description": "Optional user-facing note, shown to people duplicating this automation to explain what the value should be.", "maxLength": 1024, "maxGraphemes": 256 }, "preserveOnDuplication": { "type": "boolean", "description": "When true, duplicating the automation carries the value over. When false, the value is blanked so the duplicator supplies their own.", "default": false }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "loopStep": { "type": "object", "description": "Runs its child steps once per item resolved from 'path'. Inside the loop, the current item is available under 'itemName' (default 'item'), and the loop's name exposes the last result plus a results list to later steps.", "required": ["id", "name", "path", "steps"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference the loop's results.", "maxLength": 64 }, "path": { "type": "string", "description": "Dotted path with [] marking array levels, ending in [], e.g. 'event.commit.record.facets[].features[]'.", "maxLength": 512 }, "itemName": { "type": "string", "description": "Alias for the current item inside the loop body. Defaults to 'item'. Nested loops must use distinct aliases.", "maxLength": 64 }, "steps": { "type": "array", "description": "Steps run once per item.", "minLength": 1, "maxLength": 25, "items": { "type": "union", "refs": [ "#conditionStep", "#fetchStep", "#searchStep", "#variableStep", "#loopStep", "#webhookAction", "#recordAction", "#bskyPostAction", "#patchRecordAction", "#marginBookmarkAction", "#followAction", "#bskyListAddAction", "#sembleSaveAction", "#calendarRsvpAction", "#kipclipAnnotationAction", "#clearScheduledAction", "#collectLinksAction", "#aiAction", "#notificationAction" ] } }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "webhookAction": { "type": "object", "description": "Sends the run's data to a callback URL via HTTP POST.", "required": ["id", "callbackUrl"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference this action's result.", "maxLength": 64 }, "callbackUrl": { "type": "string", "description": "URL to receive webhook POST requests.", "format": "uri", "maxLength": 2048 }, "bodyTemplate": { "type": "string", "description": "Request body with {{placeholder}} expressions. When set, it replaces the default payload. Requires bodyFormat.", "maxLength": 10000 }, "bodyFormat": { "type": "string", "description": "How to interpret bodyTemplate. Omit both fields to send the default payload.", "knownValues": ["json", "text"], "maxLength": 16 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "recordAction": { "type": "object", "description": "Creates a record on the automation owner's repository.", "required": ["id", "targetCollection", "recordTemplate"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created record.", "maxLength": 64 }, "targetCollection": { "type": "string", "description": "NSID of the collection to create the record in.", "format": "nsid", "maxLength": 256 }, "recordTemplate": { "type": "string", "description": "JSON template with {{placeholder}} expressions.", "maxLength": 10240 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "bskyPostAction": { "type": "object", "description": "Creates a Bluesky post.", "required": ["id", "textTemplate"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created post.", "maxLength": 64 }, "textTemplate": { "type": "string", "description": "Post text with {{placeholder}} expressions.", "maxLength": 10240 }, "langs": { "type": "array", "description": "BCP-47 language tags for the post.", "maxLength": 3, "items": { "type": "string", "maxLength": 16 } }, "labels": { "type": "array", "description": "Self-label values for content warnings.", "maxLength": 4, "items": { "type": "string", "knownValues": ["sexual", "nudity", "porn", "graphic-media"], "maxLength": 32 } }, "embedExternalUrl": { "type": "string", "description": "Optional URL rendered into an external-link card on the post. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "patchRecordAction": { "type": "object", "description": "Updates an existing record on the automation owner's repository, either by shallow-merging fields or by applying a JSON Patch.", "required": ["id", "targetCollection", "baseRecordUri", "recordTemplate"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the updated record.", "maxLength": 64 }, "targetCollection": { "type": "string", "description": "NSID of the collection containing the record to update.", "format": "nsid", "maxLength": 256 }, "baseRecordUri": { "type": "string", "description": "AT URI of the record to update. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "recordTemplate": { "type": "string", "description": "With patchMode 'shallow' (default), a JSON object whose fields are merged on top of the record. With 'deep', a JSON Patch (RFC 6902) op array.", "maxLength": 10240 }, "patchMode": { "type": "string", "description": "How recordTemplate is applied to the record.", "knownValues": ["shallow", "deep"], "maxLength": 16 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "marginBookmarkAction": { "type": "object", "description": "Creates a bookmark on Margin. The page title is fetched from the URL when the action runs.", "required": ["id", "targetSource"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created bookmark.", "maxLength": 64 }, "targetSource": { "type": "string", "description": "URL of the page being bookmarked. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "bodyValue": { "type": "string", "description": "Optional description for the bookmark. Supports {{placeholder}} expressions.", "maxLength": 10000 }, "tags": { "type": "array", "description": "Optional tags. Each item supports {{placeholder}} expressions.", "maxLength": 10, "items": { "type": "string", "maxLength": 64 } }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "followAction": { "type": "object", "description": "Follows an account on an AT Protocol social graph (Bluesky, Tangled, Sifa, Semble, or Grain).", "required": ["id", "target", "subject"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created follow.", "maxLength": 64 }, "target": { "type": "string", "description": "Which social graph to follow on.", "knownValues": ["bluesky", "cosmik", "sifa", "tangled", "grain"], "maxLength": 32 }, "subject": { "type": "string", "description": "DID of the account to follow. Supports {{placeholder}} expressions; the resolved value must be a DID.", "maxLength": 512 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "bskyListAddAction": { "type": "object", "description": "Adds an account to a Bluesky list the automation owner owns, by writing an app.bsky.graph.listitem record. Skips an account already on the list.", "required": ["id", "list", "subjectFrom"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created list item.", "maxLength": 64 }, "list": { "type": "string", "description": "AT URI of the app.bsky.graph.list to add to. Supports {{placeholder}} expressions; the resolved list must be in the automation owner's repo.", "maxLength": 2048 }, "subjectFrom": { "type": "string", "description": "Who to add: 'author' adds the account that wrote the triggering record (event.did); 'record' adds the DID given in 'subject'.", "knownValues": ["author", "record"], "maxLength": 32 }, "subject": { "type": "string", "description": "DID of the account to add, when subjectFrom is 'record'. Supports {{placeholder}} expressions; the resolved value must be a DID.", "maxLength": 512 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "sembleSaveAction": { "type": "object", "description": "Saves a URL to Semble. The URL's metadata populates the card when the action runs.", "required": ["id", "url"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created card.", "maxLength": 64 }, "url": { "type": "string", "description": "URL to save. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "calendarRsvpAction": { "type": "object", "description": "RSVPs to a calendar event record by AT URI.", "required": ["id", "subject", "status"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created RSVP.", "maxLength": 64 }, "subject": { "type": "string", "description": "AT URI of the calendar event. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "status": { "type": "string", "description": "RSVP status.", "knownValues": ["going", "interested"], "maxLength": 32 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "kipclipAnnotationAction": { "type": "object", "description": "Creates a Kipclip annotation enriching an existing bookmark, optionally with metadata fetched from a URL.", "required": ["id", "subject"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference the created annotation.", "maxLength": 64 }, "subject": { "type": "string", "description": "AT URI of the bookmark this annotation enriches. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "url": { "type": "string", "description": "Optional URL whose metadata is written to the annotation. Supports {{placeholder}} expressions.", "maxLength": 2048 }, "note": { "type": "string", "description": "Optional note attached to the annotation. Supports {{placeholder}} expressions.", "maxLength": 10000 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "clearScheduledAction": { "type": "object", "description": "Cancels this automation owner's pending scheduled steps whose identifier matches. Steps already executing or completed are untouched.", "required": ["id", "identifier"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference this action's result.", "maxLength": 64 }, "identifier": { "type": "string", "description": "Identifier of the scheduled work to cancel. Supports {{placeholder}} expressions. Scoped to the automation owner.", "maxLength": 512 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "cocoreProvider": { "type": "object", "description": "Runs the step on co/core (cocore.dev), using the automation owner's own co/core API key. The provider union is open so a second OpenAI-compatible provider is an added member rather than a wire-schema break.", "properties": { "baseUrl": { "type": "string", "format": "uri", "description": "Optional override for the provider's API root. Omitted means co/core's own.", "maxLength": 512 } } }, "aiAction": { "type": "object", "description": "Sends a prompt, and optionally a value from the run's data, to a small open-weight model and exposes the returned object under this step's name. Has no external side effects of its own. Because the call takes tens of seconds to minutes, the run suspends at this step and resumes when the answer arrives. Not allowed anywhere inside a loop step, including branches nested in one: a loop cannot suspend mid-iteration, and a record placing one there is refused on save. The answer also cannot fill a field that chooses what a later step acts on (a URI, collection, repo, recipient, URL or schedule identifier), directly or through a value derived from it.", "required": ["id", "name", "prompt", "model"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference this step's output fields.", "maxLength": 64 }, "prompt": { "type": "string", "description": "The instruction written by the automation's author. Kept separate from the input so run data is never mistaken for instructions.", "maxLength": 4096, "maxGraphemes": 2048 }, "model": { "type": "string", "description": "The provider's model id, pinned by the author.", "maxLength": 256 }, "input": { "type": "string", "description": "Optional single {{placeholder}} expression naming the value to send alongside the prompt. When it resolves to nothing the step records a skip instead of calling the provider.", "maxLength": 256 }, "maxLength": { "type": "integer", "description": "Maximum length of the returned text, in characters. The provider-level token cap is derived from it.", "minimum": 1, "maximum": 4000, "default": 300 }, "fallback": { "type": "boolean", "description": "When true (default), a pinned model that no provider is serving is substituted with any available model. When false, the step fails and retries instead.", "default": true }, "choices": { "type": "array", "description": "Optional enumerated values the model must pick from. When present the output carries a choice field constrained to this set, so AI output can drive conditions and branch assertions.", "maxLength": 16, "items": { "type": "string", "maxLength": 64 } }, "provider": { "type": "union", "description": "Which provider runs the step. Omitted means co/core.", "refs": ["#cocoreProvider"] }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "collectLinksAction": { "type": "object", "description": "Collects every URL found in a value from the run's data and exposes them as a list under this step's name. Has no external side effects.", "required": ["id", "name", "source"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Name later steps use to reference the collected list.", "maxLength": 64 }, "source": { "type": "string", "description": "A single {{placeholder}} expression naming the value to collect links from.", "maxLength": 256 }, "dedupe": { "type": "boolean", "description": "When true (default), equivalent links are collapsed to one entry.", "default": true }, "schemes": { "type": "array", "description": "URL schemes to accept. Defaults to http and https.", "maxLength": 8, "items": { "type": "string", "maxLength": 16 } }, "allowedPaths": { "type": "array", "description": "Optional allowlist of paths within the source value to search. When omitted, every field is searched.", "maxLength": 16, "items": { "type": "string", "maxLength": 256 } }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "notificationAction": { "type": "object", "description": "Sends a notification to the automation owner via atmo.pub.", "required": ["id", "title", "body"], "properties": { "id": { "type": "string", "description": "Stable opaque identifier for this step.", "maxLength": 32 }, "name": { "type": "string", "description": "Optional name later steps use to reference this action's result.", "maxLength": 64 }, "title": { "type": "string", "description": "Notification title. Supports {{placeholder}} expressions.", "maxLength": 1000, "maxGraphemes": 250 }, "body": { "type": "string", "description": "Notification body. Supports {{placeholder}} expressions.", "maxLength": 2048, "maxGraphemes": 512 }, "uri": { "type": "string", "description": "Optional link opened from the notification. Supports {{placeholder}} expressions; the resolved value must start with at:// or https://.", "maxLength": 2048 }, "schedule": { "type": "ref", "ref": "#scheduleModifier" }, "comment": { "type": "string", "description": "Optional user note about this step.", "maxLength": 1024, "maxGraphemes": 256 } } }, "scheduleModifier": { "type": "object", "description": "Defers this step's execution: instead of running when the run reaches it, the step is queued and executes after the given delay.", "required": ["identifier", "delay"], "properties": { "identifier": { "type": "string", "description": "Identifier for the queued work, usable later to cancel it. Supports {{placeholder}} expressions. Scoped to the automation owner.", "maxLength": 512 }, "delay": { "type": "ref", "ref": "#relativeDelay" } } }, "relativeDelay": { "type": "object", "description": "A relative delay: a value and a unit.", "required": ["unit", "value"], "properties": { "unit": { "type": "string", "description": "Time unit: milliseconds, seconds, minutes, hours, days, or weeks.", "knownValues": ["ms", "s", "m", "h", "d", "w"], "maxLength": 4 }, "value": { "type": "ref", "ref": "#relativeDelayValue" } } }, "relativeDelayValue": { "type": "object", "description": "The delay amount, discriminated by 'kind': a literal number ('literal' uses n), a single {{placeholder}} ('template' uses expr), or a placeholder plus a constant ('sum' uses expr and offset).", "required": ["kind"], "properties": { "kind": { "type": "string", "knownValues": ["literal", "template", "sum"], "maxLength": 16 }, "n": { "type": "integer", "minimum": 0 }, "expr": { "type": "string", "maxLength": 512 }, "offset": { "type": "integer", "minimum": 0 } } } }}