Sources and ingress
Every source does the same narrow job: authenticate the inbound thing, bound it, normalise it into an Event, resolve its project(s), and hand it to the inbox. Sources never run actions.
| Source kind | Instance | Stage | State |
|---|---|---|---|
schedule | a schedule or one-shot scheduled event | exists; fires through the core from Stage 1 PR 1a | 1a merged (GoogleCloudPlatform/scion#4969) |
webhook | a project webhook endpoint (URL + secret) | Stage 1 slice, completed in Stage 2 | definitions merged (#5004) ingress built, waiting on CI |
github | the hub’s one GitHub App, scoped by installation ↔ project association | Stage 3 | normaliser, readiness, comment client, presets core merged G1 slice in development, rest designed |
chat | a conversation/channel pattern (ptone/scion#994) | Stage 4 | plan only |
agent_lifecycle | hook events of agents in the project | Stage 4 | plan only |
Generic webhooks
Endpoints are project-owned, with an optional agent binding (decision D2). The project is the only owning scope: there are no hub-level or user-profile endpoints; hub-wide inputs are curated sources such as the GitHub App route (triggers-arch, 2026-11-19; hub-level endpoints could be added later if wanted). The one-call scion trigger webhook create --agent/--message or --to-self form (endpoint plus a default message rule) was pulled forward into Stage 1 PR 5 by ptone on 2026-11-16; endpoint lifetime binding (delete with the agent, or --persistent) stays in Stage 2 P3.
Signature and auth modes
| Mode | What is verified | Replay-protected | Stage |
|---|---|---|---|
scion_v1 | X-Scion-Signature: t=…,v1=…, HMAC-SHA256 over version, timestamp, delivery, event and subject headers and the body; ±300 s | yes | 1 (only mode in Stage 1) |
hub_token | a Scion bearer (session, UAT, agent or dev token) plus new permission webhook_endpoint.send | counts as protected | 2 (P4a) |
stripe_v1 | Stripe-style t.body signature | yes | 2 (P4b, deferrable) |
github_v1 | X-Hub-Signature-256 over the body only | no → message rules only | 2 (P4b, deferrable) |
jira_v1 | X-Hub-Signature: sha256= over the body; routing defaults /webhookEvent, /issue/key; dedup by content hash (Jira sends no delivery id) | no → message rules only | 2 (added to P4b, 2026-11-16) |
Other Stage 2 additions: configurable replay window (default 300 s), routing hints (JSON pointers for type, subject and dedup key), per-endpoint rate limits that may only be lowered, bodies above 64 KiB stored via pkg/storage (up to 1 MiB), and caps on endpoints, fires per minute and live trigger-created agents.
scion_v1, stripe_v1, hub_token, or the github source). This is enforced at authoring, at fire time and on endpoint edits (Stage 2 §7.3).X-Scion-Signature-256: sha256=… over the body. The Stage 1 design replaced it with scion_v1 (timestamped, headers signed) and did not build a body-only mode (D-S1-5). The issue title for P4b (ptone/scion#8062) names only github_v1 and stripe_v1; jira_v1 was added by a later scope note.GitHub App events (Stage 3)
- Families:
pull_request,issues,issue_comment,pull_request_review,pull_request_review_comment;pushas a deferrable extra (G2b). Attribute names are kept provider-neutral (repo, number, action, sender, base_ref, head_sha, labels…) so a later GitLab source could reuse rules. - Commands:
@<app-slug> /cmd argson the first matching line, outside code spans, on created/opened/submitted events only, never from bots. The parser yieldscommand,command_args; there is no fixed command set: rules decide meaning. - Bots: the App’s own events are always dropped at ingress (loop guard). Other bots arrive as normal events with
sender_type=Bot; presets exclude them unlessallow_botsis set (ptone agreed 2026-11-16). - Presets (server-side, compile to event types + CEL): command, PR opened, PR updated (reuse, 30 s window), issue opened, label added, review submitted. Default sender gate: OWNER, MEMBER, COLLABORATOR. A customer fork’s
/review /validate /fix /plan /implementmatrix is the acceptance fixture. - App upgrade: the App must subscribe to the content events and hold Issues read/write; installation owners accept the new permissions on GitHub, and the hub shows a readiness check. GitHub routing on a workstation hub is not a goal of any stage (D6).
Schedules: the clock source
Schedules keep their own tables, API, CLI and web pages (decision D1 = shared core, separate rows). Stage 1 PR 1a moves their action, authority and fire-tracking code into the shared core with no behaviour change; Stage 1 PR 4 adds identifiers (schedule id, name, event id, fire time) to the schedule.fired envelope, which today carries none. Showing schedules as triggers, and a later migration, are Stage 4.
Later sources
- Chat routing (ptone/scion#994): the same matcher over message attributes; history-window injection is the only new concept. After Stage 3.
- Agent lifecycle events: lifecycle-hook events as a source. Lifecycle hooks themselves stay outbound HTTP.
- Jira: decided 2026-11-16: only the
jira_v1signature mode on generic endpoints (Option A), inbound only, Jira Cloud only. A curatedjirasource kind is not scheduled. Agents reply with their own Jira clients.