@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.
Files changed (51) hide show
  1. package/dist/entities.d.ts +34 -0
  2. package/dist/entities.d.ts.map +1 -1
  3. package/dist/entities.js +9 -0
  4. package/dist/entities.js.map +1 -1
  5. package/dist/environments.d.ts +8 -0
  6. package/dist/environments.d.ts.map +1 -1
  7. package/dist/environments.js +8 -0
  8. package/dist/environments.js.map +1 -1
  9. package/dist/errors.d.ts +1 -1
  10. package/dist/errors.d.ts.map +1 -1
  11. package/dist/errors.js +8 -0
  12. package/dist/errors.js.map +1 -1
  13. package/dist/frontend.d.ts +145 -0
  14. package/dist/frontend.d.ts.map +1 -0
  15. package/dist/frontend.js +130 -0
  16. package/dist/frontend.js.map +1 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/infra-setup.d.ts +40 -0
  22. package/dist/infra-setup.d.ts.map +1 -0
  23. package/dist/infra-setup.js +66 -0
  24. package/dist/infra-setup.js.map +1 -0
  25. package/dist/requests.d.ts +191 -2
  26. package/dist/requests.d.ts.map +1 -1
  27. package/dist/requests.js +5 -0
  28. package/dist/requests.js.map +1 -1
  29. package/dist/routes/auth.d.ts +24 -0
  30. package/dist/routes/auth.d.ts.map +1 -1
  31. package/dist/routes/auth.js +10 -0
  32. package/dist/routes/auth.js.map +1 -1
  33. package/dist/routes/board.d.ts +461 -2
  34. package/dist/routes/board.d.ts.map +1 -1
  35. package/dist/routes/environments.d.ts +5 -0
  36. package/dist/routes/environments.d.ts.map +1 -1
  37. package/dist/routes/execution.d.ts +54 -0
  38. package/dist/routes/execution.d.ts.map +1 -1
  39. package/dist/routes/tasks.d.ts +81 -0
  40. package/dist/routes/tasks.d.ts.map +1 -1
  41. package/dist/routes/workspaces.d.ts +64 -0
  42. package/dist/routes/workspaces.d.ts.map +1 -1
  43. package/dist/snapshot.d.ts +40 -0
  44. package/dist/snapshot.d.ts.map +1 -1
  45. package/dist/snapshot.js +10 -0
  46. package/dist/snapshot.js.map +1 -1
  47. package/dist/visual-pipeline.d.ts +30 -0
  48. package/dist/visual-pipeline.d.ts.map +1 -0
  49. package/dist/visual-pipeline.js +51 -0
  50. package/dist/visual-pipeline.js.map +1 -0
  51. package/package.json +1 -1
