Skip to content

Commit d7eb865

Browse files
committed
docs(spec): the IAutomationService.toggleFlow contract says it switches packaged flows
The service contract's docblock read "Enable or disable a flow", the same published line the API page carried. It now says the switch records the installation's choice for packaged flows, that a flow authored in the deployment is refused with RESOURCE_CONFLICT / 409, and that such a flow's switch is its own status, published through registerFlow. Prose only. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H
1 parent 42d7a9a commit d7eb865

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.changeset/20726-toggle-door-docs-spec.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
docs(spec): the Automation API docblock says the toggle door switches packaged flows only, and names a customer flow's switch (#20726)
66

7-
The module docblock of `api/automation-api.zod.ts` listed `POST /api/v1/automation/:name/toggle` as "Enable/disable flow". That file ships as source, and its docblock is also the source of the Automation API reference page. The line now reads "Enable/disable a packaged flow". A new paragraph says what a flow authored in the deployment uses instead: its `status`, published with the complete definition through `PUT /api/v1/automation/:name`. The toggle door refuses such a flow with 409 `RESOURCE_CONFLICT`. This is prose only: no schema, type or export changes.
7+
The module docblock of `api/automation-api.zod.ts` listed `POST /api/v1/automation/:name/toggle` as "Enable/disable flow". That file ships as source, and its docblock is also the source of the Automation API reference page. The line now reads "Enable/disable a packaged flow". A new paragraph says what a flow authored in the deployment uses instead: its `status`, published with the complete definition through `PUT /api/v1/automation/:name`. The toggle door refuses such a flow with 409 `RESOURCE_CONFLICT`. The `IAutomationService.toggleFlow` docblock, which read "Enable or disable a flow", says the same. This is prose only: no schema, type or export changes.

‎packages/spec/src/contracts/automation-service.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,12 @@ export interface IAutomationService {
716716
getFlow?(name: string): Promise<FlowParsed | null>;
717717

718718
/**
719-
* Enable or disable a flow
719+
* Enable or disable a PACKAGED flow — one a code package ships — by
720+
* recording the installation's choice in the activation ledger
721+
* (ADR-0126 §7.2). A flow authored in the deployment is not this switch's:
722+
* the automation service refuses it with `RESOURCE_CONFLICT` / 409 and
723+
* changes nothing. That flow's switch is its own `status` (`'obsolete'` /
724+
* `'active'`), published through {@link registerFlow}.
720725
* @param name - Flow name (snake_case)
721726
* @param enabled - Whether to enable (true) or disable (false)
722727
*/

0 commit comments

Comments
 (0)