curl --request POST \
--url https://api.eddy.engineer/v1/agents/{id}/triggers \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.eddy.engineer/v1/agents/{id}/triggers"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/v1/agents/{id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/agents/{id}/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/agents/{id}/triggers"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/agents/{id}/triggers")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents/{id}/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"agent": "<string>",
"armed": {
"at_unix_ms": 123,
"by": "<string>",
"current_version": 123,
"stale": true,
"version": 123
},
"draft_problems": [
{
"message": "<string>",
"path": "<string>"
}
],
"log": [
{
"at_unix_ms": 123,
"comment": 123,
"note": "<string>",
"on": "<string>",
"outcome": "<string>",
"report": "<string>",
"run": "<string>",
"trigger": "<string>"
}
],
"outputs": {
"comment_on": "<string>",
"notify": [
"<string>"
],
"report": true
},
"owner_here": true,
"secrets": {},
"source": "armed",
"store": "paramdb",
"triggers": [
{
"cron": "<string>",
"from": "<string>",
"has_secret": true,
"hook": "<string>",
"in_flight": "<string>",
"item": "<string>",
"key": "<string>",
"kinds": [
"<string>"
],
"last_tick_unix_ms": 123,
"next": "<string>",
"next_unix_ms": 123,
"on": "chat",
"path": "<string>",
"project": "<string>",
"signature": "<string>",
"url": "<string>",
"waiting": true
}
]
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Arm or disarm an agent's triggers (AS18)
arm: a signed-in person who may edit the agent (not a key, not a delegate: 403 TRIGGERS_NEED_A_PERSON) pins the definition as it is now and starts its triggers. Every triggered run is that version, acting for THAT person through a delegated token scoped to what its tools resolve to within their scopes, with its credits held from their account (CR3); an edit applies when someone arms again. Schedules tick on the engine that holds the store’s lock; bus events (project.commit, impact.suspect, requirement.changed, job.done, and TL5’s plm.released and file.added) fire on what the arming person may see and never on what an agent run did (unless the trigger says from_agents; a file or a release an agent’s own run made never fires that agent); a released item must be one the arming person may read, and an added file’s files go into the run as attachments when that person may read them (others are withheld, counted). A webhook, and a mail.received trigger (TL5), answer at /hooks/agents//, and a new hook’s secret is answered once in secrets. A definition with problems is 422 AGENT_INVALID; one with no trigger but chat 422 NO_TRIGGERS; outputs that comment on a project the person may not see 422 OUTPUT_TARGET. disarm: the triggers stop (the hooks keep their secrets).
curl --request POST \
--url https://api.eddy.engineer/v1/agents/{id}/triggers \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.eddy.engineer/v1/agents/{id}/triggers"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/v1/agents/{id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/agents/{id}/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/agents/{id}/triggers"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/agents/{id}/triggers")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents/{id}/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"agent": "<string>",
"armed": {
"at_unix_ms": 123,
"by": "<string>",
"current_version": 123,
"stale": true,
"version": 123
},
"draft_problems": [
{
"message": "<string>",
"path": "<string>"
}
],
"log": [
{
"at_unix_ms": 123,
"comment": 123,
"note": "<string>",
"on": "<string>",
"outcome": "<string>",
"report": "<string>",
"run": "<string>",
"trigger": "<string>"
}
],
"outputs": {
"comment_on": "<string>",
"notify": [
"<string>"
],
"report": true
},
"owner_here": true,
"secrets": {},
"source": "armed",
"store": "paramdb",
"triggers": [
{
"cron": "<string>",
"from": "<string>",
"has_secret": true,
"hook": "<string>",
"in_flight": "<string>",
"item": "<string>",
"key": "<string>",
"kinds": [
"<string>"
],
"last_tick_unix_ms": 123,
"next": "<string>",
"next_unix_ms": 123,
"on": "chat",
"path": "<string>",
"project": "<string>",
"signature": "<string>",
"url": "<string>",
"waiting": true
}
]
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Response
The triggers, armed or not