@@ -0,0 +1,145 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * Default WireMock `--root-dir` in the FE repo when a `frontend` frame declares no
4
+ * {@link frontendConfigSchema.mockMappingsPath}. The single source of truth shared by the
5
+ * frontend-aware mocker prompt (`@cat-factory/agents`) and the harness `frontend` infra spec —
6
+ * WireMock reads stubs from `<dir>/mappings/*.json` + `<dir>/__files/` under it. (The harness
7
+ * package keeps its own literal copy because bumping it is an image-tag change; keep the two in
8
+ * lock-step.)
9
+ */
10
+ export declare const DEFAULT_FRONTEND_MOCK_MAPPINGS_PATH = "mocks/";
11
+ /** The package manager the frontend build uses. Defaults to `pnpm`. */
12
+ export declare const frontendPackageManagerSchema: v.PicklistSchema<["pnpm", "npm", "yarn"], undefined>;
13
+ export type FrontendPackageManager = v.InferOutput<typeof frontendPackageManagerSchema>;
14
+ /**
15
+ * How the built app is served in the UI-test container:
16
+ * - `static` — serve the built `outputDir` with a static file server (default).
17
+ * - `command` — run a package.json script (`serveScript`, e.g. `preview`).
18
+ */
19
+ export declare const frontendServeModeSchema: v.PicklistSchema<["static", "command"], undefined>;
20
+ export type FrontendServeMode = v.InferOutput<typeof frontendServeModeSchema>;
21
+ /**
22
+ * When the resolved backend URLs are injected into the frontend:
23
+ * - `build` — as build-time env vars (default; a `VITE_*`/`PUB_*` build).
24
+ * - `runtime` — written into a `window.env` shim served alongside the app.
25
+ */
26
+ export declare const frontendEnvInjectionSchema: v.PicklistSchema<["build", "runtime"], undefined>;
27
+ export type FrontendEnvInjection = v.InferOutput<typeof frontendEnvInjectionSchema>;
28
+ /**
29
+ * Where one of the frontend's backend env vars resolves at test/preview time:
30
+ * - `service` — that service frame's live ephemeral-environment URL (the
31
+ * "service under test"). `serviceBlockId` is the bound service frame's block id.
32
+ * - `mock` — WireMock on localhost (every upstream that is NOT the service
33
+ * under test resolves here).
34
+ */
35
+ export declare const frontendBackendSourceSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
36
+ readonly kind: v.LiteralSchema<"service", undefined>;
37
+ readonly serviceBlockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
38
+ }, undefined>, v.ObjectSchema<{
39
+ readonly kind: v.LiteralSchema<"mock", undefined>;
40
+ }, undefined>], undefined>;
41
+ export type FrontendBackendSource = v.InferOutput<typeof frontendBackendSourceSchema>;
42
+ /**
43
+ * One backend binding: the env var the frontend reads for an upstream URL, and
44
+ * where that URL comes from. This is BOTH the user-declared config (env-var name
45
+ * + which upstream) AND the board link (a `service` source draws a frontend→service
46
+ * edge). The "service under test" is the bound `service` source whose ephemeral env
47
+ * is live; every other binding resolves to WireMock.
48
+ */
49
+ export declare const frontendBackendBindingSchema: v.ObjectSchema<{
50
+ /**
51
+ * The frontend's env var name for this upstream URL (e.g. `PUB_BACKEND_URL`). May be
52
+ * empty as a transient editing state (a freshly-added inspector row before the user
53
+ * types a name); the infra/job-body builder filters empty-envVar bindings out, so an
54
+ * empty one is inert rather than injected.
55
+ */
56
+ readonly envVar: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 200, undefined>]>;
57
+ readonly source: v.VariantSchema<"kind", [v.ObjectSchema<{
58
+ readonly kind: v.LiteralSchema<"service", undefined>;
59
+ readonly serviceBlockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
60
+ }, undefined>, v.ObjectSchema<{
61
+ readonly kind: v.LiteralSchema<"mock", undefined>;
62
+ }, undefined>], undefined>;
63
+ }, undefined>;
64
+ export type FrontendBackendBinding = v.InferOutput<typeof frontendBackendBindingSchema>;
65
+ /**
66
+ * Which branch the frontend is built from for a UI test / preview:
67
+ * - `'default'` — the frontend repo's default branch (the baseline).
68
+ * - `{ fromTaskBlockId }` — the PR branch of a linked frontend task block, so a
69
+ * UI test runs against that task's unmerged work.
70
+ * Absent ⇒ `'default'`.
71
+ */
72
+ export declare const frontendBranchSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
73
+ readonly kind: v.LiteralSchema<"default", undefined>;
74
+ }, undefined>, v.ObjectSchema<{
75
+ readonly kind: v.LiteralSchema<"task", undefined>;
76
+ readonly fromTaskBlockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
77
+ }, undefined>], undefined>;
78
+ export type FrontendBranch = v.InferOutput<typeof frontendBranchSchema>;
79
+ /**
80
+ * Service-level (frame-only, `type: 'frontend'`): how to build, serve, and mock
81
+ * this frontend for a self-contained UI test (and, on local/node, an optional
82
+ * browsable preview). Stored serialized on the block. All fields optional except
83
+ * {@link backendBindings}; the harness / job-body builder supplies the defaults
84
+ * (packageManager `pnpm`, buildScript `build`, outputDir `dist`, serveMode
85
+ * `static`, servePort 4173, envInjection `build`, mockMappingsPath `mocks/`).
86
+ */
87
+ export declare const frontendConfigSchema: v.ObjectSchema<{
88
+ /** Package manager for install/build. Default `pnpm`. */
89
+ readonly packageManager: v.OptionalSchema<v.PicklistSchema<["pnpm", "npm", "yarn"], undefined>, undefined>;
90
+ /** Explicit install command, overriding the one derived from `packageManager`. */
91
+ readonly installCommand: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
92
+ /** package.json script name that produces the built app. Default `build`. */
93
+ readonly buildScript: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
94
+ /** The build's output directory, served in `static` mode. Default `dist`. */
95
+ readonly outputDir: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
96
+ /** How the built app is served. Default `static`. */
97
+ readonly serveMode: v.OptionalSchema<v.PicklistSchema<["static", "command"], undefined>, undefined>;
98
+ /** package.json script to run when `serveMode: 'command'` (e.g. `preview`). */
99
+ readonly serveScript: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
100
+ /**
101
+ * The port the served app listens on inside the container. Default 4173 (deliberately NOT
102
+ * 8080: the harness's own job HTTP server owns 8080 in the same container). Avoid 8080.
103
+ */
104
+ readonly servePort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
105
+ /** Build-time env vars vs a runtime `window.env` shim. Default `build`. */
106
+ readonly envInjection: v.OptionalSchema<v.PicklistSchema<["build", "runtime"], undefined>, undefined>;
107
+ /** Which branch to build for a UI test / preview. Absent ⇒ the FE default branch. */
108
+ readonly branch: v.OptionalSchema<v.VariantSchema<"kind", [v.ObjectSchema<{
109
+ readonly kind: v.LiteralSchema<"default", undefined>;
110
+ }, undefined>, v.ObjectSchema<{
111
+ readonly kind: v.LiteralSchema<"task", undefined>;
112
+ readonly fromTaskBlockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
113
+ }, undefined>], undefined>, undefined>;
114
+ /**
115
+ * WireMock's `--root-dir` in the FE repo. Default `mocks/`. NOTE: WireMock loads stubs from a
116
+ * `mappings/` subdirectory (and response bodies from `__files/`) UNDER this dir — so with the
117
+ * default, put stub JSON in `mocks/mappings/`, not directly in `mocks/`. A dir with no
118
+ * `mappings/` inside starts an empty WireMock that 404s every mocked call.
119
+ */
120
+ readonly mockMappingsPath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
121
+ /** Browsable preview (local/node only). Default false. */
122
+ readonly previewEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
123
+ /**
124
+ * The frontend's backend upstreams: env-var name → where the URL resolves. Both
125
+ * the config and the board link. Required (may be empty for a frontend with no
126
+ * backend upstreams, but the field is always present).
127
+ */
128
+ readonly backendBindings: v.ArraySchema<v.ObjectSchema<{
129
+ /**
130
+ * The frontend's env var name for this upstream URL (e.g. `PUB_BACKEND_URL`). May be
131
+ * empty as a transient editing state (a freshly-added inspector row before the user
132
+ * types a name); the infra/job-body builder filters empty-envVar bindings out, so an
133
+ * empty one is inert rather than injected.
134
+ */
135
+ readonly envVar: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 200, undefined>]>;
136
+ readonly source: v.VariantSchema<"kind", [v.ObjectSchema<{
137
+ readonly kind: v.LiteralSchema<"service", undefined>;
138
+ readonly serviceBlockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
139
+ }, undefined>, v.ObjectSchema<{
140
+ readonly kind: v.LiteralSchema<"mock", undefined>;
141
+ }, undefined>], undefined>;
142
+ }, undefined>, undefined>;
143
+ }, undefined>;
144
+ export type FrontendConfig = v.InferOutput<typeof frontendConfigSchema>;
145
+ //# sourceMappingURL=frontend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,WAAW,CAAA;AAE3D,uEAAuE;AACvE,eAAO,MAAM,4BAA4B,sDAAsC,CAAA;AAC/E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,oDAAoC,CAAA;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,mDAAmC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;0BAQtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;IACvC;;;;;OAKG;;;;;;;;aAGH,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;0BAM/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;IAC/B,yDAAyD;;IAEzD,kFAAkF;;IAElF,6EAA6E;;IAE7E,6EAA6E;;IAE7E,qDAAqD;;IAErD,+EAA+E;;IAE/E;;;OAGG;;IAEH,2EAA2E;;IAE3E,qFAAqF;;;;;;;IAErF;;;;;OAKG;;IAEH,0DAA0D;;IAE1D;;;;OAIG;;QAtEH;;;;;WAKG;;;;;;;;;aAmEH,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,130 @@
1
+ import * as v from 'valibot';
2
+ // ---------------------------------------------------------------------------
3
+ // Frontend board block config.
4
+ //
5
+ // A `frontend`-type frame carries a serialized `FrontendConfig` (stored on the
6
+ // block, mirroring how `provisioning` is stored on a service frame). It declares
7
+ // HOW to build and serve the app for a self-contained UI test — the package
8
+ // manager, build script, serve mode, and the WireMock mappings dir — plus the
9
+ // backend bindings that ARE both the config and the board link: each binding
10
+ // names an env var and where it resolves (a bound service's ephemeral env URL, or
11
+ // WireMock). Every field is optional except `backendBindings`; the harness /
12
+ // job-body builder fills the defaults (pnpm, `build`, `dist`, static serve, …).
13
+ // ---------------------------------------------------------------------------
14
+ /**
15
+ * Default WireMock `--root-dir` in the FE repo when a `frontend` frame declares no
16
+ * {@link frontendConfigSchema.mockMappingsPath}. The single source of truth shared by the
17
+ * frontend-aware mocker prompt (`@cat-factory/agents`) and the harness `frontend` infra spec —
18
+ * WireMock reads stubs from `<dir>/mappings/*.json` + `<dir>/__files/` under it. (The harness
19
+ * package keeps its own literal copy because bumping it is an image-tag change; keep the two in
20
+ * lock-step.)
21
+ */
22
+ export const DEFAULT_FRONTEND_MOCK_MAPPINGS_PATH = 'mocks/';
23
+ /** The package manager the frontend build uses. Defaults to `pnpm`. */
24
+ export const frontendPackageManagerSchema = v.picklist(['pnpm', 'npm', 'yarn']);
25
+ /**
26
+ * How the built app is served in the UI-test container:
27
+ * - `static` — serve the built `outputDir` with a static file server (default).
28
+ * - `command` — run a package.json script (`serveScript`, e.g. `preview`).
29
+ */
30
+ export const frontendServeModeSchema = v.picklist(['static', 'command']);
31
+ /**
32
+ * When the resolved backend URLs are injected into the frontend:
33
+ * - `build` — as build-time env vars (default; a `VITE_*`/`PUB_*` build).
34
+ * - `runtime` — written into a `window.env` shim served alongside the app.
35
+ */
36
+ export const frontendEnvInjectionSchema = v.picklist(['build', 'runtime']);
37
+ /**
38
+ * Where one of the frontend's backend env vars resolves at test/preview time:
39
+ * - `service` — that service frame's live ephemeral-environment URL (the
40
+ * "service under test"). `serviceBlockId` is the bound service frame's block id.
41
+ * - `mock` — WireMock on localhost (every upstream that is NOT the service
42
+ * under test resolves here).
43
+ */
44
+ export const frontendBackendSourceSchema = v.variant('kind', [
45
+ v.object({
46
+ kind: v.literal('service'),
47
+ serviceBlockId: v.pipe(v.string(), v.minLength(1)),
48
+ }),
49
+ v.object({
50
+ kind: v.literal('mock'),
51
+ }),
52
+ ]);
53
+ /**
54
+ * One backend binding: the env var the frontend reads for an upstream URL, and
55
+ * where that URL comes from. This is BOTH the user-declared config (env-var name
56
+ * + which upstream) AND the board link (a `service` source draws a frontend→service
57
+ * edge). The "service under test" is the bound `service` source whose ephemeral env
58
+ * is live; every other binding resolves to WireMock.
59
+ */
60
+ export const frontendBackendBindingSchema = v.object({
61
+ /**
62
+ * The frontend's env var name for this upstream URL (e.g. `PUB_BACKEND_URL`). May be
63
+ * empty as a transient editing state (a freshly-added inspector row before the user
64
+ * types a name); the infra/job-body builder filters empty-envVar bindings out, so an
65
+ * empty one is inert rather than injected.
66
+ */
67
+ envVar: v.pipe(v.string(), v.trim(), v.maxLength(200)),
68
+ source: frontendBackendSourceSchema,
69
+ });
70
+ /**
71
+ * Which branch the frontend is built from for a UI test / preview:
72
+ * - `'default'` — the frontend repo's default branch (the baseline).
73
+ * - `{ fromTaskBlockId }` — the PR branch of a linked frontend task block, so a
74
+ * UI test runs against that task's unmerged work.
75
+ * Absent ⇒ `'default'`.
76
+ */
77
+ export const frontendBranchSchema = v.variant('kind', [
78
+ v.object({ kind: v.literal('default') }),
79
+ v.object({
80
+ kind: v.literal('task'),
81
+ fromTaskBlockId: v.pipe(v.string(), v.minLength(1)),
82
+ }),
83
+ ]);
84
+ /**
85
+ * Service-level (frame-only, `type: 'frontend'`): how to build, serve, and mock
86
+ * this frontend for a self-contained UI test (and, on local/node, an optional
87
+ * browsable preview). Stored serialized on the block. All fields optional except
88
+ * {@link backendBindings}; the harness / job-body builder supplies the defaults
89
+ * (packageManager `pnpm`, buildScript `build`, outputDir `dist`, serveMode
90
+ * `static`, servePort 4173, envInjection `build`, mockMappingsPath `mocks/`).
91
+ */
92
+ export const frontendConfigSchema = v.object({
93
+ /** Package manager for install/build. Default `pnpm`. */
94
+ packageManager: v.optional(frontendPackageManagerSchema),
95
+ /** Explicit install command, overriding the one derived from `packageManager`. */
96
+ installCommand: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(400))),
97
+ /** package.json script name that produces the built app. Default `build`. */
98
+ buildScript: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(200))),
99
+ /** The build's output directory, served in `static` mode. Default `dist`. */
100
+ outputDir: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(400))),
101
+ /** How the built app is served. Default `static`. */
102
+ serveMode: v.optional(frontendServeModeSchema),
103
+ /** package.json script to run when `serveMode: 'command'` (e.g. `preview`). */
104
+ serveScript: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(200))),
105
+ /**
106
+ * The port the served app listens on inside the container. Default 4173 (deliberately NOT
107
+ * 8080: the harness's own job HTTP server owns 8080 in the same container). Avoid 8080.
108
+ */
109
+ servePort: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(65535))),
110
+ /** Build-time env vars vs a runtime `window.env` shim. Default `build`. */
111
+ envInjection: v.optional(frontendEnvInjectionSchema),
112
+ /** Which branch to build for a UI test / preview. Absent ⇒ the FE default branch. */
113
+ branch: v.optional(frontendBranchSchema),
114
+ /**
115
+ * WireMock's `--root-dir` in the FE repo. Default `mocks/`. NOTE: WireMock loads stubs from a
116
+ * `mappings/` subdirectory (and response bodies from `__files/`) UNDER this dir — so with the
117
+ * default, put stub JSON in `mocks/mappings/`, not directly in `mocks/`. A dir with no
118
+ * `mappings/` inside starts an empty WireMock that 404s every mocked call.
119
+ */
120
+ mockMappingsPath: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(400))),
121
+ /** Browsable preview (local/node only). Default false. */
122
+ previewEnabled: v.optional(v.boolean()),
123
+ /**
124
+ * The frontend's backend upstreams: env-var name → where the URL resolves. Both
125
+ * the config and the board link. Required (may be empty for a frontend with no
126
+ * backend upstreams, but the field is always present).
127
+ */
128
+ backendBindings: v.array(frontendBackendBindingSchema),
129
+ });
130
+ //# sourceMappingURL=frontend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.js","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,+BAA+B;AAC/B,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,kFAAkF;AAClF,6EAA6E;AAC7E,gFAAgF;AAChF,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,QAAQ,CAAA;AAE3D,uEAAuE;AACvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AAG/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;AAGxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG1E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;IAC3D,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC1B,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KACnD,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;KACxB,CAA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package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from './primitives.js';
2
2
  export * from './errors.js';
