@amalgm/automations 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,6 +46,8 @@ the API request.
46
46
  - `@amalgm/automations/mcp`: agent tools over the same SDK.
47
47
  - `@amalgm/automations/host`: standalone Fly service composition.
48
48
  - `amalgm-automations`: CLI adapter.
49
+ - `skills/amalgm-automations`: portable agent skill for operating either the
50
+ MCP or global CLI surface safely.
49
51
 
50
52
  ## Agent CLI
51
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amalgm/automations",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Amalgm's automation SDK: durable trigger admission and target-machine execution.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: amalgm-automations
3
+ description: Operate complete Amalgm automations through the Automations MCP tools or the global `amalgm automations` CLI, including schedules, webhooks, Run Now, run history, native commands, scripts, and Amalgm actions.
4
+ ---
5
+
6
+ # Amalgm Automations
7
+
8
+ Use this skill to turn a user's requested recurring, event-driven, or manual
9
+ workflow into one durable Amalgm automation and verify what actually ran.
10
+ Automations owns configuration and permanent run history; the selected Amalgm
11
+ machine executes the workflow.
12
+
13
+ ## Choose the available adapter
14
+
15
+ Prefer the six `amalgm_automations_*` MCP tools when they are callable. In a
16
+ native local agent without that MCP server, use the matching global CLI:
17
+
18
+ ```text
19
+ MCP CLI
20
+ amalgm_automations_create amalgm automations create
21
+ amalgm_automations_list amalgm automations list
22
+ amalgm_automations_get amalgm automations get
23
+ amalgm_automations_update amalgm automations update
24
+ amalgm_automations_delete amalgm automations delete
25
+ amalgm_automations_run_now amalgm automations run-now
26
+ ```
27
+
28
+ Both adapters accept the same JSON object and call the same SDK command
29
+ surface. Do not translate one into a different resource-level API.
30
+
31
+ For CLI use, first check `amalgm automations --help`. A signed-in, running
32
+ Amalgm Shell supplies authentication through its loopback runtime. Never ask
33
+ the user to copy a runtime token, DPoP proof, device key, or machine credential.
34
+ If the runtime is unavailable, report that Shell must be signed in and running;
35
+ do not fall back to an invented credential flow.
36
+
37
+ Read [references/command-contract.md](references/command-contract.md) whenever
38
+ composing `create` or `update`, or when exact fields are uncertain. Read
39
+ [references/workflow-plans.md](references/workflow-plans.md) whenever a
40
+ workflow runs an Amalgm action, native executable, code script, or trigger
41
+ input.
42
+
43
+ ## Preserve scope and intent
44
+
45
+ - List or get before changing an existing automation. Identify the exact
46
+ automation and preserve fields the user did not ask to change.
47
+ - The CLI is global. Its invocation directory never scopes the automation.
48
+ Execution belongs to the selected target machine.
49
+ - Omit `targetId` in a machine-bound session. Never guess or copy an opaque
50
+ target id. If the principal has multiple targets, let the service require an
51
+ explicit user choice.
52
+ - A process `cwd`, when supplied, must be absolute. If omitted, the selected
53
+ machine uses its documented default (normally that user's OS home).
54
+ - Workflow `env` is persisted ordinary configuration, not a secret store.
55
+ Never place Shell credentials or reusable service secrets in it.
56
+ - Use `--stdin` for CLI payloads containing a webhook signing secret or
57
+ complex source. Do not expose those values in command arguments or logs.
58
+ - Delete only after the exact id is established and deletion is within the
59
+ user's request. Deleting configuration intentionally retains run history.
60
+
61
+ ## Build one complete definition
62
+
63
+ Create the automation, its schedule/webhook triggers, and its optional workflow
64
+ in one task-level call. The service stages multi-resource changes safely and
65
+ enables the definition only after setup succeeds. If setup fails, report the
66
+ returned disabled draft id rather than silently creating a replacement.
67
+
68
+ Use a finite `maxOccurrences` when the user's request is bounded. Do not turn
69
+ "ten times" into an unbounded schedule plus a future cleanup promise.
70
+
71
+ Choose workflow lanes explicitly:
72
+
73
+ - An Amalgm tool or Amalgm agent is an action step. `chat.chat_agent_run` is
74
+ the Amalgm-agent path and requires a configured agent installation.
75
+ - A user's native Codex, Claude Code, OpenCode, or other installed program is
76
+ a command step. Arguments are literal argv; no shell is implied.
77
+ - Inline shell, Node.js, or Python source is a script step. Choose this lane
78
+ only when code or shell semantics are intentional.
79
+
80
+ Version 1 is action-only. Use version 2 for command or script steps and when
81
+ mixing lanes. Discover Amalgm action ids through the Tools product and native
82
+ executables through the selected machine; never guess either.
83
+
84
+ ## Verify Run Now to completion
85
+
86
+ `run-now` performs durable manual admission. Its initial `pending` result is
87
+ not evidence that work completed.
88
+
89
+ 1. Supply a stable, caller-chosen `idempotency_key` whenever the request might
90
+ be retried.
91
+ 2. If admission is retried, send the same automation id, input, and key. The
92
+ returned run id must remain the same.
93
+ 3. Poll `get` with `include_runs: true` or a `run_query` until the admitted run
94
+ becomes `completed` or `failed`. Match the exact run id; do not assume the
95
+ newest unrelated run is yours.
96
+ 4. Inspect every step's status and bounded output. Report failure honestly,
97
+ including the failing step and service error.
98
+
99
+ `pending` means durable and awaiting its machine. `sent` or `running` means the
100
+ machine holds a lease. Only `completed` and `failed` are terminal.
101
+
102
+ Diagnose at the failing boundary. Examples: `process_execution_unavailable`
103
+ means that machine lacks the process host; an executable-not-found error is a
104
+ machine PATH/install problem; `Installed agent has no model` is agent
105
+ configuration; an action-specific HTTP error belongs to that action service.
106
+ Do not relabel these as Run Now failures or patch the automation around them.
107
+
108
+ ## Report the outcome
109
+
110
+ Return the automation id, target choice if the user selected one, trigger
111
+ summary, workflow lanes, and—when execution was requested—the exact run id and
112
+ terminal result. Mention that run history is durable. Never claim a schedule
113
+ fired merely because configuration creation succeeded.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Amalgm Automations"
3
+ short_description: "Create and verify durable Amalgm automations"
4
+ default_prompt: "Use $amalgm-automations to create and verify an automation for me."
@@ -0,0 +1,173 @@
1
+ # Command contract
2
+
3
+ Use the field names below exactly. MCP receives the object directly. CLI
4
+ receives it through `--input '<json>'`, `--file <path>`, or `--stdin` and emits
5
+ one JSON envelope:
6
+
7
+ ```json
8
+ {"result": {}}
9
+ ```
10
+
11
+ Failures use stderr, a nonzero exit, and:
12
+
13
+ ```json
14
+ {"error":{"code":"...","message":"...","status":400}}
15
+ ```
16
+
17
+ Do not scrape prose or infer success from exit code alone; parse the envelope.
18
+
19
+ ## create
20
+
21
+ ```json
22
+ {
23
+ "id": "optional-readable-id",
24
+ "targetId": "optional-explicit-target",
25
+ "name": "Optional name",
26
+ "description": "Optional description",
27
+ "enabled": true,
28
+ "schedules": [{
29
+ "id": "optional-trigger-id",
30
+ "cron": "0 9 * * 1-5",
31
+ "timezone": "America/Los_Angeles",
32
+ "enabled": true,
33
+ "maxOccurrences": 10
34
+ }],
35
+ "webhooks": [{
36
+ "id": "optional-trigger-id",
37
+ "source": "github",
38
+ "event": "push",
39
+ "secret": "optional-provider-secret-at-least-16-characters",
40
+ "enabled": true
41
+ }],
42
+ "workflow": {
43
+ "id": "optional-workflow-id",
44
+ "name": "Optional workflow name",
45
+ "script": "Human-readable summary of what the workflow does.",
46
+ "compiled": {
47
+ "version": 1,
48
+ "steps": [{
49
+ "id": "notify",
50
+ "actionId": "channels.notify_user",
51
+ "input": {"title":"Reminder","message":"Call Mom"}
52
+ }]
53
+ },
54
+ "allowlist": null,
55
+ "limits": null
56
+ }
57
+ }
58
+ ```
59
+
60
+ At least one executable step is required when `compiled` is supplied. Omit
61
+ `targetId` when Shell has bound the principal to one machine. The returned
62
+ webhook URL is the provider destination; a configured signing secret is
63
+ write-only on later reads.
64
+
65
+ CLI example:
66
+
67
+ ```bash
68
+ printf '%s\n' '{"name":"Weekday check","schedules":[{"cron":"0 9 * * 1-5","timezone":"America/Los_Angeles"}],"workflow":{"script":"Run the weekday check.","compiled":{"version":2,"steps":[{"id":"check","kind":"command","command":"my-check","cwd":"/absolute/project"}]}}}' \
69
+ | amalgm automations create --stdin
70
+ ```
71
+
72
+ ## list
73
+
74
+ All fields are optional:
75
+
76
+ ```json
77
+ {"targetId":"machine-id","enabled":true,"limit":20,"offset":0}
78
+ ```
79
+
80
+ Use it to find candidates, then `get` the exact definition before mutation.
81
+
82
+ ## get
83
+
84
+ ```json
85
+ {
86
+ "automation_id": "automation-id",
87
+ "include_runs": true,
88
+ "run_query": {"status":"completed","limit":20,"offset":0}
89
+ }
90
+ ```
91
+
92
+ `include_runs` and `run_query` are optional. `run_query.status` is one of
93
+ `pending`, `sent`, `running`, `completed`, or `failed`.
94
+
95
+ ## update
96
+
97
+ Updates are grouped so one call can change metadata and owned resources:
98
+
99
+ ```json
100
+ {
101
+ "automation_id": "automation-id",
102
+ "patch": {
103
+ "targetId": "optional-new-target",
104
+ "name": "New name or null",
105
+ "description": "New description or null",
106
+ "enabled": true
107
+ },
108
+ "schedules": {
109
+ "create": [{"cron":"0 9 * * *","timezone":"UTC"}],
110
+ "update": [{"id":"schedule-id","patch":{"enabled":false}}],
111
+ "delete": ["old-schedule-id"]
112
+ },
113
+ "webhooks": {
114
+ "create": [{"source":"github","event":"push"}],
115
+ "update": [{"id":"webhook-id","patch":{"rotateUrl":true}}],
116
+ "delete": ["old-webhook-id"]
117
+ },
118
+ "workflow": {
119
+ "update": {
120
+ "name": "Updated workflow name",
121
+ "script": "Updated summary",
122
+ "compiled": {
123
+ "version": 2,
124
+ "steps": [{
125
+ "id": "check",
126
+ "kind": "command",
127
+ "command": "my-check",
128
+ "cwd": "/absolute/project"
129
+ }]
130
+ },
131
+ "allowlist": null,
132
+ "limits": null
133
+ }
134
+ }
135
+ }
136
+ ```
137
+
138
+ Every included patch must contain a real change. Workflow change is exactly one
139
+ of `{ "create": ... }`, `{ "update": ... }`, or `{ "delete": true }`.
140
+ Schedule and webhook changes may combine create/update/delete arrays. Preserve
141
+ resource ids returned by `get`; ids are scoped to their automation.
142
+
143
+ ## delete
144
+
145
+ ```json
146
+ {"automation_id":"automation-id"}
147
+ ```
148
+
149
+ This deletes current configuration, triggers, and workflow. It does not delete
150
+ historical runs.
151
+
152
+ ## run-now
153
+
154
+ ```json
155
+ {
156
+ "automation_id": "automation-id",
157
+ "input": {"requestedBy":"user"},
158
+ "idempotency_key": "stable-key-for-this-logical-request"
159
+ }
160
+ ```
161
+
162
+ `input` may be any JSON value. Admission requires an enabled automation with an
163
+ executable compiled workflow. The returned run starts as `pending`; follow it
164
+ with `get` until terminal. Reusing the same key for the same logical request
165
+ returns the same run rather than creating a duplicate.
166
+
167
+ ## Webhook completion
168
+
169
+ Creating an Amalgm webhook trigger does not register it at GitHub or another
170
+ provider. Configure the returned URL in that provider separately, use JSON
171
+ content type, select only the requested events, and use the same optional
172
+ signing secret on both sides. Rotating the URL invalidates the old bearer
173
+ capability.
@@ -0,0 +1,152 @@
1
+ # Workflow plans
2
+
3
+ The compiled plan is an immutable, ordered snapshot when a run is admitted.
4
+ Step ids must be unique and the plan must contain 1–100 steps.
5
+
6
+ ## Step forms
7
+
8
+ Version 1 accepts action steps only:
9
+
10
+ ```json
11
+ {
12
+ "version": 1,
13
+ "steps": [{
14
+ "id": "notify",
15
+ "actionId": "channels.notify_user",
16
+ "input": {"title":"Reminder","message":"Call Mom"}
17
+ }]
18
+ }
19
+ ```
20
+
21
+ Version 2 accepts any ordered mix of these three forms:
22
+
23
+ ```text
24
+ Amalgm action
25
+ { id, actionId, input }
26
+
27
+ Native command
28
+ { id, kind:"command", command, args?, cwd?, env?, stdin?,
29
+ timeoutMs?, maxOutputBytes? }
30
+
31
+ Code script
32
+ { id, kind:"script", runtime:"shell"|"node"|"python", source,
33
+ args?, cwd?, env?, stdin?, timeoutMs?, maxOutputBytes? }
34
+ ```
35
+
36
+ `id`, `actionId`, `command`, every `args` element, environment keys and values,
37
+ and `runtime` are strings. `timeoutMs` and `maxOutputBytes` are positive
38
+ integers. `cwd` is optional but must be absolute when present.
39
+
40
+ ## Amalgm actions and agents
41
+
42
+ Action steps run through the selected machine's installed Amalgm Tools/action
43
+ catalog. Discover an action before using it. Do not derive action ids from MCP
44
+ tool names.
45
+
46
+ The Amalgm-agent action is distinct from a native CLI agent:
47
+
48
+ ```json
49
+ {
50
+ "id": "review-with-amalgm-agent",
51
+ "actionId": "chat.chat_agent_run",
52
+ "input": {
53
+ "agent_installation_id": "configured-installation-id",
54
+ "message": "Review this occurrence.",
55
+ "context": {"$runInput":true}
56
+ }
57
+ }
58
+ ```
59
+
60
+ The installation must exist and declare a usable model/provider binding. Do
61
+ not guess an installation id from an adapter name such as `codex`.
62
+
63
+ ## Native CLI agents
64
+
65
+ Use a command step for the user's independently installed CLI:
66
+
67
+ ```json
68
+ {
69
+ "id": "native-codex-review",
70
+ "kind": "command",
71
+ "command": "codex",
72
+ "args": ["exec", "Review this repository and write REVIEW.md"],
73
+ "cwd": "/Users/me/src/project",
74
+ "timeoutMs": 1800000,
75
+ "maxOutputBytes": 1048576
76
+ }
77
+ ```
78
+
79
+ The executable is resolved from the target machine's PATH and uses its own
80
+ user-level login. Args are passed directly with `shell:false`; `$HOME`, pipes,
81
+ redirection, globbing, and quoting syntax are literal arguments. If shell
82
+ syntax is intended, choose the script lane explicitly.
83
+
84
+ Equivalent installed programs such as `claude -p ...` or `opencode ...` use
85
+ the same command form. Their accepted args and authentication belong to those
86
+ programs, not Automations.
87
+
88
+ ## Scripts
89
+
90
+ Scripts persist source in the workflow and execute through a temporary file on
91
+ the selected machine. The temporary file is removed after execution.
92
+
93
+ ```json
94
+ {
95
+ "id": "process-event",
96
+ "kind": "script",
97
+ "runtime": "node",
98
+ "source": "let s=''; process.stdin.on('data', c => s += c).on('end', () => console.log(JSON.parse(s)));",
99
+ "cwd": "/absolute/project",
100
+ "stdin": {"$runInput":true},
101
+ "env": {"MODE":"automation"},
102
+ "timeoutMs": 30000,
103
+ "maxOutputBytes": 262144
104
+ }
105
+ ```
106
+
107
+ Use `runtime:"shell"` for POSIX shell semantics on Unix and PowerShell file
108
+ execution on Windows. Use `node` or `python` for explicit code in those
109
+ runtimes. Account for target-machine portability when selecting a runtime or
110
+ absolute path.
111
+
112
+ ## Run input
113
+
114
+ The exact singleton object below is the only template marker:
115
+
116
+ ```json
117
+ {"$runInput":true}
118
+ ```
119
+
120
+ It resolves recursively inside action `input`. In process steps it may be used
121
+ as `stdin`; strings are passed verbatim and other JSON values are serialized
122
+ with a trailing newline. Trigger payloads are never ambient.
123
+
124
+ ## Execution and retries
125
+
126
+ Each step is recorded as running before its effect and committed as completed
127
+ before the next step begins. Completed steps are skipped after reconnect.
128
+
129
+ Every run-step pair receives the stable key `<run-id>:<step-id>`. Process steps
130
+ receive it as `AMALGM_AUTOMATION_IDEMPOTENCY_KEY`. Shell's private runtime,
131
+ tunnel, device, and machine credentials are stripped from child environments.
132
+
133
+ An uncertain machine crash can repeat the current effect. Amalgm actions can
134
+ deduplicate the step key; an arbitrary command or script is at-least-once and
135
+ must durably deduplicate that environment value when exactly-once effects are
136
+ required.
137
+
138
+ Process output records exit code, signal, stdout, stderr, and whether capture
139
+ was truncated. Timeouts, cancellation, and output bounds are enforced on the
140
+ machine. The durable journal compacts oversized results rather than allowing
141
+ large output to strand the run update.
142
+
143
+ ## Common boundary diagnoses
144
+
145
+ - `process_execution_unavailable`: selected machine host lacks process support.
146
+ - Spawn/not-found error: executable or runtime is absent from that machine PATH.
147
+ - Nonzero exit: inspect bounded stdout/stderr; the automation correctly failed.
148
+ - Timeout: adjust only when the intended command legitimately needs longer.
149
+ - `Installed agent has no model`: select or configure an actual Amalgm agent
150
+ installation with a model; this is not a native CLI-auth failure.
151
+ - Action-specific HTTP/authorization error: verify that action's owning service
152
+ and input contract without changing Run Now semantics.
@@ -1,141 +0,0 @@
1
- ---
2
- name: automations
3
- description: Create, inspect, change, delete, or manually run complete Amalgm automation definitions and inspect their run history through the Automations MCP tools.
4
- ---
5
-
6
- # Amalgm Automations
7
-
8
- Use the Automations tools for scheduled or webhook-driven work. The tools are
9
- the agent adapter over the same hosted SDK used by the UI.
10
-
11
- When MCP is unavailable but the authenticated Amalgm Shell CLI is available,
12
- use the command with the matching suffix (`create`, `list`, `get`, `update`,
13
- `delete`, or `run-now`). Pass the exact MCP input object as JSON, preferably on
14
- stdin when it contains a provider secret:
15
-
16
- ```bash
17
- printf '%s\n' '{"name":"Call Mom","schedules":[{"cron":"* * * * *","timezone":"America/Los_Angeles","maxOccurrences":10}],"workflow":{"script":"Notify me to call Mom.","compiled":{"version":1,"steps":[{"id":"notify","actionId":"channels.notify_user","input":{"title":"Reminder","message":"Call Mom"}}]}}}' \
18
- | amalgm automations create --stdin
19
- ```
20
-
21
- The CLI returns `{ "result": ... }` on stdout or a structured `error` object
22
- on stderr with a nonzero exit. It has no separate low-level trigger or workflow
23
- commands; complete definitions and grouped changes use the same task-level
24
- surface as MCP.
25
-
26
- The CLI is global. Its current directory does not scope or modify the
27
- automation. Process location belongs in an absolute workflow-step `cwd`; when
28
- it is omitted, Shell uses the selected machine user's OS home.
29
-
30
- ## Choose the execution lane deliberately
31
-
32
- Use exactly one of these shapes for each compiled workflow step:
33
-
34
- Version 1 remains action-only. Use plan version 2 for every workflow containing
35
- a native command or code script; version 2 may mix all three lanes.
36
-
37
- - **Amalgm action** — `{ "id", "actionId", "input" }`. Use this for Amalgm
38
- tools, Channels, or the Amalgm agent path. `chat.chat_agent_run` is an Amalgm
39
- agent, not the user's native CLI agent.
40
- - **Native command** — `{ "id", "kind":"command", "command", "args"?,
41
- "cwd"?, "env"?, "stdin"?, "timeoutMs"?, "maxOutputBytes"? }`. Use this for
42
- installed executables such as `codex exec`, `claude -p`, `opencode`, or a
43
- script file. Args are literal argv and never pass through a shell.
44
- - **Code script** — `{ "id", "kind":"script", "runtime":"shell"|"node"|
45
- "python", "source", "args"?, "cwd"?, "env"?, "stdin"?, "timeoutMs"?,
46
- "maxOutputBytes"? }`. Use this only when inline code or shell semantics are
47
- desired explicitly.
48
-
49
- For a native Codex run on the selected machine:
50
-
51
- ```json
52
- {
53
- "version": 2,
54
- "steps": [{
55
- "id": "native-review",
56
- "kind": "command",
57
- "command": "codex",
58
- "args": ["exec", "Review this repository and write REVIEW.md"],
59
- "cwd": "/absolute/path/to/repository",
60
- "timeoutMs": 1800000
61
- }]
62
- }
63
- ```
64
-
65
- Installed CLI authentication comes from that CLI's own user setup on the
66
- selected machine. Never put Shell runtime, tunnel, or machine credentials in a
67
- workflow. `env` is persisted ordinary configuration, not a secret store.
68
- Process results and bounded stdout/stderr appear in run history. A native
69
- process may repeat after an uncertain machine crash; it receives
70
- `AMALGM_AUTOMATION_IDEMPOTENCY_KEY` for durable deduplication when needed.
71
-
72
- ## Create a scheduled notification
73
-
74
- For a request such as “remind me to call my mom every minute for the next ten
75
- minutes,” make one `amalgm_automations_create` call containing the complete
76
- definition. Include a readable workflow summary and this compiled plan:
77
-
78
- ```json
79
- {
80
- "version": 1,
81
- "steps": [
82
- {
83
- "id": "notify",
84
- "actionId": "channels.notify_user",
85
- "input": { "title": "Reminder", "message": "Call Mom" }
86
- }
87
- ]
88
- }
89
- ```
90
-
91
- Include one schedule with cron `* * * * *`, the user's timezone, and
92
- `maxOccurrences: 10`. Omit `targetId` in a machine-bound session; never guess
93
- an opaque target id.
94
-
95
- The tool stages multi-resource configuration disabled and enables it only after
96
- setup succeeds. If setup fails, report the returned disabled draft id. Never
97
- replace a bounded occurrence count with an unbounded schedule plus a promise to
98
- clean it up later.
99
-
100
- ## Read and change
101
-
102
- Use `amalgm_automations_list` or `amalgm_automations_get` before changing an
103
- existing automation. Use `amalgm_automations_update` for grouped metadata,
104
- schedule, webhook, or workflow changes, and `amalgm_automations_delete` only
105
- after identifying the exact automation. Schedule and webhook triggers remain
106
- distinct resources inside the definition. A workflow is zero-or-one per
107
- automation. Run history is read-only, requested through `get`, and remains
108
- after configuration deletion.
109
-
110
- Use `amalgm_automations_run_now` when the user wants an enabled automation to
111
- run immediately. Supply `idempotency_key` when a caller may retry the same
112
- request. The result is a durable `pending` run, not proof that its selected
113
- machine has finished it; use `amalgm_automations_get` with run history when the
114
- user asks for the outcome.
115
-
116
- Amalgm action discovery belongs to the Tools product. Native command discovery
117
- belongs to the selected machine's PATH and installed user environment.
118
-
119
- For webhook-driven work, pass the admitted provider payload into an action or
120
- process by placing the exact value `{ "$runInput": true }` at the desired point
121
- in action `input` or process `stdin`. For example, an agent-review action can
122
- use a static `message` and set `context` to `{ "$runInput": true }`. Never paste
123
- an example delivery into the workflow: every admitted run must use its own
124
- durable input.
125
-
126
- `pending` means a run is durable and waiting for its selected machine. `sent`
127
- or `running` means that machine holds a lease. `completed` and `failed` are
128
- terminal. Do not infer delivery from the schedule alone; inspect runs when the
129
- user asks whether it actually happened.
130
-
131
- Each webhook trigger returns one copyable `webhookUrl`; use that URL as the
132
- provider destination. A separate provider signing secret is optional and
133
- write-only. Never echo, log, or place either credential in a workflow. Rotate
134
- the URL when its bearer capability may have been exposed.
135
-
136
- For GitHub, register the returned URL as a repository webhook with JSON content
137
- type and select only the requested events (normally `push`). If a provider
138
- secret was configured on the trigger, use the same value as GitHub's webhook
139
- secret. Creating the Amalgm trigger does not silently mutate GitHub; finish the
140
- provider registration in the authenticated GitHub surface available to the
141
- agent, then report both sides as configured.