@h-rig/contracts 0.0.6-alpha.135 → 0.0.6-alpha.137

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.
@@ -44,14 +44,6 @@ export declare const LoadedPluginDescriptor: Schema.Struct<{
44
44
  readonly runtime: Schema.Unknown;
45
45
  }>;
46
46
  export type LoadedPluginDescriptor = typeof LoadedPluginDescriptor.Type;
47
- export declare const ProtectedStageGrant: Schema.Struct<{
48
- readonly stageId: Schema.Trim;
49
- readonly pluginId: Schema.Trim;
50
- readonly operations: Schema.$Array<Schema.Literals<readonly ["remove", "replace"]>>;
51
- readonly grantedBy: Schema.optional<Schema.Trim>;
52
- readonly reason: Schema.optional<Schema.String>;
53
- }>;
54
- export type ProtectedStageGrant = typeof ProtectedStageGrant.Type;
55
47
  export declare const KernelReplacementGrant: Schema.Struct<{
56
48
  readonly pluginId: Schema.Trim;
57
49
  readonly grantedBy: Schema.optional<Schema.Trim>;
@@ -60,13 +52,6 @@ export declare const KernelReplacementGrant: Schema.Struct<{
60
52
  export type KernelReplacementGrant = typeof KernelReplacementGrant.Type;
61
53
  export declare const CapabilityGrants: Schema.Struct<{
62
54
  readonly capabilityPrecedence: Schema.optional<Schema.$Record<Schema.String, Schema.$Array<Schema.Trim>>>;
63
- readonly protectedStageGrants: Schema.optional<Schema.$Array<Schema.Struct<{
64
- readonly stageId: Schema.Trim;
65
- readonly pluginId: Schema.Trim;
66
- readonly operations: Schema.$Array<Schema.Literals<readonly ["remove", "replace"]>>;
67
- readonly grantedBy: Schema.optional<Schema.Trim>;
68
- readonly reason: Schema.optional<Schema.String>;
69
- }>>>;
70
55
  readonly kernelReplacementGrants: Schema.optional<Schema.$Array<Schema.Struct<{
71
56
  readonly pluginId: Schema.Trim;
72
57
  readonly grantedBy: Schema.optional<Schema.Trim>;
@@ -74,10 +59,10 @@ export declare const CapabilityGrants: Schema.Struct<{
74
59
  }>>>;
75
60
  }>;
76
61
  export type CapabilityGrants = typeof CapabilityGrants.Type;
77
- export declare const KernelBootErrorCode: Schema.Literals<readonly ["BootIncoherent", "AmbiguousCapability", "MissingCapability", "ProtectedStageViolation", "KernelReplacementDenied", "PipelineUnresolvable"]>;
62
+ export declare const KernelBootErrorCode: Schema.Literals<readonly ["BootIncoherent", "AmbiguousCapability", "MissingCapability", "KernelReplacementDenied", "PipelineUnresolvable"]>;
78
63
  export type KernelBootErrorCode = typeof KernelBootErrorCode.Type;
79
64
  export declare const KernelBootError: Schema.Struct<{
80
- readonly code: Schema.Literals<readonly ["BootIncoherent", "AmbiguousCapability", "MissingCapability", "ProtectedStageViolation", "KernelReplacementDenied", "PipelineUnresolvable"]>;
65
+ readonly code: Schema.Literals<readonly ["BootIncoherent", "AmbiguousCapability", "MissingCapability", "KernelReplacementDenied", "PipelineUnresolvable"]>;
81
66
  readonly message: Schema.Trim;
82
67
  readonly capability: Schema.optional<Schema.Literals<readonly ["kernel", "journal", "stage-runner", "transport", "loader-policy"]>>;
83
68
  readonly stageId: Schema.optional<Schema.Trim>;
@@ -93,9 +78,6 @@ export declare class AmbiguousCapability extends Error {
93
78
  export declare class MissingCapability extends Error {
94
79
  readonly code = "MissingCapability";
95
80
  }
96
- export declare class ProtectedStageViolation extends Error {
97
- readonly code = "ProtectedStageViolation";
98
- }
99
81
  export declare class KernelReplacementDenied extends Error {
100
82
  readonly code = "KernelReplacementDenied";
101
83
  }
@@ -145,7 +127,7 @@ export declare const KernelResolutionRecord: Schema.Struct<{
145
127
  }>>;
146
128
  readonly cycles: Schema.$Array<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
147
129
  readonly grantUses: Schema.optional<Schema.$Array<Schema.Struct<{
148
- readonly kind: Schema.Literals<readonly ["protected-stage", "kernel-replacement"]>;
130
+ readonly kind: Schema.Literal<"kernel-replacement">;
149
131
  readonly target: Schema.Trim;
150
132
  readonly pluginId: Schema.Trim;
151
133
  }>>>;
@@ -184,7 +166,7 @@ export declare const BootResultDescriptor: Schema.Struct<{
184
166
  }>>;
185
167
  readonly cycles: Schema.$Array<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
186
168
  readonly grantUses: Schema.optional<Schema.$Array<Schema.Struct<{
187
- readonly kind: Schema.Literals<readonly ["protected-stage", "kernel-replacement"]>;
169
+ readonly kind: Schema.Literal<"kernel-replacement">;
188
170
  readonly target: Schema.Trim;
189
171
  readonly pluginId: Schema.Trim;
190
172
  }>>>;
@@ -234,5 +216,6 @@ export interface KernelCapability {
234
216
  export interface BootResult {
235
217
  kernel: KernelCapability;
236
218
  plugins: readonly LoadedPlugin[];
219
+ capabilityProviderIds: Readonly<Record<CapabilityTag, string>>;
237
220
  }
238
221
  export type StageExecutor = (ctx: StageContext) => Promise<StageResult> | StageResult;
@@ -115,7 +115,7 @@ var StageMutation = Schema2.Union([
115
115
  ReorderStageMutation
116
116
  ]);
117
117
  var ResolutionGrantUse = Schema2.Struct({
118
- kind: Schema2.Literals(["protected-stage", "kernel-replacement"]),
118
+ kind: Schema2.Literal("kernel-replacement"),
119
119
  target: TrimmedNonEmptyString,
120
120
  pluginId: TrimmedNonEmptyString
121
121
  });
@@ -176,13 +176,6 @@ var LoadedPluginDescriptor = Schema3.Struct({
176
176
  contributes: Schema3.Unknown,
177
177
  runtime: Schema3.Unknown
178
178
  });
179
- var ProtectedStageGrant = Schema3.Struct({
180
- stageId: TrimmedNonEmptyString,
181
- pluginId: TrimmedNonEmptyString,
182
- operations: Schema3.Array(Schema3.Literals(["remove", "replace"])),
183
- grantedBy: Schema3.optional(TrimmedNonEmptyString),
184
- reason: Schema3.optional(Schema3.String)
185
- });
186
179
  var KernelReplacementGrant = Schema3.Struct({
187
180
  pluginId: TrimmedNonEmptyString,
188
181
  grantedBy: Schema3.optional(TrimmedNonEmptyString),
@@ -190,14 +183,12 @@ var KernelReplacementGrant = Schema3.Struct({
190
183
  });
191
184
  var CapabilityGrants = Schema3.Struct({
192
185
  capabilityPrecedence: Schema3.optional(Schema3.Record(Schema3.String, Schema3.Array(TrimmedNonEmptyString))),
193
- protectedStageGrants: Schema3.optional(Schema3.Array(ProtectedStageGrant)),
194
186
  kernelReplacementGrants: Schema3.optional(Schema3.Array(KernelReplacementGrant))
195
187
  });
196
188
  var KernelBootErrorCode = Schema3.Literals([
197
189
  "BootIncoherent",
198
190
  "AmbiguousCapability",
199
191
  "MissingCapability",
200
- "ProtectedStageViolation",
201
192
  "KernelReplacementDenied",
202
193
  "PipelineUnresolvable"
203
194
  ]);
@@ -221,10 +212,6 @@ class MissingCapability extends Error {
221
212
  code = "MissingCapability";
222
213
  }
223
214
 
224
- class ProtectedStageViolation extends Error {
225
- code = "ProtectedStageViolation";
226
- }
227
-
228
215
  class KernelReplacementDenied extends Error {
229
216
  code = "KernelReplacementDenied";
230
217
  }
@@ -259,8 +246,6 @@ var JournalEvent = Schema3.Struct({
259
246
  payload: Schema3.Unknown
260
247
  });
261
248
  export {
262
- ProtectedStageViolation,
263
- ProtectedStageGrant,
264
249
  PluginMeta,
265
250
  PipelineUnresolvable,
266
251
  MissingCapability,
@@ -63,6 +63,7 @@ var StageDescriptor = Schema2.Struct({
63
63
  priority: Schema2.Number.pipe(Schema2.withDecodingDefault(() => 0)),
64
64
  protected: Schema2.Boolean.pipe(Schema2.withDecodingDefault(() => false))
65
65
  });
66
+ var Stage = StageDescriptor;
66
67
  var StageContinueResult = Schema2.Struct({
67
68
  kind: Schema2.Literal("continue"),
68
69
  ctx: StageContext
@@ -121,7 +122,7 @@ var StageMutation = Schema2.Union([
121
122
  ReorderStageMutation
122
123
  ]);
123
124
  var ResolutionGrantUse = Schema2.Struct({
124
- kind: Schema2.Literals(["protected-stage", "kernel-replacement"]),
125
+ kind: Schema2.Literal("kernel-replacement"),
125
126
  target: TrimmedNonEmptyString,
126
127
  pluginId: TrimmedNonEmptyString
127
128
  });
@@ -182,13 +183,6 @@ var LoadedPluginDescriptor = Schema3.Struct({
182
183
  contributes: Schema3.Unknown,
183
184
  runtime: Schema3.Unknown
184
185
  });
185
- var ProtectedStageGrant = Schema3.Struct({
186
- stageId: TrimmedNonEmptyString,
187
- pluginId: TrimmedNonEmptyString,
188
- operations: Schema3.Array(Schema3.Literals(["remove", "replace"])),
189
- grantedBy: Schema3.optional(TrimmedNonEmptyString),
190
- reason: Schema3.optional(Schema3.String)
191
- });
192
186
  var KernelReplacementGrant = Schema3.Struct({
193
187
  pluginId: TrimmedNonEmptyString,
194
188
  grantedBy: Schema3.optional(TrimmedNonEmptyString),
@@ -196,14 +190,12 @@ var KernelReplacementGrant = Schema3.Struct({
196
190
  });
197
191
  var CapabilityGrants = Schema3.Struct({
198
192
  capabilityPrecedence: Schema3.optional(Schema3.Record(Schema3.String, Schema3.Array(TrimmedNonEmptyString))),
199
- protectedStageGrants: Schema3.optional(Schema3.Array(ProtectedStageGrant)),
200
193
  kernelReplacementGrants: Schema3.optional(Schema3.Array(KernelReplacementGrant))
201
194
  });
202
195
  var KernelBootErrorCode = Schema3.Literals([
203
196
  "BootIncoherent",
204
197
  "AmbiguousCapability",
205
198
  "MissingCapability",
206
- "ProtectedStageViolation",
207
199
  "KernelReplacementDenied",
208
200
  "PipelineUnresolvable"
209
201
  ]);
@@ -307,9 +299,34 @@ var TaskSourceRegistration = Schema4.Struct({
307
299
  });
308
300
  var CliCommandRegistration = Schema4.Struct({
309
301
  id: Schema4.String,
310
- command: Schema4.String,
302
+ family: Schema4.optional(Schema4.String),
303
+ command: Schema4.optional(Schema4.String),
304
+ description: Schema4.optional(Schema4.String),
305
+ usage: Schema4.optional(Schema4.String),
306
+ aliases: Schema4.optional(Schema4.Array(Schema4.String)),
307
+ projectRequired: Schema4.optional(Schema4.Boolean)
308
+ });
309
+ var ProductCapabilityRegistration = Schema4.Struct({
310
+ id: Schema4.String,
311
+ title: Schema4.String,
312
+ description: Schema4.optional(Schema4.String),
313
+ commandId: Schema4.optional(Schema4.String),
314
+ panelId: Schema4.optional(Schema4.String)
315
+ });
316
+ var PanelRegistration = Schema4.Struct({
317
+ id: Schema4.String,
318
+ slot: Schema4.String,
319
+ title: Schema4.String,
320
+ capabilityId: Schema4.optional(Schema4.String),
321
+ badge: Schema4.optional(Schema4.String),
322
+ disabled: Schema4.optional(Schema4.Boolean),
311
323
  description: Schema4.optional(Schema4.String)
312
324
  });
325
+ var BlockerClassifierRegistration = Schema4.Struct({
326
+ id: Schema4.String,
327
+ description: Schema4.optional(Schema4.String),
328
+ priority: Schema4.optional(Schema4.Number)
329
+ });
313
330
  var PluginContributes = Schema4.Struct({
314
331
  validators: Schema4.optional(Schema4.Array(ValidatorRegistration)),
315
332
  hooks: Schema4.optional(Schema4.Array(HookRegistration)),
@@ -319,7 +336,11 @@ var PluginContributes = Schema4.Struct({
319
336
  taskFieldSchemas: Schema4.optional(Schema4.Array(TaskFieldExtension)),
320
337
  taskSources: Schema4.optional(Schema4.Array(TaskSourceRegistration)),
321
338
  cliCommands: Schema4.optional(Schema4.Array(CliCommandRegistration)),
322
- stageMutations: Schema4.optional(Schema4.Array(StageMutation))
339
+ stages: Schema4.optional(Schema4.Array(Stage)),
340
+ stageMutations: Schema4.optional(Schema4.Array(StageMutation)),
341
+ capabilities: Schema4.optional(Schema4.Array(ProductCapabilityRegistration)),
342
+ panels: Schema4.optional(Schema4.Array(PanelRegistration)),
343
+ blockerClassifiers: Schema4.optional(Schema4.Array(BlockerClassifierRegistration))
323
344
  });
324
345
  var RigPlugin = Schema4.Struct({
325
346
  name: Schema4.String,
@@ -86,10 +86,38 @@ export declare const TaskSourceRegistration: Schema.Struct<{
86
86
  export type TaskSourceRegistration = typeof TaskSourceRegistration.Type;
87
87
  export declare const CliCommandRegistration: Schema.Struct<{
88
88
  readonly id: Schema.String;
89
- readonly command: Schema.String;
89
+ readonly family: Schema.optional<Schema.String>;
90
+ readonly command: Schema.optional<Schema.String>;
90
91
  readonly description: Schema.optional<Schema.String>;
92
+ readonly usage: Schema.optional<Schema.String>;
93
+ readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
94
+ readonly projectRequired: Schema.optional<Schema.Boolean>;
91
95
  }>;
92
96
  export type CliCommandRegistration = typeof CliCommandRegistration.Type;
97
+ export declare const ProductCapabilityRegistration: Schema.Struct<{
98
+ readonly id: Schema.String;
99
+ readonly title: Schema.String;
100
+ readonly description: Schema.optional<Schema.String>;
101
+ readonly commandId: Schema.optional<Schema.String>;
102
+ readonly panelId: Schema.optional<Schema.String>;
103
+ }>;
104
+ export type ProductCapabilityRegistration = typeof ProductCapabilityRegistration.Type;
105
+ export declare const PanelRegistration: Schema.Struct<{
106
+ readonly id: Schema.String;
107
+ readonly slot: Schema.String;
108
+ readonly title: Schema.String;
109
+ readonly capabilityId: Schema.optional<Schema.String>;
110
+ readonly badge: Schema.optional<Schema.String>;
111
+ readonly disabled: Schema.optional<Schema.Boolean>;
112
+ readonly description: Schema.optional<Schema.String>;
113
+ }>;
114
+ export type PanelRegistration = typeof PanelRegistration.Type;
115
+ export declare const BlockerClassifierRegistration: Schema.Struct<{
116
+ readonly id: Schema.String;
117
+ readonly description: Schema.optional<Schema.String>;
118
+ readonly priority: Schema.optional<Schema.Number>;
119
+ }>;
120
+ export type BlockerClassifierRegistration = typeof BlockerClassifierRegistration.Type;
93
121
  export declare const PluginContributes: Schema.Struct<{
94
122
  readonly validators: Schema.optional<Schema.$Array<Schema.Struct<{
95
123
  readonly id: Schema.String;
@@ -153,8 +181,20 @@ export declare const PluginContributes: Schema.Struct<{
153
181
  }>>>;
154
182
  readonly cliCommands: Schema.optional<Schema.$Array<Schema.Struct<{
155
183
  readonly id: Schema.String;
156
- readonly command: Schema.String;
184
+ readonly family: Schema.optional<Schema.String>;
185
+ readonly command: Schema.optional<Schema.String>;
157
186
  readonly description: Schema.optional<Schema.String>;
187
+ readonly usage: Schema.optional<Schema.String>;
188
+ readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
189
+ readonly projectRequired: Schema.optional<Schema.Boolean>;
190
+ }>>>;
191
+ readonly stages: Schema.optional<Schema.$Array<Schema.Struct<{
192
+ readonly id: Schema.brand<Schema.Trim, "StageId">;
193
+ readonly kind: Schema.Literals<readonly ["transform", "gate", "observe"]>;
194
+ readonly before: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
195
+ readonly after: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
196
+ readonly priority: Schema.withDecodingDefault<Schema.Number>;
197
+ readonly protected: Schema.withDecodingDefault<Schema.Boolean>;
158
198
  }>>>;
159
199
  readonly stageMutations: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
160
200
  readonly op: Schema.Literal<"insert">;
@@ -198,6 +238,27 @@ export declare const PluginContributes: Schema.Struct<{
198
238
  readonly after: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
199
239
  readonly contributedBy: Schema.optional<Schema.Trim>;
200
240
  }>]>>>;
241
+ readonly capabilities: Schema.optional<Schema.$Array<Schema.Struct<{
242
+ readonly id: Schema.String;
243
+ readonly title: Schema.String;
244
+ readonly description: Schema.optional<Schema.String>;
245
+ readonly commandId: Schema.optional<Schema.String>;
246
+ readonly panelId: Schema.optional<Schema.String>;
247
+ }>>>;
248
+ readonly panels: Schema.optional<Schema.$Array<Schema.Struct<{
249
+ readonly id: Schema.String;
250
+ readonly slot: Schema.String;
251
+ readonly title: Schema.String;
252
+ readonly capabilityId: Schema.optional<Schema.String>;
253
+ readonly badge: Schema.optional<Schema.String>;
254
+ readonly disabled: Schema.optional<Schema.Boolean>;
255
+ readonly description: Schema.optional<Schema.String>;
256
+ }>>>;
257
+ readonly blockerClassifiers: Schema.optional<Schema.$Array<Schema.Struct<{
258
+ readonly id: Schema.String;
259
+ readonly description: Schema.optional<Schema.String>;
260
+ readonly priority: Schema.optional<Schema.Number>;
261
+ }>>>;
201
262
  }>;
202
263
  export type PluginContributes = typeof PluginContributes.Type;
203
264
  export declare const RigPlugin: Schema.Struct<{
@@ -272,8 +333,20 @@ export declare const RigPlugin: Schema.Struct<{
272
333
  }>>>;
273
334
  readonly cliCommands: Schema.optional<Schema.$Array<Schema.Struct<{
274
335
  readonly id: Schema.String;
275
- readonly command: Schema.String;
336
+ readonly family: Schema.optional<Schema.String>;
337
+ readonly command: Schema.optional<Schema.String>;
276
338
  readonly description: Schema.optional<Schema.String>;
339
+ readonly usage: Schema.optional<Schema.String>;
340
+ readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
341
+ readonly projectRequired: Schema.optional<Schema.Boolean>;
342
+ }>>>;
343
+ readonly stages: Schema.optional<Schema.$Array<Schema.Struct<{
344
+ readonly id: Schema.brand<Schema.Trim, "StageId">;
345
+ readonly kind: Schema.Literals<readonly ["transform", "gate", "observe"]>;
346
+ readonly before: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
347
+ readonly after: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
348
+ readonly priority: Schema.withDecodingDefault<Schema.Number>;
349
+ readonly protected: Schema.withDecodingDefault<Schema.Boolean>;
277
350
  }>>>;
278
351
  readonly stageMutations: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
279
352
  readonly op: Schema.Literal<"insert">;
@@ -317,6 +390,27 @@ export declare const RigPlugin: Schema.Struct<{
317
390
  readonly after: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
318
391
  readonly contributedBy: Schema.optional<Schema.Trim>;
319
392
  }>]>>>;
393
+ readonly capabilities: Schema.optional<Schema.$Array<Schema.Struct<{
394
+ readonly id: Schema.String;
395
+ readonly title: Schema.String;
396
+ readonly description: Schema.optional<Schema.String>;
397
+ readonly commandId: Schema.optional<Schema.String>;
398
+ readonly panelId: Schema.optional<Schema.String>;
399
+ }>>>;
400
+ readonly panels: Schema.optional<Schema.$Array<Schema.Struct<{
401
+ readonly id: Schema.String;
402
+ readonly slot: Schema.String;
403
+ readonly title: Schema.String;
404
+ readonly capabilityId: Schema.optional<Schema.String>;
405
+ readonly badge: Schema.optional<Schema.String>;
406
+ readonly disabled: Schema.optional<Schema.Boolean>;
407
+ readonly description: Schema.optional<Schema.String>;
408
+ }>>>;
409
+ readonly blockerClassifiers: Schema.optional<Schema.$Array<Schema.Struct<{
410
+ readonly id: Schema.String;
411
+ readonly description: Schema.optional<Schema.String>;
412
+ readonly priority: Schema.optional<Schema.Number>;
413
+ }>>>;
320
414
  }>>;
321
415
  }>;
322
416
  export type RigPlugin = typeof RigPlugin.Type;
@@ -60,6 +60,7 @@ var StageDescriptor = Schema2.Struct({
60
60
  priority: Schema2.Number.pipe(Schema2.withDecodingDefault(() => 0)),
61
61
  protected: Schema2.Boolean.pipe(Schema2.withDecodingDefault(() => false))
62
62
  });
63
+ var Stage = StageDescriptor;
63
64
  var StageContinueResult = Schema2.Struct({
64
65
  kind: Schema2.Literal("continue"),
65
66
  ctx: StageContext
@@ -118,7 +119,7 @@ var StageMutation = Schema2.Union([
118
119
  ReorderStageMutation
119
120
  ]);
120
121
  var ResolutionGrantUse = Schema2.Struct({
121
- kind: Schema2.Literals(["protected-stage", "kernel-replacement"]),
122
+ kind: Schema2.Literal("kernel-replacement"),
122
123
  target: TrimmedNonEmptyString,
123
124
  pluginId: TrimmedNonEmptyString
124
125
  });
@@ -179,13 +180,6 @@ var LoadedPluginDescriptor = Schema3.Struct({
179
180
  contributes: Schema3.Unknown,
180
181
  runtime: Schema3.Unknown
181
182
  });
182
- var ProtectedStageGrant = Schema3.Struct({
183
- stageId: TrimmedNonEmptyString,
184
- pluginId: TrimmedNonEmptyString,
185
- operations: Schema3.Array(Schema3.Literals(["remove", "replace"])),
186
- grantedBy: Schema3.optional(TrimmedNonEmptyString),
187
- reason: Schema3.optional(Schema3.String)
188
- });
189
183
  var KernelReplacementGrant = Schema3.Struct({
190
184
  pluginId: TrimmedNonEmptyString,
191
185
  grantedBy: Schema3.optional(TrimmedNonEmptyString),
@@ -193,14 +187,12 @@ var KernelReplacementGrant = Schema3.Struct({
193
187
  });
194
188
  var CapabilityGrants = Schema3.Struct({
195
189
  capabilityPrecedence: Schema3.optional(Schema3.Record(Schema3.String, Schema3.Array(TrimmedNonEmptyString))),
196
- protectedStageGrants: Schema3.optional(Schema3.Array(ProtectedStageGrant)),
197
190
  kernelReplacementGrants: Schema3.optional(Schema3.Array(KernelReplacementGrant))
198
191
  });
199
192
  var KernelBootErrorCode = Schema3.Literals([
200
193
  "BootIncoherent",
201
194
  "AmbiguousCapability",
202
195
  "MissingCapability",
203
- "ProtectedStageViolation",
204
196
  "KernelReplacementDenied",
205
197
  "PipelineUnresolvable"
206
198
  ]);
@@ -305,9 +297,34 @@ var TaskSourceRegistration = Schema4.Struct({
305
297
  });
306
298
  var CliCommandRegistration = Schema4.Struct({
307
299
  id: Schema4.String,
308
- command: Schema4.String,
300
+ family: Schema4.optional(Schema4.String),
301
+ command: Schema4.optional(Schema4.String),
302
+ description: Schema4.optional(Schema4.String),
303
+ usage: Schema4.optional(Schema4.String),
304
+ aliases: Schema4.optional(Schema4.Array(Schema4.String)),
305
+ projectRequired: Schema4.optional(Schema4.Boolean)
306
+ });
307
+ var ProductCapabilityRegistration = Schema4.Struct({
308
+ id: Schema4.String,
309
+ title: Schema4.String,
310
+ description: Schema4.optional(Schema4.String),
311
+ commandId: Schema4.optional(Schema4.String),
312
+ panelId: Schema4.optional(Schema4.String)
313
+ });
314
+ var PanelRegistration = Schema4.Struct({
315
+ id: Schema4.String,
316
+ slot: Schema4.String,
317
+ title: Schema4.String,
318
+ capabilityId: Schema4.optional(Schema4.String),
319
+ badge: Schema4.optional(Schema4.String),
320
+ disabled: Schema4.optional(Schema4.Boolean),
309
321
  description: Schema4.optional(Schema4.String)
310
322
  });
323
+ var BlockerClassifierRegistration = Schema4.Struct({
324
+ id: Schema4.String,
325
+ description: Schema4.optional(Schema4.String),
326
+ priority: Schema4.optional(Schema4.Number)
327
+ });
311
328
  var PluginContributes = Schema4.Struct({
312
329
  validators: Schema4.optional(Schema4.Array(ValidatorRegistration)),
313
330
  hooks: Schema4.optional(Schema4.Array(HookRegistration)),
@@ -317,7 +334,11 @@ var PluginContributes = Schema4.Struct({
317
334
  taskFieldSchemas: Schema4.optional(Schema4.Array(TaskFieldExtension)),
318
335
  taskSources: Schema4.optional(Schema4.Array(TaskSourceRegistration)),
319
336
  cliCommands: Schema4.optional(Schema4.Array(CliCommandRegistration)),
320
- stageMutations: Schema4.optional(Schema4.Array(StageMutation))
337
+ stages: Schema4.optional(Schema4.Array(Stage)),
338
+ stageMutations: Schema4.optional(Schema4.Array(StageMutation)),
339
+ capabilities: Schema4.optional(Schema4.Array(ProductCapabilityRegistration)),
340
+ panels: Schema4.optional(Schema4.Array(PanelRegistration)),
341
+ blockerClassifiers: Schema4.optional(Schema4.Array(BlockerClassifierRegistration))
321
342
  });
322
343
  var RigPlugin = Schema4.Struct({
323
344
  name: Schema4.String,
@@ -336,11 +357,14 @@ export {
336
357
  SkillRegistration,
337
358
  RigPlugin,
338
359
  RepoSourceRegistration,
360
+ ProductCapabilityRegistration,
339
361
  PluginContributes,
362
+ PanelRegistration,
340
363
  HookRegistration,
341
364
  HookMatcher,
342
365
  HookEvent,
343
366
  CliCommandRegistration,
367
+ BlockerClassifierRegistration,
344
368
  AgentSessionHookEvent,
345
369
  AgentRoleRegistration
346
370
  };
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { RunStatus } from "./runtime";
3
+ import { ResolvedPipeline, StageRunOutcome } from "./stage";
3
4
  /** Who caused a journal event. Operator ids come from the authenticated WS/HTTP principal. */
4
5
  export declare const RunActor: Schema.Struct<{
5
6
  readonly kind: Schema.Literals<readonly ["operator", "agent", "server", "system"]>;
@@ -355,6 +356,61 @@ export declare const RunCloseoutPhaseEvent: Schema.Struct<{
355
356
  readonly runId: Schema.brand<Schema.Trim, "RunId">;
356
357
  }>;
357
358
  export type RunCloseoutPhaseEvent = typeof RunCloseoutPhaseEvent.Type;
359
+ export declare const RunPipelineResolvedEvent: Schema.Struct<{
360
+ readonly type: Schema.Literal<"pipeline-resolved">;
361
+ readonly pipeline: Schema.Struct<{
362
+ readonly runId: Schema.optional<Schema.brand<Schema.Trim, "RunId">>;
363
+ readonly order: Schema.$Array<Schema.brand<Schema.Trim, "StageId">>;
364
+ readonly record: Schema.$Array<Schema.Struct<{
365
+ readonly stageId: Schema.brand<Schema.Trim, "StageId">;
366
+ readonly contributedBy: Schema.Trim;
367
+ readonly removedBy: Schema.optional<Schema.Trim>;
368
+ readonly replacedBy: Schema.optional<Schema.Trim>;
369
+ readonly wrappedBy: Schema.optional<Schema.$Array<Schema.Trim>>;
370
+ readonly droppedAnchors: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
371
+ readonly isProtected: Schema.Boolean;
372
+ }>>;
373
+ readonly cycles: Schema.$Array<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
374
+ readonly grantUses: Schema.optional<Schema.$Array<Schema.Struct<{
375
+ readonly kind: Schema.Literal<"kernel-replacement">;
376
+ readonly target: Schema.Trim;
377
+ readonly pluginId: Schema.Trim;
378
+ }>>>;
379
+ readonly resolvedAt: Schema.optional<Schema.String>;
380
+ }>;
381
+ readonly v: Schema.Literal<1>;
382
+ readonly seq: Schema.Int;
383
+ readonly at: Schema.String;
384
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
385
+ }>;
386
+ export type RunPipelineResolvedEvent = typeof RunPipelineResolvedEvent.Type;
387
+ export declare const RunStageOutcomeEvent: Schema.Struct<{
388
+ readonly type: Schema.Literal<"stage-outcome">;
389
+ readonly outcome: Schema.Struct<{
390
+ readonly stageId: Schema.brand<Schema.Trim, "StageId">;
391
+ readonly result: Schema.Union<readonly [Schema.Struct<{
392
+ readonly kind: Schema.Literal<"continue">;
393
+ readonly ctx: Schema.Struct<{
394
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
395
+ readonly taskId: Schema.optional<Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>>;
396
+ readonly state: Schema.Unknown;
397
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
398
+ }>;
399
+ }>, Schema.Struct<{
400
+ readonly kind: Schema.Literal<"allow">;
401
+ }>, Schema.Struct<{
402
+ readonly kind: Schema.Literal<"block">;
403
+ readonly reason: Schema.Trim;
404
+ }>]>;
405
+ readonly startedAt: Schema.String;
406
+ readonly finishedAt: Schema.String;
407
+ }>;
408
+ readonly v: Schema.Literal<1>;
409
+ readonly seq: Schema.Int;
410
+ readonly at: Schema.String;
411
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
412
+ }>;
413
+ export type RunStageOutcomeEvent = typeof RunStageOutcomeEvent.Type;
358
414
  export declare const RunJournalEvent: Schema.Union<readonly [Schema.Struct<{
359
415
  readonly type: Schema.Literal<"status-changed">;
360
416
  readonly from: Schema.NullOr<Schema.Literals<readonly ["created", "queued", "preparing", "running", "waiting-approval", "waiting-user-input", "paused", "validating", "reviewing", "closing-out", "needs-attention", "completed", "failed", "stopped"]>>;
@@ -526,6 +582,57 @@ export declare const RunJournalEvent: Schema.Union<readonly [Schema.Struct<{
526
582
  readonly seq: Schema.Int;
527
583
  readonly at: Schema.String;
528
584
  readonly runId: Schema.brand<Schema.Trim, "RunId">;
585
+ }>, Schema.Struct<{
586
+ readonly type: Schema.Literal<"pipeline-resolved">;
587
+ readonly pipeline: Schema.Struct<{
588
+ readonly runId: Schema.optional<Schema.brand<Schema.Trim, "RunId">>;
589
+ readonly order: Schema.$Array<Schema.brand<Schema.Trim, "StageId">>;
590
+ readonly record: Schema.$Array<Schema.Struct<{
591
+ readonly stageId: Schema.brand<Schema.Trim, "StageId">;
592
+ readonly contributedBy: Schema.Trim;
593
+ readonly removedBy: Schema.optional<Schema.Trim>;
594
+ readonly replacedBy: Schema.optional<Schema.Trim>;
595
+ readonly wrappedBy: Schema.optional<Schema.$Array<Schema.Trim>>;
596
+ readonly droppedAnchors: Schema.optional<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
597
+ readonly isProtected: Schema.Boolean;
598
+ }>>;
599
+ readonly cycles: Schema.$Array<Schema.$Array<Schema.brand<Schema.Trim, "StageId">>>;
600
+ readonly grantUses: Schema.optional<Schema.$Array<Schema.Struct<{
601
+ readonly kind: Schema.Literal<"kernel-replacement">;
602
+ readonly target: Schema.Trim;
603
+ readonly pluginId: Schema.Trim;
604
+ }>>>;
605
+ readonly resolvedAt: Schema.optional<Schema.String>;
606
+ }>;
607
+ readonly v: Schema.Literal<1>;
608
+ readonly seq: Schema.Int;
609
+ readonly at: Schema.String;
610
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
611
+ }>, Schema.Struct<{
612
+ readonly type: Schema.Literal<"stage-outcome">;
613
+ readonly outcome: Schema.Struct<{
614
+ readonly stageId: Schema.brand<Schema.Trim, "StageId">;
615
+ readonly result: Schema.Union<readonly [Schema.Struct<{
616
+ readonly kind: Schema.Literal<"continue">;
617
+ readonly ctx: Schema.Struct<{
618
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
619
+ readonly taskId: Schema.optional<Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>>;
620
+ readonly state: Schema.Unknown;
621
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
622
+ }>;
623
+ }>, Schema.Struct<{
624
+ readonly kind: Schema.Literal<"allow">;
625
+ }>, Schema.Struct<{
626
+ readonly kind: Schema.Literal<"block">;
627
+ readonly reason: Schema.Trim;
628
+ }>]>;
629
+ readonly startedAt: Schema.String;
630
+ readonly finishedAt: Schema.String;
631
+ }>;
632
+ readonly v: Schema.Literal<1>;
633
+ readonly seq: Schema.Int;
634
+ readonly at: Schema.String;
635
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
529
636
  }>]>;
530
637
  export type RunJournalEvent = typeof RunJournalEvent.Type;
531
638
  export declare const decodeRunJournalEvent: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => {
@@ -701,6 +808,59 @@ export declare const decodeRunJournalEvent: (input: unknown, options?: import("e
701
808
  readonly seq: number;
702
809
  readonly outcome: "completed" | "failed" | "started";
703
810
  readonly detail?: string | null | undefined;
811
+ } | {
812
+ readonly at: string;
813
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
814
+ readonly v: 1;
815
+ readonly pipeline: {
816
+ readonly order: readonly (string & import("effect/Brand").Brand<"StageId">)[];
817
+ readonly record: readonly {
818
+ readonly contributedBy: string;
819
+ readonly stageId: string & import("effect/Brand").Brand<"StageId">;
820
+ readonly isProtected: boolean;
821
+ readonly removedBy?: string | undefined;
822
+ readonly replacedBy?: string | undefined;
823
+ readonly wrappedBy?: readonly string[] | undefined;
824
+ readonly droppedAnchors?: readonly (string & import("effect/Brand").Brand<"StageId">)[] | undefined;
825
+ }[];
826
+ readonly cycles: readonly (readonly (string & import("effect/Brand").Brand<"StageId">)[])[];
827
+ readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
828
+ readonly grantUses?: readonly {
829
+ readonly kind: "kernel-replacement";
830
+ readonly target: string;
831
+ readonly pluginId: string;
832
+ }[] | undefined;
833
+ readonly resolvedAt?: string | undefined;
834
+ };
835
+ readonly type: "pipeline-resolved";
836
+ readonly seq: number;
837
+ } | {
838
+ readonly at: string;
839
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
840
+ readonly v: 1;
841
+ readonly type: "stage-outcome";
842
+ readonly seq: number;
843
+ readonly outcome: {
844
+ readonly stageId: string & import("effect/Brand").Brand<"StageId">;
845
+ readonly result: {
846
+ readonly kind: "continue";
847
+ readonly ctx: {
848
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
849
+ readonly state: unknown;
850
+ readonly taskId?: (string & import("effect/Brand").Brand<"TaskId">) | null | undefined;
851
+ readonly metadata?: {
852
+ readonly [x: string]: unknown;
853
+ } | undefined;
854
+ };
855
+ } | {
856
+ readonly kind: "allow";
857
+ } | {
858
+ readonly kind: "block";
859
+ readonly reason: string;
860
+ };
861
+ readonly startedAt: string;
862
+ readonly finishedAt: string;
863
+ };
704
864
  };
705
865
  export declare const RUN_STATUS_TRANSITIONS: Readonly<Record<RunStatus, readonly RunStatus[]>>;
706
866
  export declare const TERMINAL_RUN_STATUSES: readonly RunStatus[];
@@ -757,6 +917,12 @@ export type RunJournalProjection = {
757
917
  outcome: RunCloseoutPhaseOutcome;
758
918
  detail: string | null;
759
919
  }>;
920
+ resolvedPipeline: ResolvedPipeline | null;
921
+ stageOutcomes: ReadonlyArray<{
922
+ seq: number;
923
+ at: string;
924
+ outcome: StageRunOutcome;
925
+ }>;
760
926
  lastSeq: number;
761
927
  lastEventAt: string | null;
762
928
  anomalies: ReadonlyArray<RunJournalAnomaly>;