3
3
  export * from './entities.js';
4
+ export * from './frontend.js';
5
+ export * from './visual-pipeline.js';
4
6
  export * from './services.js';
5
7
  export * from './fragment-library.js';
6
8
  export * from './accounts.js';
@@ -16,6 +18,7 @@ export * from './environments.js';
16
18
  export * from './runners.js';
17
19
  export * from './bootstrap.js';
18
20
  export * from './env-config-repair.js';
21
+ export * from './infra-setup.js';
19
22
  export * from './snapshot.js';
20
23
  export * from './board-scan.js';
21
24
  export * from './iteration-cap.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;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
2
  export * from './errors.js';
3
3
  export * from './entities.js';
4
+ export * from './frontend.js';
5
+ export * from './visual-pipeline.js';
4
6
  export * from './services.js';
5
7
  export * from './fragment-library.js';
6
8
  export * from './accounts.js';
@@ -16,6 +18,7 @@ export * from './environments.js';
16
18
  export * from './runners.js';
17
19
  export * from './bootstrap.js';
18
20
  export * from './env-config-repair.js';
21
+ export * from './infra-setup.js';
19
22
  export * from './snapshot.js';
20
23
  export * from './board-scan.js';
21
24
  export * from './iteration-cap.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAg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c,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,40 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * The configuration state of one infrastructure area for a workspace:
