@cat-factory/contracts 0.75.0 → 0.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities.d.ts +34 -0
- package/dist/entities.d.ts.map +1 -1
- package/dist/entities.js +9 -0
- package/dist/entities.js.map +1 -1
- package/dist/environments.d.ts +8 -0
- package/dist/environments.d.ts.map +1 -1
- package/dist/environments.js +8 -0
- package/dist/environments.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/frontend.d.ts +145 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +130 -0
- package/dist/frontend.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/infra-setup.d.ts +40 -0
- package/dist/infra-setup.d.ts.map +1 -0
- package/dist/infra-setup.js +66 -0
- package/dist/infra-setup.js.map +1 -0
- package/dist/requests.d.ts +191 -2
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +5 -0
- package/dist/requests.js.map +1 -1
- package/dist/routes/auth.d.ts +24 -0
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/auth.js +10 -0
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/board.d.ts +461 -2
- package/dist/routes/board.d.ts.map +1 -1
- package/dist/routes/environments.d.ts +5 -0
- package/dist/routes/environments.d.ts.map +1 -1
- package/dist/routes/execution.d.ts +54 -0
- package/dist/routes/execution.d.ts.map +1 -1
- package/dist/routes/tasks.d.ts +81 -0
- package/dist/routes/tasks.d.ts.map +1 -1
- package/dist/routes/workspaces.d.ts +64 -0
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/snapshot.d.ts +40 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/snapshot.js +10 -0
- package/dist/snapshot.js.map +1 -1
- package/dist/visual-pipeline.d.ts +30 -0
- package/dist/visual-pipeline.d.ts.map +1 -0
- package/dist/visual-pipeline.js +51 -0
- package/dist/visual-pipeline.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Visual-pipeline gating (shared by the SPA surface + the backend run-start gate).
|
|
3
|
+
//
|
|
4
|
+
// A "visual" pipeline exercises a rendered UI — it either drives a real browser
|
|
5
|
+
// against a running frontend (`tester-ui`) or parks for a human to review the
|
|
6
|
+
// captured screenshots vs the task's reference designs (`visual-confirmation`).
|
|
7
|
+
// Such a pipeline only makes sense where there IS a UI to exercise: a `frontend`
|
|
8
|
+
// frame (it owns the app under test), or a frame a `frontend` frame links to (the
|
|
9
|
+
// linked frontend is the UI a change to that service is validated through). The SPA
|
|
10
|
+
// uses these predicates to surface visual pipelines only where they can run; the
|
|
11
|
+
// backend gates a run start on the SAME rule so the guarantee holds server-side.
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
/**
|
|
14
|
+
* The agent kind that drives a real browser against a running frontend and captures a
|
|
15
|
+
* screenshot of each distinct view. The canonical slug also backs orchestration's
|
|
16
|
+
* `UI_TESTER_AGENT_KIND` (re-exported there); this package is the single source of truth.
|
|
17
|
+
*/
|
|
18
|
+
export const UI_TESTER_AGENT_KIND = 'tester-ui';
|
|
19
|
+
/**
|
|
20
|
+
* The agent kind of the human visual-confirmation gate: it parks for a person to review the
|
|
21
|
+
* UI tester's screenshots against the task's uploaded reference designs. The canonical slug
|
|
22
|
+
* also backs orchestration's `VISUAL_CONFIRM_AGENT_KIND` (re-exported there).
|
|
23
|
+
*/
|
|
24
|
+
export const VISUAL_CONFIRM_AGENT_KIND = 'visual-confirmation';
|
|
25
|
+
/** The visual step kinds: a pipeline carrying any of these is a "visual" pipeline. */
|
|
26
|
+
export const VISUAL_STEP_KINDS = [UI_TESTER_AGENT_KIND, VISUAL_CONFIRM_AGENT_KIND];
|
|
27
|
+
/** Whether a pipeline includes any visual step (`tester-ui` / `visual-confirmation`). */
|
|
28
|
+
export function pipelineHasVisualStep(pipeline) {
|
|
29
|
+
return pipeline.agentKinds.some((kind) => kind === UI_TESTER_AGENT_KIND || kind === VISUAL_CONFIRM_AGENT_KIND);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether a visual pipeline may run on a task under `frame`. A visual step needs a UI to
|
|
33
|
+
* exercise, which exists when the enclosing frame is either:
|
|
34
|
+
* - a `frontend` frame (it owns the app under test), or
|
|
35
|
+
* - a non-frontend frame that some `frontend` frame BINDS as a backend service (a
|
|
36
|
+
* frontend→service link in that frontend's `frontendConfig.backendBindings`) — the linked
|
|
37
|
+
* frontend is the UI a change to this service is validated through.
|
|
38
|
+
* Every other frame (a service with no linked frontend, a `library`/`document` repo) has no UI,
|
|
39
|
+
* so a visual pipeline is refused. `blocks` is the workspace's block list, scanned once for the
|
|
40
|
+
* frontend→service links (never a per-frame point read).
|
|
41
|
+
*/
|
|
42
|
+
export function frameAllowsVisualPipeline(frame, blocks) {
|
|
43
|
+
if (!frame)
|
|
44
|
+
return false;
|
|
45
|
+
if (frame.type === 'frontend')
|
|
46
|
+
return true;
|
|
47
|
+
return blocks.some((b) => b.level === 'frame' &&
|
|
48
|
+
b.type === 'frontend' &&
|
|
49
|
+
(b.frontendConfig?.backendBindings ?? []).some((bind) => bind.source.kind === 'service' && bind.source.serviceBlockId === frame.id));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=visual-pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-pipeline.js","sourceRoot":"","sources":["../src/visual-pipeline.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,mFAAmF;AACnF,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,iFAAiF;AACjF,kFAAkF;AAClF,oFAAoF;AACpF,iFAAiF;AACjF,iFAAiF;AACj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