@cat-factory/kernel 0.272.0 → 0.274.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/domain/binary-store-registry.d.ts +98 -0
- package/dist/domain/binary-store-registry.d.ts.map +1 -0
- package/dist/domain/binary-store-registry.js +79 -0
- package/dist/domain/binary-store-registry.js.map +1 -0
- package/dist/domain/gate-registry.d.ts +53 -21
- package/dist/domain/gate-registry.d.ts.map +1 -1
- package/dist/domain/gate-registry.js +24 -5
- package/dist/domain/gate-registry.js.map +1 -1
- package/dist/domain/notification-audience.d.ts +27 -0
- package/dist/domain/notification-audience.d.ts.map +1 -0
- package/dist/domain/notification-audience.js +40 -0
- package/dist/domain/notification-audience.js.map +1 -0
- package/dist/domain/types.d.ts +1 -1
- package/dist/domain/types.d.ts.map +1 -1
- package/dist/domain/vcs-errors.d.ts +25 -0
- package/dist/domain/vcs-errors.d.ts.map +1 -1
- package/dist/domain/vcs-errors.js +41 -0
- package/dist/domain/vcs-errors.js.map +1 -1
- package/dist/domain/workspace-cascade.d.ts +1 -1
- package/dist/domain/workspace-cascade.d.ts.map +1 -1
- package/dist/domain/workspace-cascade.js +1 -0
- package/dist/domain/workspace-cascade.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/ports/binary-artifacts.d.ts +33 -2
- package/dist/ports/binary-artifacts.d.ts.map +1 -1
- package/dist/ports/binary-artifacts.js +27 -0
- package/dist/ports/binary-artifacts.js.map +1 -1
- package/dist/ports/index.d.ts +4 -3
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/index.js +2 -2
- package/dist/ports/index.js.map +1 -1
- package/dist/ports/notification-channel.d.ts +98 -4
- package/dist/ports/notification-channel.d.ts.map +1 -1
- package/dist/ports/notification-channel.js +129 -2
- package/dist/ports/notification-channel.js.map +1 -1
- package/dist/ports/notification-settings-repositories.d.ts +16 -0
- package/dist/ports/notification-settings-repositories.d.ts.map +1 -0
- package/dist/ports/notification-settings-repositories.js +2 -0
- package/dist/ports/notification-settings-repositories.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { BinaryBlobBackend } from '../ports/binary-artifacts.js';
|
|
2
|
+
import type { Logger } from '../ports/logging.js';
|
|
3
|
+
/** What the resolver tells a store about the account it is being built for. */
|
|
4
|
+
export interface BinaryStoreContext {
|
|
5
|
+
/**
|
|
6
|
+
* The account whose artifacts this store will hold, or null for a legacy unscoped board.
|
|
7
|
+
*
|
|
8
|
+
* Supplied so a multi-tenant deployment can shard by account (a bucket or key prefix per
|
|
9
|
+
* account) without a per-account settings surface. A store that ignores it holds every
|
|
10
|
+
* account's bytes together, which is the right shape for a single-tenant deployment and is why
|
|
11
|
+
* this is context rather than a required parameter.
|
|
12
|
+
*/
|
|
13
|
+
accountId: string | null;
|
|
14
|
+
/** The composition root's logger, for a store that wants to report its own diagnostics. */
|
|
15
|
+
logger?: Logger;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A binary artifact store a DEPLOYMENT defines in code: identity for the account-settings picker,
|
|
19
|
+
* plus the factory that builds the {@link BinaryBlobBackend} the composed store writes through.
|
|
20
|
+
*/
|
|
21
|
+
export interface BinaryStoreDefinition {
|
|
22
|
+
/**
|
|
23
|
+
* Stable id. It is what an account's content-storage config names, and what is stamped onto
|
|
24
|
+
* each artifact row's `storage` column, so it must be stable across releases: changing it
|
|
25
|
+
* orphans the rows already pointing at it (the bytes stay where they are, but nothing left
|
|
26
|
+
* says which store to ask for them).
|
|
27
|
+
*
|
|
28
|
+
* Lowercase letters, digits and dashes, and never one of the platform's own kinds — see
|
|
29
|
+
* {@link BinaryStoreRegistrationError}.
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
/** Human-readable name, shown in the account-settings storage picker. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** One line of what it is and where the bytes go, shown beside the name. */
|
|
35
|
+
summary?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Build the backend for one account. Called on a cache miss (the resolver memoises the composed
|
|
38
|
+
* store per account), so a client built here survives across requests.
|
|
39
|
+
*
|
|
40
|
+
* Return `null` for "this deployment cannot serve the store right now" (an unset credential, an
|
|
41
|
+
* un-provisioned bucket): the resolver treats it exactly as it treats an unsupported built-in
|
|
42
|
+
* backend, so storage reads as unavailable rather than half-working, and says so in the log.
|
|
43
|
+
* Throwing is for a programming error, and propagates.
|
|
44
|
+
*
|
|
45
|
+
* The returned backend's own `kind` is not used: the resolver stamps {@link id} onto the
|
|
46
|
+
* artifact rows, because one implementation registered twice (a bucket per region, say) would
|
|
47
|
+
* otherwise file both registrations' rows under one name.
|
|
48
|
+
*/
|
|
49
|
+
create(context: BinaryStoreContext): BinaryBlobBackend | null;
|
|
50
|
+
}
|
|
51
|
+
/** What the picker and the boot report show about a registered store — never the backend itself. */
|
|
52
|
+
export interface BinaryStoreView {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
summary?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A registration this platform refuses. Thrown at REGISTRATION rather than collected as a
|
|
59
|
+
* warning, because a store is composition code: the deployment is holding the registry when it
|
|
60
|
+
* happens, and the alternative (a store registered under an id the resolver can never select) is
|
|
61
|
+
* an account settings picker offering an entry that silently resolves to no storage at all.
|
|
62
|
+
*/
|
|
63
|
+
export declare class BinaryStoreRegistrationError extends Error {
|
|
64
|
+
constructor(message: string);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* App-owned registry of the deployment's own binary artifact stores. The composition root news
|
|
68
|
+
* ONE instance and a deployment registers its stores on it by reference; the per-account resolver
|
|
69
|
+
* builds a backend from it whenever an account has selected one.
|
|
70
|
+
*/
|
|
71
|
+
export declare class BinaryStoreRegistry {
|
|
72
|
+
private readonly definitions;
|
|
73
|
+
/**
|
|
74
|
+
* Register a store. A registration whose id matches an earlier one replaces it (the same
|
|
75
|
+
* last-wins rule every other app-owned registry uses, so a deployment can override a store its
|
|
76
|
+
* own shared composition module registered).
|
|
77
|
+
*
|
|
78
|
+
* Refuses an id the resolver could not honour: a malformed one, or one of the platform's own
|
|
79
|
+
* backend kinds. The second is the load-bearing check — `s3` and `fs` are selected through
|
|
80
|
+
* their own config (a bucket, a base path, sealed credentials), so a store registered under
|
|
81
|
+
* one of those names would be picked in the UI and never built, with the account looking
|
|
82
|
+
* correctly configured throughout.
|
|
83
|
+
*/
|
|
84
|
+
register(definition: BinaryStoreDefinition): void;
|
|
85
|
+
/** Register several stores at once. */
|
|
86
|
+
registerAll(definitions: Iterable<BinaryStoreDefinition>): void;
|
|
87
|
+
/** The registered definition for an id, or undefined when this build registers none. */
|
|
88
|
+
get(id: string): BinaryStoreDefinition | undefined;
|
|
89
|
+
/** Every registered id, in registration order. */
|
|
90
|
+
ids(): string[];
|
|
91
|
+
/** How many stores are registered — the "does this deployment offer any" check. */
|
|
92
|
+
get size(): number;
|
|
93
|
+
/** The picker-facing projection: identity only, never the factory. */
|
|
94
|
+
views(): BinaryStoreView[];
|
|
95
|
+
}
|
|
96
|
+
/** A fresh, EMPTY registry — the platform registers no custom stores of its own. */
|
|
97
|
+
export declare function defaultBinaryStoreRegistry(): BinaryStoreRegistry;
|
|
98
|
+
//# sourceMappingURL=binary-store-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-store-registry.d.ts","sourceRoot":"","sources":["../../src/domain/binary-store-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAyBjD,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,2FAA2F;IAC3F,MA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registration this platform refuses. Thrown at REGISTRATION rather than collected as a
|
|
4
|
+
* warning, because a store is composition code: the deployment is holding the registry when it
|
|
5
|
+
* happens, and the alternative (a store registered under an id the resolver can never select) is
|
|
6
|
+
* an account settings picker offering an entry that silently resolves to no storage at all.
|
|
7
|
+
*/
|
|
8
|
+
export class BinaryStoreRegistrationError extends Error {
|
|
9
|
+
constructor(message) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = 'BinaryStoreRegistrationError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** Ids are compared and persisted as-is, so the shape is constrained rather than normalised. */
|
|
15
|
+
const ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
16
|
+
/**
|
|
17
|
+
* App-owned registry of the deployment's own binary artifact stores. The composition root news
|
|
18
|
+
* ONE instance and a deployment registers its stores on it by reference; the per-account resolver
|
|
19
|
+
* builds a backend from it whenever an account has selected one.
|
|
20
|
+
*/
|
|
21
|
+
export class BinaryStoreRegistry {
|
|
22
|
+
definitions = new Map();
|
|
23
|
+
/**
|
|
24
|
+
* Register a store. A registration whose id matches an earlier one replaces it (the same
|
|
25
|
+
* last-wins rule every other app-owned registry uses, so a deployment can override a store its
|
|
26
|
+
* own shared composition module registered).
|
|
27
|
+
*
|
|
28
|
+
* Refuses an id the resolver could not honour: a malformed one, or one of the platform's own
|
|
29
|
+
* backend kinds. The second is the load-bearing check — `s3` and `fs` are selected through
|
|
30
|
+
* their own config (a bucket, a base path, sealed credentials), so a store registered under
|
|
31
|
+
* one of those names would be picked in the UI and never built, with the account looking
|
|
32
|
+
* correctly configured throughout.
|
|
33
|
+
*/
|
|
34
|
+
register(definition) {
|
|
35
|
+
const id = definition.id;
|
|
36
|
+
if (!ID_PATTERN.test(id)) {
|
|
37
|
+
throw new BinaryStoreRegistrationError(`binary store id ${JSON.stringify(id)} is not usable: use lowercase letters, digits and ` +
|
|
38
|
+
`dashes (max 63 characters). The id is persisted on every artifact row, so it is ` +
|
|
39
|
+
`constrained rather than normalised.`);
|
|
40
|
+
}
|
|
41
|
+
if (BUILTIN_BINARY_ARTIFACT_STORAGE_KINDS.includes(id)) {
|
|
42
|
+
throw new BinaryStoreRegistrationError(`binary store id ${JSON.stringify(id)} is one of the platform's own backend kinds ` +
|
|
43
|
+
`(${BUILTIN_BINARY_ARTIFACT_STORAGE_KINDS.join(', ')}). Those are selected through their ` +
|
|
44
|
+
`own account config, so a store registered under one would be offered in the settings ` +
|
|
45
|
+
`picker and never built. Pick another id.`);
|
|
46
|
+
}
|
|
47
|
+
this.definitions.set(id, definition);
|
|
48
|
+
}
|
|
49
|
+
/** Register several stores at once. */
|
|
50
|
+
registerAll(definitions) {
|
|
51
|
+
for (const definition of definitions)
|
|
52
|
+
this.register(definition);
|
|
53
|
+
}
|
|
54
|
+
/** The registered definition for an id, or undefined when this build registers none. */
|
|
55
|
+
get(id) {
|
|
56
|
+
return this.definitions.get(id);
|
|
57
|
+
}
|
|
58
|
+
/** Every registered id, in registration order. */
|
|
59
|
+
ids() {
|
|
60
|
+
return [...this.definitions.keys()];
|
|
61
|
+
}
|
|
62
|
+
/** How many stores are registered — the "does this deployment offer any" check. */
|
|
63
|
+
get size() {
|
|
64
|
+
return this.definitions.size;
|
|
65
|
+
}
|
|
66
|
+
/** The picker-facing projection: identity only, never the factory. */
|
|
67
|
+
views() {
|
|
68
|
+
return [...this.definitions.values()].map((definition) => ({
|
|
69
|
+
id: definition.id,
|
|
70
|
+
name: definition.name,
|
|
71
|
+
...(definition.summary ? { summary: definition.summary } : {}),
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** A fresh, EMPTY registry — the platform registers no custom stores of its own. */
|
|
76
|
+
export function defaultBinaryStoreRegistry() {
|
|
77
|
+
return new BinaryStoreRegistry();
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=binary-store-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-store-registry.js","s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AAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjC,CAAC;IAED,kDAAkD;IAClD,GAAG;QACD,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC;IAED,mFAAmF;IACnF,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;IAC9B,CAAC;IAED,sEAAsE;IACtE,KAAK;QACH,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACzD,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/D,CAAC,CAAC,CAAA;IACL,CAAC;CACF;AAED,oFAAoF;AACpF,MAAM,UAAU,0BAA0B;IACxC,OAAO,IAAI,mBAAmB,EAAE,CAAA;AAClC,CAAC"}
|
|
@@ -123,22 +123,6 @@ export interface GateDefinition {
|
|
|
123
123
|
wired(): boolean;
|
|
124
124
|
/** Step output recorded when the gate passes through (no provider configured). */
|
|
125
125
|
unwiredOutput: string;
|
|
126
|
-
/**
|
|
127
|
-
* What to do when the durable driver's poll budget (ciMaxPolls × ciPollInterval) is
|
|
128
|
-
* spent while the gate is still `pending` — distinct from the attempt budget (helper
|
|
129
|
-
* dispatches) handled by {@link onExhausted}:
|
|
130
|
-
* - `fail` (default) — the precheck never settled, which is a failure for the CI /
|
|
131
|
-
* conflicts gates (CI never went green / the PR never became mergeable).
|
|
132
|
-
* - `pass` — for a time-windowed watch gate (post-release-health), running out of
|
|
133
|
-
* polls just means the watch window outlasted the budget with NO regression seen,
|
|
134
|
-
* which is a healthy pass — not a timeout failure.
|
|
135
|
-
* - `rearm` — for an unbounded human-wait gate (`human-review`): there is no deadline
|
|
136
|
-
* for a human reviewer, so running out of polls is NOT a verdict. Always re-arm
|
|
137
|
-
* another poll cycle (never pass, never fail); the waiting is surfaced via the gate's
|
|
138
|
-
* notification (which the severity sweep escalates), not by killing the run.
|
|
139
|
-
* Resolved by {@link ExecutionService.resolveGatePollExhaustion}.
|
|
140
|
-
*/
|
|
141
|
-
pollExhaustion?: 'pass' | 'fail' | 'rearm';
|
|
142
126
|
/**
|
|
143
127
|
* Run the precheck against the provider and classify it. Receives the live gate
|
|
144
128
|
* state so a time-windowed gate (post-release-health) can read its `watchSince`.
|
|
@@ -267,14 +251,17 @@ export declare class GateRegistry {
|
|
|
267
251
|
* `kind` is passed explicitly because the factory's result isn't built until the engine
|
|
268
252
|
* invokes it.
|
|
269
253
|
*
|
|
270
|
-
* `options.configFields` declares the gate's own per-step parameters
|
|
271
|
-
*
|
|
272
|
-
* {@link
|
|
273
|
-
* {@link
|
|
274
|
-
*
|
|
254
|
+
* `options.configFields` declares the gate's own per-step parameters and
|
|
255
|
+
* `options.pollExhaustion` what running out of polls MEANS for this gate (see
|
|
256
|
+
* {@link GateRegistration}). Both sit on the REGISTRATION rather than on the
|
|
257
|
+
* {@link GateDefinition} because the boundaries that need them most have no
|
|
258
|
+
* {@link GateContext} to build a definition with: pipeline save, which must refuse a bad
|
|
259
|
+
* pipeline at authoring time, and public-API admission, which must decide at HTTP request
|
|
260
|
+
* time whether a start can park the run on a person.
|
|
275
261
|
*/
|
|
276
262
|
register(kind: string, factory: GateFactory, options?: {
|
|
277
263
|
configFields?: readonly DescriptorField[];
|
|
264
|
+
pollExhaustion?: GatePollExhaustion;
|
|
278
265
|
}): void;
|
|
279
266
|
/** The registered gates (registration order). */
|
|
280
267
|
factories(): {
|
|
@@ -283,6 +270,18 @@ export declare class GateRegistry {
|
|
|
283
270
|
}[];
|
|
284
271
|
/** Whether a gate is registered for this step kind — the "may this step carry gate config" test. */
|
|
285
272
|
has(kind: string): boolean;
|
|
273
|
+
/**
|
|
274
|
+
* What running out of polls MEANS for this gate, as it declared at registration, or
|
|
275
|
+
* `undefined` when the kind is not registered here at all.
|
|
276
|
+
*
|
|
277
|
+
* `undefined` is therefore a THIRD answer and never "the default": a registered gate that
|
|
278
|
+
* declared nothing answers `'fail'`, the disposition the engine applies to it, while an
|
|
279
|
+
* unregistered kind answers `undefined` because there is nothing to ask. Two readers depend on
|
|
280
|
+
* the distinction. The engine resolves the disposition of a spent poll budget; the public API
|
|
281
|
+
* decides at request time whether a start can park the run on a person forever, and reporting
|
|
282
|
+
* an unregistered kind as a bounded gate would be a guess about a gate this process cannot see.
|
|
283
|
+
*/
|
|
284
|
+
pollExhaustion(kind: string): GatePollExhaustion | undefined;
|
|
286
285
|
/**
|
|
287
286
|
* The per-step parameters a gate declared, or `undefined` when it declared none. A gate with no
|
|
288
287
|
* declaration accepts NO per-step fields: an undeclared field is indistinguishable from a
|
|
@@ -302,9 +301,42 @@ export declare class GateRegistry {
|
|
|
302
301
|
* machinery as an initiative preset's form.
|
|
303
302
|
*/
|
|
304
303
|
export type GateConfigFields = DescriptorFieldValues;
|
|
304
|
+
/**
|
|
305
|
+
* What running out of the durable driver's gate-poll budget (ciMaxPolls × ciPollInterval) MEANS,
|
|
306
|
+
* while the gate is still `pending`. Distinct from the attempt budget (helper dispatches), which
|
|
307
|
+
* {@link GateDefinition.onExhausted} handles:
|
|
308
|
+
*
|
|
309
|
+
* - `fail` (the default when a registration declares none): the precheck never settled, which
|
|
310
|
+
* is a failure for the CI / conflicts gates (CI never went green / the PR never became
|
|
311
|
+
* mergeable).
|
|
312
|
+
* - `pass`: for a time-windowed watch gate (post-release-health), running out of polls just
|
|
313
|
+
* means the watch window outlasted the budget with NO regression seen, which is a healthy
|
|
314
|
+
* pass rather than a timeout failure.
|
|
315
|
+
* - `rearm`: for an unbounded human-wait gate (`human-review`), there is no deadline for a
|
|
316
|
+
* human reviewer, so running out of polls is NOT a verdict. Always re-arm another poll cycle
|
|
317
|
+
* (never pass, never fail); the waiting is surfaced via the gate's notification (which the
|
|
318
|
+
* severity sweep escalates), not by killing the run.
|
|
319
|
+
*
|
|
320
|
+
* Resolved by `ExecutionService.resolveGatePollExhaustion`, and read at HTTP request time by
|
|
321
|
+
* public-API admission, for which `rearm` IS the definition of a gate that parks on a person.
|
|
322
|
+
*/
|
|
323
|
+
export type GatePollExhaustion = 'pass' | 'fail' | 'rearm';
|
|
305
324
|
/** What a {@link GateRegistry} stores per kind: the factory, plus what the gate declares about itself. */
|
|
306
325
|
export interface GateRegistration {
|
|
307
326
|
factory: GateFactory;
|
|
327
|
+
/**
|
|
328
|
+
* What a spent poll budget means for this gate ({@link GatePollExhaustion}); absent ⇒ `fail`.
|
|
329
|
+
*
|
|
330
|
+
* On the REGISTRATION rather than on the {@link GateDefinition} the factory builds, because the
|
|
331
|
+
* two readers that most need it hold no {@link GateContext}: standing a fake one up per HTTP
|
|
332
|
+
* request to interrogate a static declaration would be a shortcut, not a design. That is why
|
|
333
|
+
* this used to be mirrored by a hand-kept constant in `@cat-factory/contracts` naming the
|
|
334
|
+
* shipped human-wait gates, with a drift guard to keep the copy honest, and why a gate a
|
|
335
|
+
* DEPLOYMENT registered was invisible to the rule, so a plain `write` key could start a
|
|
336
|
+
* pipeline that then parked on it forever. Declared here, every gate answers for itself and
|
|
337
|
+
* there is no copy to drift.
|
|
338
|
+
*/
|
|
339
|
+
pollExhaustion?: GatePollExhaustion;
|
|
308
340
|
/**
|
|
309
341
|
* The gate's own per-step parameters, declared as descriptor fields so ONE declaration drives
|
|
310
342
|
* validation at pipeline save, re-validation at run start, and the authoring form the SPA
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-registry.d.ts","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,UAA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IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAI3D;IAED;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,CAEjE;IAED,mGAAmG;IACnG,WAAW,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;KAAE,EAAE,CAIpE;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D,0GAA0G;AAC1G,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAA;IACpB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAA;IACnC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,SAAS,eAAe,EAAE,CAAA;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,EACpC,gBAAgB,GAAE,gBAA4C,GAC7D,WAAW,CAcb"}
|
|
@@ -49,11 +49,13 @@ export class GateRegistry {
|
|
|
49
49
|
* `kind` is passed explicitly because the factory's result isn't built until the engine
|
|
50
50
|
* invokes it.
|
|
51
51
|
*
|
|
52
|
-
* `options.configFields` declares the gate's own per-step parameters
|
|
53
|
-
*
|
|
54
|
-
* {@link
|
|
55
|
-
* {@link
|
|
56
|
-
*
|
|
52
|
+
* `options.configFields` declares the gate's own per-step parameters and
|
|
53
|
+
* `options.pollExhaustion` what running out of polls MEANS for this gate (see
|
|
54
|
+
* {@link GateRegistration}). Both sit on the REGISTRATION rather than on the
|
|
55
|
+
* {@link GateDefinition} because the boundaries that need them most have no
|
|
56
|
+
* {@link GateContext} to build a definition with: pipeline save, which must refuse a bad
|
|
57
|
+
* pipeline at authoring time, and public-API admission, which must decide at HTTP request
|
|
58
|
+
* time whether a start can park the run on a person.
|
|
57
59
|
*/
|
|
58
60
|
register(kind, factory, options = {}) {
|
|
59
61
|
this.registry.set(kind, { factory, ...options });
|
|
@@ -66,6 +68,23 @@ export class GateRegistry {
|
|
|
66
68
|
has(kind) {
|
|
67
69
|
return this.registry.has(kind);
|
|
68
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* What running out of polls MEANS for this gate, as it declared at registration, or
|
|
73
|
+
* `undefined` when the kind is not registered here at all.
|
|
74
|
+
*
|
|
75
|
+
* `undefined` is therefore a THIRD answer and never "the default": a registered gate that
|
|
76
|
+
* declared nothing answers `'fail'`, the disposition the engine applies to it, while an
|
|
77
|
+
* unregistered kind answers `undefined` because there is nothing to ask. Two readers depend on
|
|
78
|
+
* the distinction. The engine resolves the disposition of a spent poll budget; the public API
|
|
79
|
+
* decides at request time whether a start can park the run on a person forever, and reporting
|
|
80
|
+
* an unregistered kind as a bounded gate would be a guess about a gate this process cannot see.
|
|
81
|
+
*/
|
|
82
|
+
pollExhaustion(kind) {
|
|
83
|
+
const registration = this.registry.get(kind);
|
|
84
|
+
if (!registration)
|
|
85
|
+
return undefined;
|
|
86
|
+
return registration.pollExhaustion ?? 'fail';
|
|
87
|
+
}
|
|
69
88
|
/**
|
|
70
89
|
* The per-step parameters a gate declared, or `undefined` when it declared none. A gate with no
|
|
71
90
|
* declaration accepts NO per-step fields: an undeclared field is indistinguishable from a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-registry.js","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,GAGxB,MAAM,wBAAwB,CAAA;AAuE/B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAGC,EACD,OAA0B,EA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 +1,27 @@
|
|
|
1
|
+
import type { AccountRole } from './types.js';
|
|
2
|
+
import type { WorkspaceAccessRow } from './workspace-access.js';
|
|
3
|
+
/** One account membership as the audience rules read it. */
|
|
4
|
+
export interface AudienceAccountMember {
|
|
5
|
+
userId: string;
|
|
6
|
+
roles: AccountRole[];
|
|
7
|
+
}
|
|
8
|
+
export interface NotificationAudienceInput {
|
|
9
|
+
/** The board's access row (owning account, legacy owner, access mode). */
|
|
10
|
+
workspace: WorkspaceAccessRow;
|
|
11
|
+
/** Every membership in the board's owning account. Empty for a legacy board. */
|
|
12
|
+
accountMembers: AudienceAccountMember[];
|
|
13
|
+
/** The user ids holding an explicit `workspace_members` row on this board. */
|
|
14
|
+
workspaceMemberUserIds: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The user ids a workspace notification may be delivered to, de-duplicated and in a
|
|
18
|
+
* stable order (account roster order, then the member rows).
|
|
19
|
+
*
|
|
20
|
+
* - Legacy / unscoped board (`accountId === null`): its owner alone.
|
|
21
|
+
* - `accessMode: 'account'`: every account member (a member ROW is an upgrade-only
|
|
22
|
+
* overlay there, so it adds nobody).
|
|
23
|
+
* - `accessMode: 'restricted'`: the account admins plus the account members who hold a
|
|
24
|
+
* member row.
|
|
25
|
+
*/
|
|
26
|
+
export declare function notificationAudienceUserIds(input: NotificationAudienceInput): string[];
|
|
27
|
+
//# sourceMappingURL=notification-audience.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-audience.d.ts","sourceRoot":"","sources":["../../src/domain/notification-audience.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,SAAS,EAAE,kBAAkB,CAAA;IAC7B,gFAAgF;IAChF,cAAc,EAAE,qBAAqB,EAAE,CAAA;IACvC,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,EAAE,CAAA;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,EAAE,CActF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Who a workspace-scoped notification is addressed to, when the channel has to name
|
|
3
|
+
// PEOPLE rather than a destination (email today; any future per-person transport).
|
|
4
|
+
//
|
|
5
|
+
// It is the same question `resolveWorkspaceAccess` answers, asked over a roster instead
|
|
6
|
+
// of about one caller, so it is derived from the SAME rules and lives beside them: a
|
|
7
|
+
// second, looser reading of who can see a board would mail a task's contents to someone
|
|
8
|
+
// the board itself hides it from. Account membership is the prerequisite, an account
|
|
9
|
+
// admin always qualifies, and a `workspace_members` row only counts for someone who is
|
|
10
|
+
// still an account member (an orphaned row is inert, exactly as it is for access).
|
|
11
|
+
//
|
|
12
|
+
// Pure, so both facades and the tests agree without a store.
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
/**
|
|
15
|
+
* The user ids a workspace notification may be delivered to, de-duplicated and in a
|
|
16
|
+
* stable order (account roster order, then the member rows).
|
|
17
|
+
*
|
|
18
|
+
* - Legacy / unscoped board (`accountId === null`): its owner alone.
|
|
19
|
+
* - `accessMode: 'account'`: every account member (a member ROW is an upgrade-only
|
|
20
|
+
* overlay there, so it adds nobody).
|
|
21
|
+
* - `accessMode: 'restricted'`: the account admins plus the account members who hold a
|
|
22
|
+
* member row.
|
|
23
|
+
*/
|
|
24
|
+
export function notificationAudienceUserIds(input) {
|
|
25
|
+
const { workspace, accountMembers, workspaceMemberUserIds } = input;
|
|
26
|
+
if (workspace.accountId === null) {
|
|
27
|
+
return workspace.ownerUserId ? [workspace.ownerUserId] : [];
|
|
28
|
+
}
|
|
29
|
+
if (workspace.accessMode === 'account') {
|
|
30
|
+
return unique(accountMembers.map((m) => m.userId));
|
|
31
|
+
}
|
|
32
|
+
const rostered = new Set(workspaceMemberUserIds);
|
|
33
|
+
return unique(accountMembers
|
|
34
|
+
.filter((m) => m.roles.includes('admin') || rostered.has(m.userId))
|
|
35
|
+
.map((m) => m.userId));
|
|
36
|
+
}
|
|
37
|
+
function unique(ids) {
|
|
38
|
+
return [...new Set(ids)];
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=notification-audience.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-audience.js","sourceRoot":"","sources":["../../src/domain/notification-audience.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AACpF,mFAAmF;AACnF,EAAE;AACF,wFAAwF;AACxF,qFAAqF;AACrF,wFAAwF;AACxF,qFAAqF;AACrF,uFAAuF;AACvF,mFAAmF;AACnF,EAAE;AACF,6DAA6D;AAC7D,8EAA8E;AAoB9E;;;;;;;;;GASG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAgC;IAC1E,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAA;IACnE,IAAI,SAAS,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QACjC,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7D,CAAC;IACD,IAAI,SAAS,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACpD,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAA;IAChD,OAAO,MAAM,CACX,cAAc;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;SAClE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CACxB,CAAA;AACH,CAAC;AAED,SAAS,MAAM,CAAC,GAAa;IAC3B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAC1B,CAAC"}
|
package/dist/domain/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { AgentKind, AgentState, AgentFailure, AgentFailureKind, AgentRunKind, ModelFamily, ModelFamilyPolicy, ModelPolicyMode, AccountRegion, ModelFamilyPolicyPreset, Block, BlockLevel, BlockStatus, BlockType, TaskType, CreateTaskType, TaskTypeFields, CustomTaskType, TaskTypePresentation, TaskTypeFieldDescriptor, TaskTypeFieldType, TaskTypeFieldOption, DescriptorField, DescriptorFieldType, DescriptorFieldOption, DescriptorFieldShowWhen, DescriptorFieldValue, DescriptorFieldValues, DocKind, Decision, EnvConfigRepairJob, EnvConfigRepairStatus, EnvironmentTestRun, EnvironmentTestStage, EnvironmentTestStatus, ExecutionInstance, ExecutionStatus, IntakeOrigin, InputGateIssue, InputGateIssueCode, InputGateMode, InputGateSeverity, InputGateStatus, RunInputGate, ResolveInputGateChoice, ResolveInputGateRequest, Pipeline, PipelineAvailability, PipelineStep, Position, PriorStepOutput, PromptFragment, PullRequestRef, PeerPullRequest, ReferenceRepo, AprioriBranch, SpendStatus, StepApproval, StepReviewComment, StepSubtasks, WebSearchAvailability, WebSearchProvider, Workspace, WorkspaceSnapshot, FragmentOwnerKind, FragmentTier, CreatePromptFragmentInput, CreateDocumentFragmentInput, UpdatePromptFragmentInput, FragmentSource, LinkFragmentSourceInput, FragmentSyncResult, FragmentSourceStatus, ResolvedFragment, ResolvedFragmentCatalog, Account, AccountType, AccountRole, AccountMember, CreateAccountInput, AddMemberInput, WorkspaceRole, WorkspacePermission, WorkspaceAccessMode, WorkspaceMember, Service, WorkspaceMount, MountServiceInput, UpdateMountInput, GitHubBranch, GitHubCheckRun, GitHubCommit, GitHubConnection, GitHubInstallationOption, GitHubAvailableRepo, GitHubIssue, GitHubIssueState, GitHubPullRequest, GitHubPullRequestState, OpenedPullRequest, GitHubRepo, RepoTreeEntry, SetRepoMonorepoInput, CommitFilesInput, LinkReposInput, OpenPullRequestInput, MergePullRequestInput, ProviderConfigFieldType, ProviderConfigField, ProviderDescriptor, ConnectionTestResult, ConnectionWarning, ConnectionWarningCode, UserSecretKind, UserSecretStatus, StoreUserSecretInput, TestUserSecretInput, UserSecretDescriptor, DocumentSourceKind, DocumentOrigin, DocumentLinkRole, DocumentRenderStatus, DocumentSourceDescriptor, CredentialField, DocumentConnection, SourceDocument, DocumentSearchResult, DocumentBoardPlan, PlanFrame, PlanModule, PlanTask, TaskSourceKind, TaskSourceDescriptor, TaskSourceState, TaskSourceDiagnostic, TaskSourceDiagnosticStatus, TaskConnection, TaskComment, TaskDependencyLink, SourceTask, TaskSearchResult, IssueIntakePredicate, TrackerBoard, BugCandidate, BugHuntAnalysis, BugHuntAnalysisStatus, BugHuntCandidate, BugHuntConfidence, BugHuntResult, RunBugHuntInput, EnvironmentSecretRef, EnvironmentAuthScheme, EnvironmentHttpMethod, EnvironmentRequestTemplate, EnvironmentStatus, TeardownConfirmation, EnvironmentAccessScheme, EnvironmentAccessMapping, EnvironmentResponseMapping, EnvironmentManifest, EnvironmentBackendConfig, EnvironmentBackendKind, KubernetesEnvironmentConfig, KubernetesManifestSource, KubernetesUrlSource, KubernetesRenderer, KubernetesImageOverride, KubernetesHelmRelease, KubernetesHelmSet, KubernetesSecretEntry, KubernetesSecretInjection, KubernetesProvisionConfig, CloudflareEnvironmentConfig, ProvisionType, EnvironmentFailureReason, InfraEngine, ManifestId, ServiceProvisioning, StackRecipe, RecipeStep, RecipeStepKind, RecipeHealthGate, RecipeEnvFile, PreflightCheckId, PreflightParams, PreflightRef, PreflightStatus, PreflightResult, FrontendConfig, FrontendBackendBinding, FrontendBackendSource, ResolvedFrontendBinding, LiveEnvHandle, ServiceConnection, KubernetesEngineConfig, InfraHandlerConfig, CustomManifestType, CustomManifestTypeSource, UpsertCustomManifestTypeInput, EnvironmentAccessHandle, EnvironmentHandle, EnvironmentConnection, TestEnvironmentConnectionInput, TestEnvironmentHandlerInput, ValidateEnvironmentRepoInput, BootstrapEnvironmentRepoInput, BootstrapRepoResult, TestSecretRef, TestSecretEntry, ServiceTestSecretsView, UpsertServiceTestSecretsInput, ProvisioningSubsystem, ProvisioningOperation, ProvisioningOutcome, ProvisioningLogEntry, RunnerPoolSecretRef, RunnerPoolAuthScheme, RunnerPoolRequestTemplate, RunnerJobState, RunnerPoolResponseMapping, RunnerPoolManifest, RunnerPoolConnection, TestRunnerPoolConnectionInput, RunnerBackendConfig, RunnerBackendKind, KubernetesRunnerConfig, KubernetesResourceQuantities, ReferenceArchitecture, CreateReferenceArchitectureInput, UpdateReferenceArchitectureInput, BootstrapStatus, BootstrapFailure, BootstrapFailureKind, BootstrapJob, BootstrapRepoInput, BlueprintModule, BlueprintService, BlueprintSource, BoardScanSpawnResult, ReviewItemCategory, ReviewItemSeverity, ReviewItemStatus, RequirementReviewItem, RequirementReviewStatus, RequirementReview, DocInterviewQa, DocInterviewStatus, DocInterviewSession, AnswerDocInterviewInput, KaizenGradingStatus, KaizenGrading, KaizenVerifiedCombo, KaizenOverview, KaizenRunGradings, RecommendationStatus, RequirementRecommendation, ReplyReviewItemInput, UpdateReviewItemStatusInput, IncorporateRequirementsInput, RequestRecommendationItem, RequestRecommendationsInput, ReRequestRecommendationInput, ResolveRequirementsExceededInput, ResolveRequirementsExceededChoice, FollowUpItemKind, FollowUpItemStatus, FollowUpItem, FollowUpsStepState, AnswerFollowUpInput, StreamedFollowUp, ForkOption, ForkChatMessage, ForkDecisionStatus, ForkChoice, ForkDecisionStepState, ForkChatRequestInput, ChooseForkInput, ForkProposal, JudgeFindingSeverity, JudgeFinding, JudgeVerdict, JudgeDisposition, JudgeStatus, JudgeRound, JudgeStepState, JudgeModelPin, JudgeModelPinStatus, ResolveJudgeInput, PrReviewSeverity, PrReviewCategory, PrReviewSlice, PrReviewSliceReview, PrReviewFinding, PrReviewFindingChallenge, PrReviewStatus, PrReviewResolution, PrReviewStepState, PrReviewPostReport, PrReviewPostFailure, PrReviewAgentOutput, PrReviewChallengeOutput, ResolvePrReviewInput, ChallengePrReviewFindingInput, ClarityReviewItem, ClarityReviewStatus, ClarityReview, ReplyClarityItemInput, UpdateClarityItemStatusInput, IncorporateClarityInput, ResolveClarityExceededInput, ResolveClarityExceededChoice, BrainstormStage, BrainstormItem, BrainstormStatus, BrainstormSession, ReplyBrainstormItemInput, UpdateBrainstormItemStatusInput, IncorporateBrainstormInput, ResolveBrainstormExceededInput, ResolveBrainstormExceededChoice, IterationCapChoice, ResolveIterationCapInput, RequirementPriority, RequirementKind,
|
|
2
2
|
/** Implementation state: agreed-but-not-built vs observed-to-hold. */
|
|
3
|
-
RequirementState, AcceptanceCriterion, RequirementItem, DomainRule, RequirementGroup, SpecModule, SpecDoc, CompanionAssessment, CompanionVerdict, GateStepState, GateFailingCheck, GateAttempt, RalphStepState, RalphVerdict, RalphAttempt, ValidationCheck, ValidationCheckOutcome, ValidationReport, ResolvedValidationChecks, ServiceValidationConfig, UpsertServiceValidationConfigInput, ReproductionProofMode, ResolvedReproduction, ReproductionStatus, ReproductionPhaseOutcome, ReproductionReport, HumanTestStepState, HumanTestEnvironment, HumanTestRound, RequestHumanTestFixInput, VisualConfirmStepState, VisualConfirmPair, VisualConfirmReferenceOrigin, VisualConfirmDesignGap, VisualConfirmDesignGapReason, VisualConfirmDesignReferences, VisualConfirmRound, MergeAssessment, MergeAxis, MergeDecision, MergeDecisionThresholds, MergeClassRule, MergeClassRules, ClassRulesByRole, SubmissionClassesByRole, RunMode, ChangeClass, ReviewEffort, MergeTrackDecision, MergeTrackRecord, MergeClassRollup, ReviewEffortDistribution, TagReviewEffortInput, PrVerificationReport, PrReportScope, PrReportOwnPullRequest, PrReportSectionStatus, PrReportStep, PrReportIssue, PrReportJudge, PrReportRun, PrReportCheck, PrReportCi, PrReportTestOutcome, PrReportTestConcern, PrReportTests, PrReportContext, PrReportContextDocument, PrReportValidation, PrReportValidationCommand, PrReportReproduction, PrReportReproductionPhase, PrReportEnvironment, PrReportEnvironments, PrReportEnvironmentTimeline, PrReportTimelineGap, PrReportEnvironmentEvidence, PrReportEvidenceArtifact, PrReportRequirement, PrReportRequirements, PrReportMerge, PrReportObservability, RiskPolicy, RequirementConcernLevel, CreateRiskPolicyInput, UpdateRiskPolicyInput, ComposeFileRef, ComposeSource, ComposeSourceKind, SharedStack, SharedStackStatus, CreateSharedStackInput, UpdateSharedStackInput, DetectSharedStackInput, SharedStackRecommendation, ConsensusStrategy, ConsensusParticipant, ConsensusGating, StepGating, ConsensusStepConfig, ConsensusGroup, CreateConsensusGroupInput, UpdateConsensusGroupInput, TaskEstimate, ConsensusScore, ConsensusContribution, ConsensusRound, ConsensusSessionStatus, ConsensusSession, AgentConfigOption, AgentConfigDescriptor, AgentConfigCatalog, AgentConfigValues, TestReport, TestOutcome, TestConcern, TestConcernSeverity, RequirementVerdict, RequirementVerdictStatus, TesterQualityConfig, StepOptions, StepGateConfig, GateApproverPolicy, GateApprovalRecord, CloudProvider, InstanceSize, UpdateAccountInput, ModelFlavor, ModelPreset, CreateModelPresetInput, UpdateModelPresetInput, AgentPromptRevision, AgentPromptDetail, AgentPromptSummary, SaveAgentPromptInput, PromoteAgentPromptInput, WorkspaceAgentSettings, UpdateWorkspaceAgentSettingsInput, ServiceFragmentDefaults, SetServiceFragmentDefaultsInput, Notification, NotificationType, NotificationStatus, NotificationSeverity, NotificationPayload, ResolveNotificationAction, WorkspaceSettings, UpdateWorkspaceSettingsInput, TaskLimitMode, TaskLimitPerType, UserSettings, UpdateUserSettingsInput, TutorialProgress, TutorialDecision, UpdateTutorialProgressInput, TutorialEvent, RecordTutorialEventInput, SlackConnection, SlackRoute, SlackNotificationSettings, SlackMemberMappingEntry, SlackMemberRole, SlackMemberMapping, SlackChannel, ConnectSlackByTokenInput, UpdateSlackSettingsInput, UpdateSlackMemberMappingInput, ScheduleTemplate, Recurrence, IssueIntakeConfig, PipelineSchedule, ScheduleRun, CreateScheduleInput, UpdateScheduleInput, TrackerKind, TrackerSettings, PutTrackerSettingsInput, WritebackOverride, LlmCallActivity, SandboxPromptOrigin, SandboxPromptVersion, SandboxFixtureKind, SandboxRepoRef, SandboxFixtureObjective, SandboxFixture, SandboxExperimentStatus, SandboxMatrix, SandboxExperiment, SandboxRunStatus, SandboxTokenUsage, SandboxRun, SandboxGradeDimension, SandboxObjectiveResult, SandboxGrade, Initiative, InitiativeStatus, InitiativeItem, InitiativeItemStatus, InitiativePhase, InitiativeEstimate, InitiativePipelineRule, InitiativeExecutionPolicy, InitiativeDecision, InitiativeDeviation, InitiativeFollowUp, InitiativeQa, InitiativeQaStatus, InitiativeInterviewState, InitiativePlanDraft, InitiativeDraftItem, InitiativeVersion, CreateInitiativeInput, AnswerInitiativeQuestionInput, PromoteInitiativeFollowUpInput, UpdateInitiativeItemInput, UpdateInitiativePolicyInput, AccountSettingsConfig, ContentStorageConfig, FigmaOAuthSecret, LinearOAuthSecret, S3CredentialsSecret, SlackOAuthSecret, WebSearchSecret, } from '@cat-factory/contracts';
|
|
3
|
+
RequirementState, AcceptanceCriterion, RequirementItem, DomainRule, RequirementGroup, SpecModule, SpecDoc, CompanionAssessment, CompanionVerdict, GateStepState, GateFailingCheck, GateAttempt, RalphStepState, RalphVerdict, RalphAttempt, ValidationCheck, ValidationCheckOutcome, ValidationReport, ResolvedValidationChecks, ServiceValidationConfig, UpsertServiceValidationConfigInput, ReproductionProofMode, ResolvedReproduction, ReproductionStatus, ReproductionPhaseOutcome, ReproductionReport, HumanTestStepState, HumanTestEnvironment, HumanTestRound, RequestHumanTestFixInput, VisualConfirmStepState, VisualConfirmPair, VisualConfirmReferenceOrigin, VisualConfirmDesignGap, VisualConfirmDesignGapReason, VisualConfirmDesignReferences, VisualConfirmRound, MergeAssessment, MergeAxis, MergeDecision, MergeDecisionThresholds, MergeClassRule, MergeClassRules, ClassRulesByRole, SubmissionClassesByRole, RunMode, ChangeClass, ReviewEffort, MergeTrackDecision, MergeTrackRecord, MergeClassRollup, ReviewEffortDistribution, TagReviewEffortInput, PrVerificationReport, PrReportScope, PrReportOwnPullRequest, PrReportSectionStatus, PrReportStep, PrReportIssue, PrReportJudge, PrReportRun, PrReportCheck, PrReportCi, PrReportTestOutcome, PrReportTestConcern, PrReportTests, PrReportContext, PrReportContextDocument, PrReportValidation, PrReportValidationCommand, PrReportReproduction, PrReportReproductionPhase, PrReportEnvironment, PrReportEnvironments, PrReportEnvironmentTimeline, PrReportTimelineGap, PrReportEnvironmentEvidence, PrReportEvidenceArtifact, PrReportRequirement, PrReportRequirements, PrReportMerge, PrReportObservability, RiskPolicy, RequirementConcernLevel, CreateRiskPolicyInput, UpdateRiskPolicyInput, ComposeFileRef, ComposeSource, ComposeSourceKind, SharedStack, SharedStackStatus, CreateSharedStackInput, UpdateSharedStackInput, DetectSharedStackInput, SharedStackRecommendation, ConsensusStrategy, ConsensusParticipant, ConsensusGating, StepGating, ConsensusStepConfig, ConsensusGroup, CreateConsensusGroupInput, UpdateConsensusGroupInput, TaskEstimate, ConsensusScore, ConsensusContribution, ConsensusRound, ConsensusSessionStatus, ConsensusSession, AgentConfigOption, AgentConfigDescriptor, AgentConfigCatalog, AgentConfigValues, TestReport, TestOutcome, TestConcern, TestConcernSeverity, RequirementVerdict, RequirementVerdictStatus, TesterQualityConfig, StepOptions, StepGateConfig, GateApproverPolicy, GateApprovalRecord, CloudProvider, InstanceSize, UpdateAccountInput, ModelFlavor, ModelPreset, CreateModelPresetInput, UpdateModelPresetInput, AgentPromptRevision, AgentPromptDetail, AgentPromptSummary, SaveAgentPromptInput, PromoteAgentPromptInput, WorkspaceAgentSettings, UpdateWorkspaceAgentSettingsInput, ServiceFragmentDefaults, SetServiceFragmentDefaultsInput, Notification, NotificationType, NotificationStatus, NotificationSeverity, NotificationPayload, ResolveNotificationAction, NotificationDeliveryChannel, NotificationChannelOverrides, NotificationRoutingMatrix, NotificationSettings, UpdateNotificationSettingsInput, WorkspaceSettings, UpdateWorkspaceSettingsInput, TaskLimitMode, TaskLimitPerType, UserSettings, UpdateUserSettingsInput, TutorialProgress, TutorialDecision, UpdateTutorialProgressInput, TutorialEvent, RecordTutorialEventInput, SlackConnection, SlackRoute, SlackNotificationSettings, SlackMemberMappingEntry, SlackMemberRole, SlackMemberMapping, SlackChannel, ConnectSlackByTokenInput, UpdateSlackSettingsInput, UpdateSlackMemberMappingInput, ScheduleTemplate, Recurrence, IssueIntakeConfig, PipelineSchedule, ScheduleRun, CreateScheduleInput, UpdateScheduleInput, TrackerKind, TrackerSettings, PutTrackerSettingsInput, WritebackOverride, LlmCallActivity, SandboxPromptOrigin, SandboxPromptVersion, SandboxFixtureKind, SandboxRepoRef, SandboxFixtureObjective, SandboxFixture, SandboxExperimentStatus, SandboxMatrix, SandboxExperiment, SandboxRunStatus, SandboxTokenUsage, SandboxRun, SandboxGradeDimension, SandboxObjectiveResult, SandboxGrade, Initiative, InitiativeStatus, InitiativeItem, InitiativeItemStatus, InitiativePhase, InitiativeEstimate, InitiativePipelineRule, InitiativeExecutionPolicy, InitiativeDecision, InitiativeDeviation, InitiativeFollowUp, InitiativeQa, InitiativeQaStatus, InitiativeInterviewState, InitiativePlanDraft, InitiativeDraftItem, InitiativeVersion, CreateInitiativeInput, AnswerInitiativeQuestionInput, PromoteInitiativeFollowUpInput, UpdateInitiativeItemInput, UpdateInitiativePolicyInput, AccountSettingsConfig, ContentStorageConfig, FigmaOAuthSecret, LinearOAuthSecret, S3CredentialsSecret, SlackOAuthSecret, WebSearchSecret, } from '@cat-factory/contracts';
|
|
4
4
|
/**
|
|
5
5
|
* A backend-prepared file to inject into a container agent's `.cat-context/` directory before
|
|
6
6
|
* it runs — the deterministic analogue of the linked-doc context the executor already
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EAWd,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EAGnB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,YAAY,EAEZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EAEjB,iBAAiB,EACjB,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EAEvB,OAAO,EACP,WAAW,EACX,WAAW,E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ACZ,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAE/B;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EAWd,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EAGnB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,YAAY,EAEZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ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AClB,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EAEZ,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAE/B;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
import type { VcsProvider } from './vcs-types.js';
|
|
2
|
+
import { UnavailableError } from './errors.js';
|
|
3
|
+
/**
|
|
4
|
+
* A provider-routing VCS client was asked for a member the ROUTED provider's client does not
|
|
5
|
+
* implement, while the other configured provider's does. Thrown by
|
|
6
|
+
* `providerRoutingGitHubClient` (`@cat-factory/server`) and lives here so a consumer BELOW the
|
|
7
|
+
* server layer can catch it.
|
|
8
|
+
*
|
|
9
|
+
* A distinct class rather than a bare {@link UnavailableError} because the two facts need
|
|
10
|
+
* different handling and only the caller knows which it can absorb: the generic 503 says "this
|
|
11
|
+
* deployment has not configured the capability", a build problem an operator fixes by wiring
|
|
12
|
+
* something, while this is a permanent property of the provider the workspace CONNECTED, which
|
|
13
|
+
* no amount of wiring changes. A caller that already models "the client cannot answer this"
|
|
14
|
+
* (`GitHubService.checkDefaultBranchProtection`'s `capability: 'unavailable'`) reports that;
|
|
15
|
+
* one that does not lets it surface as the 503 it is.
|
|
16
|
+
*
|
|
17
|
+
* Surfacing is only honest because the reason is a member of contracts' `UNAVAILABLE_REASONS`
|
|
18
|
+
* and the SPA keys its own copy off it. Without that entry the 503 renders as the generic
|
|
19
|
+
* "not configured" wording, so the class would state the distinction in its own message while
|
|
20
|
+
* the only text a user reads asserts the opposite.
|
|
21
|
+
*/
|
|
22
|
+
export declare class VcsCapabilityUnsupportedError extends UnavailableError {
|
|
23
|
+
readonly provider: VcsProvider;
|
|
24
|
+
readonly operation: string;
|
|
25
|
+
constructor(provider: VcsProvider, operation: string);
|
|
26
|
+
}
|
|
2
27
|
/** In-repo docs the VCS remedies deep-link to. */
|
|
3
28
|
export declare const VCS_DOC_URLS: {
|
|
4
29
|
/** GitHub connect / repo linking. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcs-errors.d.ts","sourceRoot":"","sources":["../../src/domain/vcs-errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vcs-errors.d.ts","sourceRoot":"","sources":["../../src/domain/vcs-errors.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAY9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,6BAA8B,SAAQ,gBAAgB;IAE/D,QAAQ,CAAC,QAAQ,EAAE,WAAW;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAF5B,YACW,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,MAAM,EAM3B;CACF;AAOD,kDAAkD;AAClD,eAAO,MAAM,YAAY;IACvB,qCAAqC;aACrC,iBAAiB;IACjB,oCAAoC;aACpC,gBAAgB;IAChB,oDAAoD;aACpD,YAAY;CACJ,CAAA;AAEV,mFAAmF;AACnF,eAAO,MAAM,oBAAoB;aAC/B,aAAa,EAAE,2CAA2C;CAClD,CAAA;AAEV,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,WAAW,CAAA;IACrB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6FAA6F;IAC7F,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAmDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,mBAAmB,GAAG,MAAM,CAMpE"}
|
|
@@ -15,6 +15,47 @@
|
|
|
15
15
|
// `@cat-factory/gitlab`) but share `@cat-factory/kernel`, so keeping the copy here keeps the two
|
|
16
16
|
// providers' remedies from drifting and lets the mapping be unit-tested in one place.
|
|
17
17
|
// ---------------------------------------------------------------------------
|
|
18
|
+
import { UnavailableError } from './errors.js';
|
|
19
|
+
/**
|
|
20
|
+
* Typed against the SHARED vocabulary rather than passed as a bare string, because this reason
|
|
21
|
+
* only does its job if the SPA has copy keyed to it. `UnavailableError.reason` is `string` on
|
|
22
|
+
* purpose (most reasons are internal and never reach a human), so nothing else would notice if
|
|
23
|
+
* the entry were dropped from `UNAVAILABLE_REASONS`: the refusal would keep working and quietly
|
|
24
|
+
* fall back to the generic "not configured" wording this class exists to avoid. Naming the union
|
|
25
|
+
* here turns that into a build failure.
|
|
26
|
+
*/
|
|
27
|
+
const VCS_CAPABILITY_UNSUPPORTED = 'vcs_capability_unsupported';
|
|
28
|
+
/**
|
|
29
|
+
* A provider-routing VCS client was asked for a member the ROUTED provider's client does not
|
|
30
|
+
* implement, while the other configured provider's does. Thrown by
|
|
31
|
+
* `providerRoutingGitHubClient` (`@cat-factory/server`) and lives here so a consumer BELOW the
|
|
32
|
+
* server layer can catch it.
|
|
33
|
+
*
|
|
34
|
+
* A distinct class rather than a bare {@link UnavailableError} because the two facts need
|
|
35
|
+
* different handling and only the caller knows which it can absorb: the generic 503 says "this
|
|
36
|
+
* deployment has not configured the capability", a build problem an operator fixes by wiring
|
|
37
|
+
* something, while this is a permanent property of the provider the workspace CONNECTED, which
|
|
38
|
+
* no amount of wiring changes. A caller that already models "the client cannot answer this"
|
|
39
|
+
* (`GitHubService.checkDefaultBranchProtection`'s `capability: 'unavailable'`) reports that;
|
|
40
|
+
* one that does not lets it surface as the 503 it is.
|
|
41
|
+
*
|
|
42
|
+
* Surfacing is only honest because the reason is a member of contracts' `UNAVAILABLE_REASONS`
|
|
43
|
+
* and the SPA keys its own copy off it. Without that entry the 503 renders as the generic
|
|
44
|
+
* "not configured" wording, so the class would state the distinction in its own message while
|
|
45
|
+
* the only text a user reads asserts the opposite.
|
|
46
|
+
*/
|
|
47
|
+
export class VcsCapabilityUnsupportedError extends UnavailableError {
|
|
48
|
+
provider;
|
|
49
|
+
operation;
|
|
50
|
+
constructor(provider, operation) {
|
|
51
|
+
super(`The ${provider} client does not support ${operation}`, VCS_CAPABILITY_UNSUPPORTED, {
|
|
52
|
+
provider,
|
|
53
|
+
operation,
|
|
54
|
+
});
|
|
55
|
+
this.provider = provider;
|
|
56
|
+
this.operation = operation;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
18
59
|
// In-repo docs are linked as stable GitHub blob URLs on `main`. Kernel sits BELOW the server
|
|
19
60
|
// layer, so it cannot import `@cat-factory/server`'s `config/docs.ts`; per the doc-URL convention
|
|
20
61
|
// a package outside the server layer keeps its own equivalent — this is that equivalent.
|