4
+ * - `not_defined` — the deployment can use it, but the operator hasn't set it up
5
+ * (the banner-worthy state).
6
+ * - `configured` — a connection / backend is defined.
7
+ * - `not_applicable` — this runtime doesn't need it (the integration isn't wired),
8
+ * so there is nothing to nag about.
9
+ */
10
+ export declare const infraSetupStatusSchema: v.PicklistSchema<["not_defined", "configured", "not_applicable"], undefined>;
11
+ export type InfraSetupStatus = v.InferOutput<typeof infraSetupStatusSchema>;
12
+ /** The per-area infrastructure-setup status projection carried on the snapshot. */
13
+ export declare const infraSetupSchema: v.ObjectSchema<{
14
+ /** Ephemeral test environments (deployer / provisioning). Relevant on every runtime. */
15
+ readonly ephemeralEnvironments: v.PicklistSchema<["not_defined", "configured", "not_applicable"], undefined>;
16
+ /** The container agent executor (self-hosted runner pool). Relevant only on remote Node. */
17
+ readonly agentExecutor: v.PicklistSchema<["not_defined", "configured", "not_applicable"], undefined>;
18
+ /**
19
+ * Binary/object storage for UI screenshots + reference images. Every facade wires an
20
+ * artifact-store resolver, so this is `configured`/`not_defined` on every runtime — not just
21
+ * remote Node: a Cloudflare deployment WITHOUT an `ARTIFACT_BUCKET` binding (or any account
22
+ * that selected no backend) reads `not_defined` too.
23
+ */
24
+ readonly binaryStorage: v.PicklistSchema<["not_defined", "configured", "not_applicable"], undefined>;
25
+ }, undefined>;
26
+ export type InfraSetup = v.InferOutput<typeof infraSetupSchema>;
27
+ /** The infrastructure areas the setup banner surfaces (leaf names mirror {@link infraSetupSchema}). */
28
+ export declare const infraSetupAreaSchema: v.PicklistSchema<["ephemeralEnvironments", "agentExecutor", "binaryStorage"], undefined>;
29
+ export type InfraSetupArea = v.InferOutput<typeof infraSetupAreaSchema>;
30
+ /** Every infra-setup area, as a plain readonly tuple (the source of truth for iteration). */
31
+ export declare const INFRA_SETUP_AREAS: ["ephemeralEnvironments", "agentExecutor", "binaryStorage"];
32
+ /**
33
+ * The `localStorage` key under which the SPA's `InfraSetupBanner` persists its PERMANENT,
34
+ * per-user "don't notify me again" dismissals ({@link InfraSetupArea}[] keyed by user id).
35
+ * Lives in this dependency-free contracts package — rather than only inside the Vue component —
36
+ * so the SPA and the e2e suite (which seeds the same key to suppress the banner) share ONE
37
+ * source of truth and can't drift.
38
+ */
39
+ export declare const INFRA_SETUP_DISMISSED_STORAGE_KEY = "cat-factory:infra-setup-dismissed";
40
+ //# sourceMappingURL=infra-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infra-setup.d.ts","sourceRoot":"","sources":["../src/infra-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA4B5B;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,8EAA8D,CAAA;AACjG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E,mFAAmF;AACnF,eAAO,MAAM,gBAAgB;IAC3B,wFAAwF;;IAExF,4FAA4F;;IAE5F;;;;;OAKG;;aAEH,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D,uGAAuG;AACvG,eAAO,MAAM,oBAAoB,0FAI/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,6DAA+B,CAAA;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,sCAAsC,CAAA"}
@@ -0,0 +1,66 @@
1
+ import * as v from 'valibot';
2
+ // ---------------------------------------------------------------------------
3
+ // Infrastructure-setup tracking. A small per-workspace status projection carried
4
+ // on the workspace snapshot so the SPA can nag (a loud banner) when a workspace
5
+ // runs on a deployment that REQUIRES a piece of infrastructure to be configured
6
+ // but the operator hasn't defined it yet. Deliberately an explicit tri-state per
7
+ // area (rather than an inferred boolean/absence) so "the operator never made a
8
+ // decision" (`not_defined`) is tracked distinctly from "this runtime doesn't need
9
+ // it" (`not_applicable`) and "it's set up" (`configured`).
10
+ //
11
+ // Computed server-side (WorkspaceController) from whatever each facade actually
12
+ // wired, so it is runtime-symmetric by construction and needs no persistence:
13
+ // - ephemeral environments — the environment provider connection (all runtimes
14
+ // that wire the environments integration). Unset ⇒ testing agents can't run.
15
+ // - agent executor — the self-hosted runner-pool connection. Only the remote
16
+ // Node facade delegates container agents to a pool (Cloudflare has built-in
17
+ // per-run containers, local runs them on the host), so this is `not_applicable`
18
+ // everywhere except an unconfigured Node deployment. Unset ⇒ NO agents can run.
19
+ // - binary storage — the per-account content-storage backend. Every facade wires an
20
+ // artifact-store resolver, so this is effectively `configured`/`not_defined`, not
21
+ // `not_applicable`: local defaults to a filesystem store and Cloudflare with an
22
+ // `ARTIFACT_BUCKET` binding defaults to R2 (both ⇒ `configured`), while the Node
23
+ // facade defaults to `off` AND a Cloudflare deployment WITHOUT that binding also
24
+ // resolves nothing (both ⇒ `not_defined`). Unset ⇒ screenshot / reference-image
25
+ // storage (the UI-tester + visual-confirmation gate) is off.
26
+ // ---------------------------------------------------------------------------
27
+ /**
28
+ * The configuration state of one infrastructure area for a workspace:
29
+ * - `not_defined` — the deployment can use it, but the operator hasn't set it up
30
+ * (the banner-worthy state).
31
+ * - `configured` — a connection / backend is defined.
32
+ * - `not_applicable` — this runtime doesn't need it (the integration isn't wired),
33
+ * so there is nothing to nag about.
34
+ */
35
+ export const infraSetupStatusSchema = v.picklist(['not_defined', 'configured', 'not_applicable']);
36
+ /** The per-area infrastructure-setup status projection carried on the snapshot. */
37
+ export const infraSetupSchema = v.object({
38
+ /** Ephemeral test environments (deployer / provisioning). Relevant on every runtime. */
39
+ ephemeralEnvironments: infraSetupStatusSchema,
40
+ /** The container agent executor (self-hosted runner pool). Relevant only on remote Node. */
41
+ agentExecutor: infraSetupStatusSchema,
42
+ /**
43
+ * Binary/object storage for UI screenshots + reference images. Every facade wires an
44
+ * artifact-store resolver, so this is `configured`/`not_defined` on every runtime — not just
45
+ * remote Node: a Cloudflare deployment WITHOUT an `ARTIFACT_BUCKET` binding (or any account
46
+ * that selected no backend) reads `not_defined` too.
47
+ */
48
+ binaryStorage: infraSetupStatusSchema,
49
+ });
50
+ /** The infrastructure areas the setup banner surfaces (leaf names mirror {@link infraSetupSchema}). */
51
+ export const infraSetupAreaSchema = v.picklist([
52
+ 'ephemeralEnvironments',
53
+ 'agentExecutor',
54
+ 'binaryStorage',
55
+ ]);
56
+ /** Every infra-setup area, as a plain readonly tuple (the source of truth for iteration). */
57
+ export const INFRA_SETUP_AREAS = infraSetupAreaSchema.options;
58
+ /**
59
+ * The `localStorage` key under which the SPA's `InfraSetupBanner` persists its PERMANENT,
60
+ * per-user "don't notify me again" dismissals ({@link InfraSetupArea}[] keyed by user id).
61
+ * Lives in this dependency-free contracts package — rather than only inside the Vue component —
62
+ * so the SPA and the e2e suite (which seeds the same key to suppress the banner) share ONE
63
+ * source of truth and can't drift.
64
+ */
65
+ export const INFRA_SETUP_DISMISSED_STORAGE_KEY = 'cat-factory:infra-setup-dismissed';
66
+ //# sourceMappingURL=infra-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infra-setup.js","sourceRoot":"","sources":["../src/infra-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,kFAAkF;AAClF,2DAA2D;AAC3D,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,oFAAoF;AACpF,oFAAoF;AACpF,sFAAsF;AACtF,sFAAsF;AACtF,oFAAoF;AACpF,qFAAqF;AACrF,qFAAqF;AACrF,oFAAoF;AACpF,iEAAiE;AACjE,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAA;AAGjG,mFAAmF;AACnF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,wFAAwF;IACxF,qBAAqB,EAAE,sBAAsB;IAC7C,4FAA4F;IAC5F,aAAa,EAAE,sBAAsB;IACrC;;;;;OAKG;IACH,aAAa,EAAE,sBAAsB;CACtC,CAAC,CAAA;AAGF,uGAAuG;AACvG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC7C,uBAAuB;IACvB,eAAe;IACf,eAAe;CAChB,CAAC,CAAA;AAGF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,OAAO,CAAA;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,mCAAmC,CAAA"}