fix(sdk): widen --on trigger grammar; write Linear closing reference
Summary
Companion to AgentWorkforce/cloud#3990 (deploy-page trigger filters).
--ongrammar parity: the CLI's source-settings allowlist now accepts what Cloud's deploy-link parser and onboarding already emit —linear:team/project/labels/contains,jira:project/labels/contains,shortcut:workspace/team/labels/contains,gitlab:project/labels/contains/events.- Linear writeback: the software-factory flow now emits a
Fixes <IDENTIFIER>closing reference in the PR body when the issue is a Linear ticket, so Linear's GitHub integration links the PR to the issue and transitions it on merge. (Assignment-triggered runs still depend on Cloud dispatching authored.on()handlers — not yet supported.) - README: documents that
team=accepts the Linear team key or display name.
Test plan
-
vitest run tests/cloud-deploy.test.ts tests/canonical-software-factory.test.ts→Test Files 2 passed (2), Tests 51 passed (51) -
npm run typecheck/npm run build/typecheck:tests(viascripts/test.sh) → clean
Generated with Devin
[!NOTE]
Medium Risk
Changes deploy trigger validation and PR-opening metadata gates for a widely used example flow; mis-parsed triggers or overly strict closing-reference checks could block deployments or runs, but scope is mostly SDK/docs plus deterministic validation.
Overview
Aligns CLI flows deploy --on parsing with Cloud’s deploy wizard: gitlab is a first-class provider (project, labels, contains, events with merge_request), and Linear / Jira / Shortcut / GitHub gain the extra filter keys Cloud already emits (linear: project/labels; jira: labels; shortcut: team/labels; github: boolean reviews/checks/comments opt-outs on pull-request sources). docs/CLOUD.md and the software-factory README describe the wider grammar and that Linear team= matches name or key.
Software-factory now treats Linear like GitHub for PR write-back: it requires a TEAM-123 identifier (digits in team keys OK), appends exactly Fixes <identifier>, and fails closed before push if the line is missing, duplicated, or another closing-keyword reference appears in the body (GitHub validation uses the same stricter closing-line check). The hosted runtime SHA256 pin and flow version bump track the updated catalog flow; tests cover new --on cases and Linear metadata behavior.
Reviewed by Cursor Bugbot for commit d7214ce509a9e4be232696aa61294bbd6d2afad5. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Widens the --on trigger grammar so the SDK accepts what Cloud's deploy link and onboarding already emit, and writes a Linear closing reference that connects PRs to Linear issues.
lineargainsproject/labels,jiragainslabels,shortcutgainsteam/labels,githubgainsreviews/checks/commentsas boolean subscription opt-outs, andgitlabbecomes a provider withproject/labels/contains/events(merge_requestas its pull-request event).- Linear tickets (
TECH-42) now appendFixes <identifier>to the PR body, which Linear's GitHub integration reads to link the PR and move the issue on merge; the run fails closed if that line is missing or duplicated, refuses identifiers that don't matchTEAM-123form (team keys may carry digits, e.g.PLA4-42), and stops when the body carries any other closing-keyword line. A closing keyword only counts when a ticket reference follows it, so prose like "Fixed the retry loop" no longer blocks the run. docs/CLOUD.mdand the software-factory README document the widened grammar; the README's deploy badge now fixes only the provider since team, project and labels are edited on the deploy page, whereteam=matches the team name or its key.
Agent Relay sessions
devinsessionpurrfect· opened viagh pr create· last active 2026-09-25