Skip to content

docs: Automations, Webhooks and schedules, and the Automations/Approvals API reference (DO NOT MERGE until the community opening) - #173

Merged
sre-helmcode merged 4 commits into
mainfrom
docs/automations-phase2
Oct 11, 2026
Merged

sre-helmcode merged 4 commits into
mainfrom
docs/automations-phase2

Conversation

@sre-helmcode

Copy link
Copy Markdown
Contributor

What

Agent Automations Phase 2 docs, for the community opening of automations, webhooks and member secrets. Do not merge or deploy: the Lead deploys it at the opening (it needs cloud-api automations on, SECRETS_ENABLED, the /hooks + /v1/automations + /v1/approvals edge passthrough from devops T10b, and nan-cli 0.1.26 released).

New guides (EN + ES), Guides group, right after Agent runs

  • /docs/automations: what an automation is, creating one in the portal, templates, every settings field, member secrets (Settings > Secrets, write-only, exposures, reserved names, 48 KiB budget), the GitHub token for actions, the six action kinds, per-kind approval (empty = fully automatic), approving and rejecting, concurrency policy, Run now / nan automations run / API, token scopes, limits, browser sign-in rule, FAQ.
  • /docs/webhooks: GitHub, Stripe and NaN (HMAC) senders with setup steps and bash/Python/Node signing examples, URL and secret shown once, event and actor filters, what the agent receives, the answers to the sender, the delivery log, rotation with 24 h grace, loops, cron schedules (15 min minimum, 10 per member, DST, no catch-up, last outcome labels).

Updated: Agent runs (awaiting_approval, approval_required/action events, exit code 10, token scopes), NaN CLI (0.1.26 commands), introduction links; Examples and Apps move two places down.

API reference (src/data/openapi.json): Automations tag (list, templates, retrieve, triggers, deliveries, run) and Approvals tag (list, proposal.diff, reject); Phase 2 run fields (phase, approval, apply_run_ids, automation_id, parent_run_id, input, instructions, ...), awaiting_approval, new triggers/events/error codes, ?automation= filter; scopes per operation, token_scope_denied, browser_session_required, token_not_valid_for_inference (edge body), current session_required body. Portal-only writes (automation/trigger CRUD, approve) are described, not documented as operations. /api/account/secrets is not in the reference. Ephemeral executors and BYOK are not mentioned.

Sources: cloud-api origin/main 8a42a20 (handlers + golden files), cloud-ui origin/main 75eb1c5 (labels), nan-cli PR #43, devops AGENT-AUTOMATIONS-PHASE2.md and the T10b edge branch.

Tests

  • src/tests/layouts/automationsDocs.test.ts: facts vs cloud-api/cloud-ui/nan-cli, every cross-page anchor in both locales, ES structure and code blocks identical, no internals, no em-dashes, no ids.
  • src/lib/openapiAutomations.test.ts: operations, scopes (pat_scopes.go), schema field order vs handlers, error codes, real error bodies, no write/secrets routes, every example validated, and cloud-api's golden responses (copied to src/tests/fixtures/phase2) validated against the published schemas.
  • Existing Runs/spec/snippet tests updated; the example validator moved to src/tests/helpers/openapiValidate.ts.
  • npx vitest run: 77 files, 1881 tests pass. npm run build passes. Pages checked in the dev server.

🤖 Generated with Claude Code

barckcode and others added 2 commits October 11, 2026 22:18
…s Phase 2)

New guides in both locales, right after Agent runs: Automations (templates,
settings, member secrets and the GitHub token for actions, actions and
per-kind approval, approving and rejecting, run now from the portal, CLI
0.1.26 and API, token scopes, limits, browser sign-in) and Webhooks and
schedules (GitHub, Stripe and NaN HMAC senders with signing examples, event
and actor filters, what the agent receives, answers to the sender, delivery
log, rotation, loops, cron schedules). Agent runs, NaN CLI and the
introduction link them; awaiting_approval, the new events and exit code 10
are added to the runs guide. Examples and Apps move two places down.

Tests pin the facts against cloud-api, the portal labels and nan-cli, check
every cross-page anchor in both locales and the Spanish structure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the Automations tag (list, templates, retrieve, triggers, deliveries,
run) and the Approvals tag (list, proposal diff, reject), the Phase 2 run
fields (phase, approval, apply_run_ids, automation_id, parent_run_id and the
rest), the awaiting_approval state, the approval_required and action events
and the new error codes. Documents platform token scopes, the browser
sign-in rule (browser_session_required), token_not_valid_for_inference on
inference, and the current session_required body. Portal-only writes and
member secrets are not documented as endpoints.

cloud-api's own golden responses are copied as fixtures and validated
against the published schemas; the example validator moves to a shared
test helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@barckcode
barckcode force-pushed the docs/automations-phase2 branch from 01083b2 to 5a22c6f Compare October 11, 2026 20:19
barckcode and others added 2 commits October 11, 2026 22:29
GitHub ping is always ignored; an empty event filter uses the template's
filter and {} lets everything through; the automation's run ends when its
proposal is settled and a separate apply run applies the actions (where
action_failed shows); skip_if_active subjects per sender; chain depth starts
at 1 for webhook and schedule runs; every cause of not_accepted; Stripe
needs its secret before the webhook is added; CI token scopes and where the
automation id is; the GitHub token needs Actions read and Workflows write
when relevant; 400/500 answers, 50 deliveries, schedule Error outcome; exit
code 10 in order; natural Spanish. Tests run the published bash signing line
against an independent HMAC vector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t_accepted causes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sre-helmcode
sre-helmcode merged commit 4ef2993 into main Oct 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants