Skip to content

Commit 0050c2e

Browse files
api-stability: mark Eloquent-model-accepting contracts as @internal
`Workflow\V2\Contracts\OperatorObservabilityRepository` accepts `WorkflowRun` and `WorkflowRunSummary` Eloquent instances, and `Workflow\V2\Contracts\ScheduleWorkflowStarter` accepts `WorkflowSchedule`. Neither is implementable without the workflow package's own model hierarchy, so external/polyglot adapters cannot bind these contracts directly. Mark both interfaces @internal and document the HTTP surfaces (Waterline API, `/webhooks/...`, control plane routes) as the stable cross-language path. These are the two internal contracts called out in V2-API — tightening their docblocks without breaking the existing PHP bindings in the server (RemoteScheduleStarter, Waterline repository). Closes #291.
1 parent 4cc3d6b commit 0050c2e

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/V2/Contracts/OperatorObservabilityRepository.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
use Workflow\V2\Models\WorkflowRun;
99
use Workflow\V2\Models\WorkflowRunSummary;
1010

11+
/**
12+
* Repository contract for operator-facing observability payloads (Waterline
13+
* detail, list projection, history export, dashboard, metrics).
14+
*
15+
* @internal Accepts Eloquent models ({@see WorkflowRun}, {@see WorkflowRunSummary})
16+
* as arguments and is coupled to the package's own model hierarchy.
17+
* Intended for Waterline and v2 polyglot-server integrations that
18+
* already run on top of the workflow package's PHP runtime; not a
19+
* stable cross-language contract and not subject to the v2
20+
* backwards-compatibility guarantee. Use the HTTP surfaces
21+
* (Waterline API, `/webhooks/...`) for external consumers instead.
22+
*/
1123
interface OperatorObservabilityRepository
1224
{
1325
/**

src/V2/Contracts/ScheduleWorkflowStarter.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
* uses in-process PHP workflow classes via `WorkflowStub::make()`. Hosts that
1616
* run language-neutral workflows (e.g. the standalone server) bind their own
1717
* implementation that starts workflows by `workflow_type` through a control plane.
18+
*
19+
* @internal Accepts the {@see WorkflowSchedule} Eloquent model directly. The
20+
* model snapshot is expected to have fully hydrated `action`,
21+
* `overlap_policy`, `memo`, `search_attributes`, `visibility_labels`,
22+
* and `namespace` fields. This contract is only meaningful to hosts
23+
* that already depend on the workflow PHP package and is not part of
24+
* the stable v2 cross-language API. Standalone and polyglot consumers
25+
* that cannot load Eloquent models should drive schedule starts
26+
* through the control plane HTTP surface instead.
1827
*/
1928
interface ScheduleWorkflowStarter
2029
{

0 commit comments

Comments
 (0)