@atolis-hq/wake 0.4.104 → 0.4.106
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/src/activities/agent/agent-activity.js +10 -0
- package/dist/src/activities/contracts/activity.d.ts +28 -0
- package/dist/src/activities/contracts/event-schema.d.ts +314 -8
- package/dist/src/activities/contracts/event-schema.js +20 -2
- package/dist/src/activities/contracts/events.d.ts +10 -0
- package/dist/src/activities/contracts/vocabulary.d.ts +2 -0
- package/dist/src/activities/contracts/vocabulary.js +2 -0
- package/dist/src/activities/index.d.ts +2 -0
- package/dist/src/activities/index.js +2 -0
- package/dist/src/activities/pr/activity-support.d.ts +1 -1
- package/dist/src/activities/pr/activity-support.js +10 -0
- package/dist/src/activities/pr/application.js +8 -1
- package/dist/src/activities/pr/approve.d.ts +2 -1
- package/dist/src/activities/pr/approve.js +33 -11
- package/dist/src/activities/pr/check-evidence.d.ts +10 -0
- package/dist/src/activities/pr/check-evidence.js +16 -0
- package/dist/src/activities/pr/contracts.d.ts +14 -0
- package/dist/src/activities/pr/event-data.js +5 -1
- package/dist/src/activities/pr/merge.d.ts +2 -1
- package/dist/src/activities/pr/merge.js +54 -38
- package/dist/src/activities/pr/parent-scope.d.ts +65 -0
- package/dist/src/activities/pr/parent-scope.js +24 -0
- package/dist/src/activities/pr/parent-target.d.ts +45 -0
- package/dist/src/activities/pr/parent-target.js +59 -0
- package/dist/src/activities/pr/projection.js +10 -2
- package/dist/src/activities/pr/vocabulary.d.ts +8 -0
- package/dist/src/activities/pr/vocabulary.js +8 -0
- package/dist/src/bootstrap/activity-registry.d.ts +2 -2
- package/dist/src/bootstrap/activity-registry.js +3 -3
- package/dist/src/bootstrap/composition-root.js +11 -2
- package/dist/src/bootstrap/config/root-schema.d.ts +22 -0
- package/dist/src/bootstrap/delegation-authority.js +17 -0
- package/dist/src/bootstrap/delivery-integration.d.ts +9 -0
- package/dist/src/bootstrap/delivery-integration.js +46 -0
- package/dist/src/bootstrap/surface-api-delivery.js +52 -0
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/control-plane/application/activation-scheduler-ports.d.ts +5 -1
- package/dist/src/control-plane/application/advance-once-dispatch.js +12 -6
- package/dist/src/execution/application/candidate-workspaces.d.ts +13 -0
- package/dist/src/execution/application/candidate-workspaces.js +75 -0
- package/dist/src/execution/application/execution-service.js +37 -11
- package/dist/src/execution/application/maintenance-workspaces.d.ts +17 -0
- package/dist/src/execution/application/maintenance-workspaces.js +84 -0
- package/dist/src/execution/application/run-lifecycle.js +2 -0
- package/dist/src/execution/contracts/candidate.d.ts +31 -0
- package/dist/src/execution/contracts/candidate.js +40 -0
- package/dist/src/execution/contracts/commands.d.ts +4 -0
- package/dist/src/execution/contracts/events.d.ts +24 -0
- package/dist/src/execution/contracts/events.js +4 -0
- package/dist/src/execution/contracts/maintenance.d.ts +36 -0
- package/dist/src/execution/contracts/maintenance.js +44 -0
- package/dist/src/execution/contracts/repository-assignment.d.ts +5 -0
- package/dist/src/execution/contracts/repository-assignment.js +8 -0
- package/dist/src/execution/contracts/views.d.ts +4 -0
- package/dist/src/execution/contracts/vocabulary.d.ts +5 -0
- package/dist/src/execution/contracts/vocabulary.js +4 -0
- package/dist/src/execution/contracts/workspace.d.ts +8 -0
- package/dist/src/execution/index.d.ts +2 -0
- package/dist/src/execution/index.js +2 -0
- package/dist/src/execution/infrastructure/workspace/git-source.d.ts +2 -2
- package/dist/src/execution/infrastructure/workspace/git-source.js +18 -1
- package/dist/src/execution/infrastructure/workspace/git-workspace.d.ts +2 -4
- package/dist/src/execution/infrastructure/workspace/git-workspace.js +12 -1
- package/dist/src/integrations/application/delegation-outputs.js +1 -1
- package/dist/src/integrations/application/delivery-integration-verification.d.ts +13 -0
- package/dist/src/integrations/application/delivery-integration-verification.js +68 -0
- package/dist/src/integrations/delivery/application/delivery-projector.js +3 -0
- package/dist/src/integrations/delivery/application/merged-delivery-evidence.js +9 -1
- package/dist/src/integrations/delivery/contracts/views.d.ts +2 -0
- package/dist/src/integrations/fake/external-source.d.ts +5 -2
- package/dist/src/integrations/fake/external-source.js +12 -2
- package/dist/src/integrations/fake/inbound-translator.js +7 -2
- package/dist/src/integrations/fake/provider.d.ts +17 -0
- package/dist/src/integrations/fake/provider.js +18 -2
- package/dist/src/integrations/github/application/pull-request-translation.js +2 -0
- package/dist/src/integrations/github/contracts/events.d.ts +3 -1
- package/dist/src/integrations/github/contracts/events.js +3 -1
- package/dist/src/integrations/github/contracts/payloads.d.ts +23 -0
- package/dist/src/integrations/github/infrastructure/check-execution.d.ts +9 -0
- package/dist/src/integrations/github/infrastructure/check-execution.js +68 -0
- package/dist/src/integrations/github/infrastructure/checkout-revision.d.ts +2 -0
- package/dist/src/integrations/github/infrastructure/checkout-revision.js +23 -0
- package/dist/src/integrations/github/infrastructure/client.d.ts +2 -0
- package/dist/src/integrations/github/infrastructure/client.js +4 -0
- package/dist/src/integrations/github/infrastructure/pr-check-subject.d.ts +7 -0
- package/dist/src/integrations/github/infrastructure/pr-check-subject.js +77 -0
- package/dist/src/integrations/github/infrastructure/pr-evidence.d.ts +6 -3
- package/dist/src/integrations/github/infrastructure/pr-evidence.js +1 -1
- package/dist/src/integrations/github/infrastructure/pr-source.d.ts +3 -5
- package/dist/src/integrations/github/infrastructure/pr-source.js +11 -1
- package/dist/src/integrations/github/infrastructure/workflow-run-evidence.d.ts +5 -0
- package/dist/src/integrations/github/infrastructure/workflow-run-evidence.js +22 -0
- package/dist/src/integrations/index.d.ts +1 -0
- package/dist/src/integrations/index.js +1 -0
- package/dist/src/orchestration/application/delegated-work.d.ts +5 -0
- package/dist/src/orchestration/application/delegated-work.js +10 -0
- package/dist/src/orchestration/application/delegation-commands.d.ts +16 -0
- package/dist/src/orchestration/application/delivery-coordinator.d.ts +348 -0
- package/dist/src/orchestration/application/delivery-coordinator.js +239 -0
- package/dist/src/orchestration/application/delivery-facts-reader.d.ts +9 -0
- package/dist/src/orchestration/application/delivery-facts-reader.js +47 -0
- package/dist/src/orchestration/application/delivery-integration-reader.d.ts +9 -0
- package/dist/src/orchestration/application/delivery-integration-reader.js +23 -0
- package/dist/src/orchestration/application/delivery-integration-service.d.ts +50 -0
- package/dist/src/orchestration/application/delivery-integration-service.js +228 -0
- package/dist/src/orchestration/application/delivery-preparation.d.ts +16 -0
- package/dist/src/orchestration/application/delivery-preparation.js +105 -0
- package/dist/src/orchestration/application/delivery-sources.d.ts +10 -0
- package/dist/src/orchestration/application/delivery-sources.js +41 -0
- package/dist/src/orchestration/application/orchestration-repository.d.ts +3 -1
- package/dist/src/orchestration/application/orchestration-repository.js +10 -1
- package/dist/src/orchestration/application/orchestration-service.d.ts +341 -2
- package/dist/src/orchestration/application/orchestration-service.js +86 -4
- package/dist/src/orchestration/contracts/config.d.ts +22 -0
- package/dist/src/orchestration/contracts/config.js +13 -1
- package/dist/src/orchestration/contracts/delegation-ports.d.ts +4 -0
- package/dist/src/orchestration/contracts/delegation.d.ts +13 -1
- package/dist/src/orchestration/contracts/delegation.js +5 -0
- package/dist/src/orchestration/contracts/delivery-ports.d.ts +53 -0
- package/dist/src/orchestration/contracts/delivery-ports.js +1 -0
- package/dist/src/orchestration/contracts/delivery.d.ts +310 -0
- package/dist/src/orchestration/contracts/delivery.js +186 -0
- package/dist/src/orchestration/contracts/event-decoder.js +14 -1
- package/dist/src/orchestration/contracts/event-factory.js +8 -0
- package/dist/src/orchestration/contracts/events.d.ts +10 -0
- package/dist/src/orchestration/contracts/events.js +4 -0
- package/dist/src/orchestration/contracts/views.d.ts +3 -0
- package/dist/src/orchestration/contracts/vocabulary.d.ts +90 -0
- package/dist/src/orchestration/contracts/vocabulary.js +82 -0
- package/dist/src/orchestration/domain/compile-diagnostics.d.ts +1 -1
- package/dist/src/orchestration/domain/compile-diagnostics.js +5 -0
- package/dist/src/orchestration/domain/compiler.js +2 -0
- package/dist/src/orchestration/domain/delivery-candidate.d.ts +9 -0
- package/dist/src/orchestration/domain/delivery-candidate.js +105 -0
- package/dist/src/orchestration/domain/delivery-facts.d.ts +89 -0
- package/dist/src/orchestration/domain/delivery-facts.js +66 -0
- package/dist/src/orchestration/domain/delivery-integration-policy.d.ts +7 -0
- package/dist/src/orchestration/domain/delivery-integration-policy.js +15 -0
- package/dist/src/orchestration/domain/delivery-integration.d.ts +54 -0
- package/dist/src/orchestration/domain/delivery-integration.js +144 -0
- package/dist/src/orchestration/domain/delivery-qa.d.ts +33 -0
- package/dist/src/orchestration/domain/delivery-qa.js +97 -0
- package/dist/src/orchestration/domain/delivery-replacement.d.ts +9 -0
- package/dist/src/orchestration/domain/delivery-replacement.js +54 -0
- package/dist/src/orchestration/domain/delivery-selection.d.ts +17 -0
- package/dist/src/orchestration/domain/delivery-selection.js +132 -0
- package/dist/src/orchestration/domain/delivery-workflow-policy.d.ts +6 -0
- package/dist/src/orchestration/domain/delivery-workflow-policy.js +32 -0
- package/dist/src/orchestration/domain/operator-retry-policy.js +24 -13
- package/dist/src/orchestration/domain/workflow-instance-events.d.ts +1 -0
- package/dist/src/orchestration/domain/workflow-instance-events.js +12 -0
- package/dist/src/orchestration/index.d.ts +3 -0
- package/dist/src/orchestration/index.js +1 -0
- package/dist/src/surfaces/api/contracts/transport-values.js +1 -0
- package/dist/src/surfaces/api/contracts/work.d.ts +42 -0
- package/dist/src/surfaces/api/presenters/execution.js +1 -0
- package/dist/src/surfaces/mcp/delegation.js +36 -1
- package/dist/src/surfaces/web-assets/assets/index-ih1h3dxC.js +1192 -0
- package/dist/src/surfaces/web-assets/index.html +1 -1
- package/package.json +1 -1
- package/dist/src/surfaces/web-assets/assets/index-C5R-aWzH.js +0 -1192
|
@@ -3,6 +3,7 @@ import { DeferredSignals } from './deferred-signals.js';
|
|
|
3
3
|
import { DelegatedWork } from './delegated-work.js';
|
|
4
4
|
import { DelegationCommands } from './delegation-commands.js';
|
|
5
5
|
import { DelegationGate } from './delegation-gate.js';
|
|
6
|
+
import { DeliveryCoordinator } from './delivery-coordinator.js';
|
|
6
7
|
import { expireTimedOutWaits } from './expire-timed-out-waits.js';
|
|
7
8
|
import { recoverPolicyBlockedMerges } from './policy-blocked-merge-recovery.js';
|
|
8
9
|
import { WorkStatus, } from '../../work/index.js';
|
|
@@ -29,6 +30,7 @@ export class OrchestrationService {
|
|
|
29
30
|
delegationCommands;
|
|
30
31
|
delegationGate;
|
|
31
32
|
delegatedWork;
|
|
33
|
+
delivery;
|
|
32
34
|
prerequisiteReasons = (ids, snapshot) => this.delegatedWork.prerequisites.reasons(ids, snapshot);
|
|
33
35
|
resumeClarification = (id, context) => this.advanceWorkflow.resumeNeedsClarificationStage(id, context);
|
|
34
36
|
repository;
|
|
@@ -51,7 +53,7 @@ export class OrchestrationService {
|
|
|
51
53
|
this.projections = projections;
|
|
52
54
|
this.journal = journal;
|
|
53
55
|
this.work = work;
|
|
54
|
-
const repository = new OrchestrationRepository(journal);
|
|
56
|
+
const repository = new OrchestrationRepository(journal, (id) => this.delivery.completionBlock(id));
|
|
55
57
|
this.repository = repository;
|
|
56
58
|
this.delegationGate = new DelegationGate(repository, work, delegation === undefined ? undefined : this.prerequisiteReasons);
|
|
57
59
|
const dependencies = delegation?.({
|
|
@@ -69,6 +71,7 @@ export class OrchestrationService {
|
|
|
69
71
|
resumeChild: this.resumeClarification,
|
|
70
72
|
});
|
|
71
73
|
this.delegationCommands = new DelegationCommands(repository, work, this.startWorkflow, this.definitions, this.delegatedWork, dependencies?.authority ?? unavailableDelegationAuthority);
|
|
74
|
+
this.delivery = new DeliveryCoordinator(repository, deliveryDependencies(dependencies, async (parent) => this.startWorkflow.definitionFor(parent), work));
|
|
72
75
|
this.advanceWorkflow = new AdvanceWorkflow(repository, this.startWorkflow, (command, context) => this.acceptOutcome(command, context), isAgentActivity);
|
|
73
76
|
this.acceptWorkflowSignal = new AcceptSignal(repository, this.startWorkflow, work);
|
|
74
77
|
this.deferredSignals = new DeferredSignals(repository, (id, signal, context) => this.delegationGate.run(id, () => this.acceptWorkflowSignal.execute(id, signal, context)), (id, target, evidenceId, context) => this.delegationGate.run(id, () => this.advanceWorkflow.applyResourceTransition(id, target, evidenceId, context)), (ids) => this.delegationGate.fencedAmong(ids));
|
|
@@ -79,6 +82,12 @@ export class OrchestrationService {
|
|
|
79
82
|
await this.deferredSignals.reconcile(context);
|
|
80
83
|
});
|
|
81
84
|
}
|
|
85
|
+
deliveryStateFor(workflowInstanceId) {
|
|
86
|
+
return this.delivery.inspect(workflowInstanceId);
|
|
87
|
+
}
|
|
88
|
+
deliveryQaPreparation(workflowInstanceId) {
|
|
89
|
+
return this.delivery.prepare(workflowInstanceId);
|
|
90
|
+
}
|
|
82
91
|
repositoryAuthority(workItemId) {
|
|
83
92
|
return this.delegatedWork.repositoryScope(workItemId);
|
|
84
93
|
}
|
|
@@ -90,11 +99,56 @@ export class OrchestrationService {
|
|
|
90
99
|
(item === undefined || view.workItemId === item) &&
|
|
91
100
|
view.acceptedOutcomes.some((accepted) => accepted === id));
|
|
92
101
|
}
|
|
93
|
-
submitDelegation(caller, input, context) {
|
|
102
|
+
async submitDelegation(caller, input, context) {
|
|
103
|
+
await this.delivery.assertReplacements(caller, input);
|
|
94
104
|
return this.delegationCommands.submit(caller, input, context);
|
|
95
105
|
}
|
|
96
|
-
|
|
97
|
-
return this.
|
|
106
|
+
selectDelivery(caller, input, context) {
|
|
107
|
+
return this.delivery.select(caller, input, context);
|
|
108
|
+
}
|
|
109
|
+
recordDeliveryCandidate(caller, input, context) {
|
|
110
|
+
return this.delivery.recordCandidate(caller, input, context);
|
|
111
|
+
}
|
|
112
|
+
recordDeliveryQa(caller, input, context) {
|
|
113
|
+
return this.delivery.recordQa(caller, input, context);
|
|
114
|
+
}
|
|
115
|
+
recordDeliveryMaintenance(caller, input, context) {
|
|
116
|
+
return this.delivery.recordMaintenance(caller, input, context);
|
|
117
|
+
}
|
|
118
|
+
authorizeParentAction(request) {
|
|
119
|
+
return this.delivery.authorizeParentAction(request);
|
|
120
|
+
}
|
|
121
|
+
/** The branch leases Execution must hold for the configured maintenance stage's activation. */
|
|
122
|
+
async deliveryMaintenancePreparation(workflowInstanceId) {
|
|
123
|
+
const targets = await this.delivery.maintenanceTargets(workflowInstanceId);
|
|
124
|
+
if (targets === undefined || targets.length === 0)
|
|
125
|
+
return undefined;
|
|
126
|
+
const prepared = [];
|
|
127
|
+
for (const target of targets) {
|
|
128
|
+
// The same assignment that created the child's workspace, so its lease is reused exactly.
|
|
129
|
+
const repository = await this.delegatedWork.repositoryFor(target.ownerWorkItemId);
|
|
130
|
+
if (repository === undefined)
|
|
131
|
+
continue;
|
|
132
|
+
prepared.push({
|
|
133
|
+
childWorkItemId: target.ownerWorkItemId,
|
|
134
|
+
outputName: target.output.outputName,
|
|
135
|
+
resourceId: target.resourceId,
|
|
136
|
+
repository,
|
|
137
|
+
branch: target.branch,
|
|
138
|
+
revision: target.revision,
|
|
139
|
+
pullRequestBase: target.pullRequestBase,
|
|
140
|
+
...(target.maintenance === undefined
|
|
141
|
+
? {}
|
|
142
|
+
: { reason: `${target.maintenance}: ${target.detail ?? ''}`.trim() }),
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return prepared.length === 0 ? undefined : { targets: prepared };
|
|
146
|
+
}
|
|
147
|
+
async inspectDelegation(caller, context) {
|
|
148
|
+
return {
|
|
149
|
+
...(await this.delegationCommands.inspect(caller, context)),
|
|
150
|
+
delivery: await this.delivery.inspectFor(caller),
|
|
151
|
+
};
|
|
98
152
|
}
|
|
99
153
|
deliveryTree(id) {
|
|
100
154
|
return this.delegatedWork.inspect(id);
|
|
@@ -444,6 +498,34 @@ function isReviewConversationCommand(command) {
|
|
|
444
498
|
async function unavailableRunCompletion() {
|
|
445
499
|
throw new Error('Delegation adapters unavailable');
|
|
446
500
|
}
|
|
501
|
+
function deliveryDependencies(dependencies, definitionFor, work) {
|
|
502
|
+
return {
|
|
503
|
+
authority: dependencies?.authority ?? unavailableDelegationAuthority,
|
|
504
|
+
repositories: dependencies?.repositories,
|
|
505
|
+
integration: dependencies?.integration,
|
|
506
|
+
// A finished producing workflow (a Closed child) is deliberately not a hold.
|
|
507
|
+
unavailable: async (ids) => {
|
|
508
|
+
const snapshot = await work.deliverySnapshot();
|
|
509
|
+
const reasons = new Map();
|
|
510
|
+
for (const id of ids) {
|
|
511
|
+
const lineage = [id, ...(snapshot.get(id)?.delegation?.ancestors ?? [])];
|
|
512
|
+
const held = lineage.find((member) => {
|
|
513
|
+
const state = snapshot.get(member);
|
|
514
|
+
return (snapshot.invalid(member) ||
|
|
515
|
+
state === null ||
|
|
516
|
+
state.deleted === true ||
|
|
517
|
+
state.frozen === true ||
|
|
518
|
+
state.state === WorkStatus.Cancelled ||
|
|
519
|
+
(member !== id && state.state !== WorkStatus.Open));
|
|
520
|
+
});
|
|
521
|
+
if (held !== undefined)
|
|
522
|
+
reasons.set(id, `Delivery work ${held} is unavailable`);
|
|
523
|
+
}
|
|
524
|
+
return reasons;
|
|
525
|
+
},
|
|
526
|
+
definitionFor,
|
|
527
|
+
};
|
|
528
|
+
}
|
|
447
529
|
const unavailableArtifacts = {
|
|
448
530
|
validateInputs: unavailableRunCompletion,
|
|
449
531
|
registerChild: unavailableRunCompletion,
|
|
@@ -220,6 +220,17 @@ export declare const delegationPolicySchema: z.ZodObject<{
|
|
|
220
220
|
maxDepth: z.ZodNumber;
|
|
221
221
|
maxDescendants: z.ZodNumber;
|
|
222
222
|
maxConcurrentRuns: z.ZodNumber;
|
|
223
|
+
completion: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
readonly QaApproved: "qa-approved";
|
|
225
|
+
readonly MergeRequired: "merge-required";
|
|
226
|
+
}>>;
|
|
227
|
+
qa: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
stage: z.ZodString;
|
|
229
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strict>>;
|
|
231
|
+
maintenance: z.ZodOptional<z.ZodObject<{
|
|
232
|
+
stage: z.ZodString;
|
|
233
|
+
}, z.core.$strict>>;
|
|
223
234
|
}, z.core.$strict>;
|
|
224
235
|
export type DelegationPolicy = z.infer<typeof delegationPolicySchema>;
|
|
225
236
|
export declare const workflowDefinitionConfigSchema: z.ZodObject<{
|
|
@@ -230,6 +241,17 @@ export declare const workflowDefinitionConfigSchema: z.ZodObject<{
|
|
|
230
241
|
maxDepth: z.ZodNumber;
|
|
231
242
|
maxDescendants: z.ZodNumber;
|
|
232
243
|
maxConcurrentRuns: z.ZodNumber;
|
|
244
|
+
completion: z.ZodOptional<z.ZodEnum<{
|
|
245
|
+
readonly QaApproved: "qa-approved";
|
|
246
|
+
readonly MergeRequired: "merge-required";
|
|
247
|
+
}>>;
|
|
248
|
+
qa: z.ZodOptional<z.ZodObject<{
|
|
249
|
+
stage: z.ZodString;
|
|
250
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strict>>;
|
|
252
|
+
maintenance: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
stage: z.ZodString;
|
|
254
|
+
}, z.core.$strict>>;
|
|
233
255
|
}, z.core.$strict>>;
|
|
234
256
|
commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
235
257
|
activity: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ApprovalAuthorityKind, ConversationSurfaceCapability, WorkflowStatus, } from './vocabulary.js';
|
|
2
|
+
import { ApprovalAuthorityKind, ConversationSurfaceCapability, DeliveryCompletion, WorkflowStatus, } from './vocabulary.js';
|
|
3
3
|
import { ActivityEventType, PullRequestCheckState, PullRequestDenialCode, PullRequestMergeability, PullRequestState, } from '../../activities/index.js';
|
|
4
4
|
import { WorkspaceMode } from '../../execution/index.js';
|
|
5
5
|
import { MatchMode } from '../../kernel/index.js';
|
|
@@ -158,6 +158,18 @@ export const delegationPolicySchema = z
|
|
|
158
158
|
maxDepth: z.number().int().positive(),
|
|
159
159
|
maxDescendants: z.number().int().positive(),
|
|
160
160
|
maxConcurrentRuns: z.number().int().positive(),
|
|
161
|
+
/** Final gate for the parent: QA approval alone (default) or QA plus governed integration. */
|
|
162
|
+
completion: z.enum(DeliveryCompletion).optional(),
|
|
163
|
+
qa: z
|
|
164
|
+
.object({ stage: identifier, recipe: z.string().trim().min(1).optional() })
|
|
165
|
+
.strict()
|
|
166
|
+
.optional(),
|
|
167
|
+
/**
|
|
168
|
+
* The agent stage that retargets, rebases or repairs selected pull requests between planned
|
|
169
|
+
* merges. Wake leases each target's recorded branch workspace for it; the agent chooses the
|
|
170
|
+
* repair.
|
|
171
|
+
*/
|
|
172
|
+
maintenance: z.object({ stage: identifier }).strict().optional(),
|
|
161
173
|
})
|
|
162
174
|
.strict();
|
|
163
175
|
export const workflowDefinitionConfigSchema = z
|
|
@@ -15,6 +15,10 @@ export interface DelegationArtifacts {
|
|
|
15
15
|
qualifyingOutputs(child: WorkflowInstanceView, outputs: DelegatedAssignment['outputs']): Promise<DelegationResult['outputs'] | null>;
|
|
16
16
|
}
|
|
17
17
|
export interface DelegationAuthority {
|
|
18
|
+
assertQaCaller?(caller: DelegationCaller, candidateId: string, selectionRevision: number, revisions: readonly {
|
|
19
|
+
resourceId: string;
|
|
20
|
+
revision: string;
|
|
21
|
+
}[]): Promise<void>;
|
|
18
22
|
assertCaller(caller: DelegationCaller, parent: WorkflowInstanceView): Promise<void>;
|
|
19
23
|
repositories(parent: WorkflowInstanceView): Promise<readonly string[]>;
|
|
20
24
|
/**
|
|
@@ -56,6 +56,10 @@ export declare const delegatedAssignmentSchema: z.ZodObject<{
|
|
|
56
56
|
}>;
|
|
57
57
|
useAsBase: z.ZodOptional<z.ZodBoolean>;
|
|
58
58
|
}, z.core.$strict>>>;
|
|
59
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
cohortId: z.ZodString;
|
|
61
|
+
assignmentId: z.ZodString;
|
|
62
|
+
}, z.core.$strict>>;
|
|
59
63
|
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
60
64
|
name: z.ZodString;
|
|
61
65
|
path: z.ZodString;
|
|
@@ -81,8 +85,8 @@ export declare const delegationSubmissionSchema: z.ZodObject<{
|
|
|
81
85
|
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
82
86
|
revisionId: z.ZodString;
|
|
83
87
|
}, z.core.$strict>>;
|
|
84
|
-
assignmentId: z.ZodString;
|
|
85
88
|
criteria: z.ZodArray<z.ZodString>;
|
|
89
|
+
assignmentId: z.ZodString;
|
|
86
90
|
workflowName: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").WorkflowName, string>>;
|
|
87
91
|
repositoryResourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
92
|
prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -97,6 +101,10 @@ export declare const delegationSubmissionSchema: z.ZodObject<{
|
|
|
97
101
|
}>;
|
|
98
102
|
useAsBase: z.ZodOptional<z.ZodBoolean>;
|
|
99
103
|
}, z.core.$strict>>>;
|
|
104
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
cohortId: z.ZodString;
|
|
106
|
+
assignmentId: z.ZodString;
|
|
107
|
+
}, z.core.$strict>>;
|
|
100
108
|
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
101
109
|
name: z.ZodString;
|
|
102
110
|
path: z.ZodString;
|
|
@@ -145,6 +153,10 @@ export declare const delegationReservationSchema: z.ZodObject<{
|
|
|
145
153
|
}>;
|
|
146
154
|
useAsBase: z.ZodOptional<z.ZodBoolean>;
|
|
147
155
|
}, z.core.$strict>>>;
|
|
156
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
cohortId: z.ZodString;
|
|
158
|
+
assignmentId: z.ZodString;
|
|
159
|
+
}, z.core.$strict>>;
|
|
148
160
|
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
149
161
|
name: z.ZodString;
|
|
150
162
|
path: z.ZodString;
|
|
@@ -41,6 +41,11 @@ export const delegatedAssignmentSchema = z
|
|
|
41
41
|
context: z.array(delegationRevisionReferenceSchema),
|
|
42
42
|
repository: repositoryAssignmentRequestSchema.optional(),
|
|
43
43
|
prerequisites: z.array(delegationPrerequisiteSchema).optional(),
|
|
44
|
+
/** Names the original required assignment this corrective child replaces. */
|
|
45
|
+
replaces: z
|
|
46
|
+
.object({ cohortId: z.string().min(1), assignmentId: z.string().min(1) })
|
|
47
|
+
.strict()
|
|
48
|
+
.optional(),
|
|
44
49
|
outputs: z
|
|
45
50
|
.array(z.union([
|
|
46
51
|
z.object({ name: z.string().min(1), path: z.string().min(1) }).strict(),
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { PullRequestMergeability, PullRequestState } from '../../activities/index.js';
|
|
2
|
+
import type { CompiledWorkflow } from './config.js';
|
|
3
|
+
import type { DelegationAuthority, DelegationRepositories } from './delegation-ports.js';
|
|
4
|
+
import type { WorkflowInstanceView } from './views.js';
|
|
5
|
+
export interface DeliveryPullRequest {
|
|
6
|
+
readonly state: PullRequestState;
|
|
7
|
+
readonly headRevision: string;
|
|
8
|
+
readonly baseRevision: string;
|
|
9
|
+
readonly mergeRevision?: string | undefined;
|
|
10
|
+
readonly mergeability?: PullRequestMergeability | undefined;
|
|
11
|
+
}
|
|
12
|
+
/** Trusted Bootstrap adapters over provider-observed facts and Execution's Run records. */
|
|
13
|
+
export interface DeliveryIntegration {
|
|
14
|
+
/** The current provider-observed pull request, or null when it has not been observed. */
|
|
15
|
+
observe(resourceId: string): Promise<DeliveryPullRequest | null>;
|
|
16
|
+
verifyTarget(request: {
|
|
17
|
+
readonly ownerWorkItemId: string;
|
|
18
|
+
readonly resourceId: string;
|
|
19
|
+
readonly repositoryResourceId: string;
|
|
20
|
+
readonly branch: string;
|
|
21
|
+
readonly revision: string;
|
|
22
|
+
readonly pullRequestBase: string;
|
|
23
|
+
readonly baseRevision?: string | undefined;
|
|
24
|
+
readonly maintenanceRecordedAt?: string | undefined;
|
|
25
|
+
readonly maintenanceRunId?: string | undefined;
|
|
26
|
+
readonly requireReview: boolean;
|
|
27
|
+
readonly requireChecks: boolean;
|
|
28
|
+
}): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Proves the Run was durably prepared with the target's branch lease, and that no earlier
|
|
31
|
+
* maintenance Run of the same target is still unresolved or ambiguous.
|
|
32
|
+
*/
|
|
33
|
+
assertMaintenanceWriter(request: {
|
|
34
|
+
readonly workflowInstanceId: string;
|
|
35
|
+
readonly activationId: string;
|
|
36
|
+
readonly runId: string;
|
|
37
|
+
readonly childWorkItemId: string;
|
|
38
|
+
readonly resourceId: string;
|
|
39
|
+
readonly revision: string;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export interface DeliveryDependencies {
|
|
43
|
+
readonly authority: DelegationAuthority;
|
|
44
|
+
/** Resolves a repository source through the parent's own repository authority. */
|
|
45
|
+
readonly repositories?: DelegationRepositories | undefined;
|
|
46
|
+
readonly integration?: DeliveryIntegration | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Reasons integration must not touch a child's output: the child or any ancestor is frozen,
|
|
49
|
+
* cancelled or deleted. A finished producing workflow is not a reason.
|
|
50
|
+
*/
|
|
51
|
+
readonly unavailable?: ((childWorkItemIds: readonly string[]) => Promise<ReadonlyMap<string, string>>) | undefined;
|
|
52
|
+
readonly definitionFor: (parent: WorkflowInstanceView) => Promise<CompiledWorkflow>;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { StageName } from './identifiers.js';
|
|
3
|
+
import { type DeliveryRejection } from './vocabulary.js';
|
|
4
|
+
export declare const deliveryOutputKeySchema: z.ZodObject<{
|
|
5
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
6
|
+
outputName: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type DeliveryOutputKey = z.infer<typeof deliveryOutputKeySchema>;
|
|
9
|
+
export declare const deliverySelectionEntrySchema: z.ZodObject<{
|
|
10
|
+
cohortId: z.ZodString;
|
|
11
|
+
assignmentId: z.ZodString;
|
|
12
|
+
output: z.ZodObject<{
|
|
13
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
14
|
+
outputName: z.ZodString;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
18
|
+
outputName: z.ZodString;
|
|
19
|
+
}, z.core.$strict>>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
/** Agent input: the complete current selection, so an omitted requirement cannot be waived. */
|
|
22
|
+
export declare const deliverySelectionCommandSchema: z.ZodObject<{
|
|
23
|
+
requestId: z.ZodString;
|
|
24
|
+
expectedRevision: z.ZodNumber;
|
|
25
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
26
|
+
cohortId: z.ZodString;
|
|
27
|
+
assignmentId: z.ZodString;
|
|
28
|
+
output: z.ZodObject<{
|
|
29
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
30
|
+
outputName: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
34
|
+
outputName: z.ZodString;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type DeliverySelectionCommand = z.infer<typeof deliverySelectionCommandSchema>;
|
|
39
|
+
export declare const selectedEntrySchema: z.ZodObject<{
|
|
40
|
+
cohortId: z.ZodString;
|
|
41
|
+
assignmentId: z.ZodString;
|
|
42
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
43
|
+
output: z.ZodObject<{
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
reference: z.ZodUnion<readonly [z.ZodObject<{
|
|
46
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
47
|
+
revisionId: z.ZodString;
|
|
48
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
49
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
50
|
+
resourceId: z.ZodString;
|
|
51
|
+
repositoryResourceId: z.ZodString;
|
|
52
|
+
revision: z.ZodString;
|
|
53
|
+
branch: z.ZodString;
|
|
54
|
+
pullRequestBase: z.ZodString;
|
|
55
|
+
runId: z.ZodString;
|
|
56
|
+
baseRevision: z.ZodOptional<z.ZodString>;
|
|
57
|
+
merged: z.ZodOptional<z.ZodLiteral<true>>;
|
|
58
|
+
}, z.core.$strict>]>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
62
|
+
outputName: z.ZodString;
|
|
63
|
+
}, z.core.$strict>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
export type SelectedEntry = z.infer<typeof selectedEntrySchema>;
|
|
66
|
+
export declare const deliverySelectionSchema: z.ZodObject<{
|
|
67
|
+
requestId: z.ZodString;
|
|
68
|
+
revision: z.ZodNumber;
|
|
69
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
70
|
+
cohortId: z.ZodString;
|
|
71
|
+
assignmentId: z.ZodString;
|
|
72
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
73
|
+
output: z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
reference: z.ZodUnion<readonly [z.ZodObject<{
|
|
76
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
77
|
+
revisionId: z.ZodString;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
80
|
+
resourceId: z.ZodString;
|
|
81
|
+
repositoryResourceId: z.ZodString;
|
|
82
|
+
revision: z.ZodString;
|
|
83
|
+
branch: z.ZodString;
|
|
84
|
+
pullRequestBase: z.ZodString;
|
|
85
|
+
runId: z.ZodString;
|
|
86
|
+
baseRevision: z.ZodOptional<z.ZodString>;
|
|
87
|
+
merged: z.ZodOptional<z.ZodLiteral<true>>;
|
|
88
|
+
}, z.core.$strict>]>;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
92
|
+
outputName: z.ZodString;
|
|
93
|
+
}, z.core.$strict>>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
export type DeliverySelection = z.infer<typeof deliverySelectionSchema>;
|
|
97
|
+
export declare const candidateSourceInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"output">;
|
|
99
|
+
tip: z.ZodObject<{
|
|
100
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
101
|
+
outputName: z.ZodString;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
includes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
105
|
+
outputName: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>>;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"retained-ref">;
|
|
109
|
+
ref: z.ZodString;
|
|
110
|
+
revision: z.ZodString;
|
|
111
|
+
contributions: z.ZodArray<z.ZodObject<{
|
|
112
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
113
|
+
outputName: z.ZodString;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
}, z.core.$strict>], "kind">;
|
|
116
|
+
export declare const deliveryCandidateCommandSchema: z.ZodObject<{
|
|
117
|
+
candidateId: z.ZodString;
|
|
118
|
+
selectionRevision: z.ZodNumber;
|
|
119
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
120
|
+
resourceId: z.ZodString;
|
|
121
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"output">;
|
|
123
|
+
tip: z.ZodObject<{
|
|
124
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
125
|
+
outputName: z.ZodString;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
includes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
129
|
+
outputName: z.ZodString;
|
|
130
|
+
}, z.core.$strict>>>;
|
|
131
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
132
|
+
kind: z.ZodLiteral<"retained-ref">;
|
|
133
|
+
ref: z.ZodString;
|
|
134
|
+
revision: z.ZodString;
|
|
135
|
+
contributions: z.ZodArray<z.ZodObject<{
|
|
136
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
137
|
+
outputName: z.ZodString;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
}, z.core.$strict>], "kind">;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
export type DeliveryCandidateCommand = z.infer<typeof deliveryCandidateCommandSchema>;
|
|
144
|
+
export declare const candidateRepositorySchema: z.ZodObject<{
|
|
145
|
+
resourceId: z.ZodString;
|
|
146
|
+
revision: z.ZodString;
|
|
147
|
+
pullRequestBase: z.ZodString;
|
|
148
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
149
|
+
kind: z.ZodLiteral<"output">;
|
|
150
|
+
tip: z.ZodObject<{
|
|
151
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
152
|
+
outputName: z.ZodString;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
kind: z.ZodLiteral<"retained-ref">;
|
|
156
|
+
ref: z.ZodString;
|
|
157
|
+
}, z.core.$strict>]>;
|
|
158
|
+
contributions: z.ZodArray<z.ZodObject<{
|
|
159
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
160
|
+
outputName: z.ZodString;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
export declare const deliveryCandidateSchema: z.ZodObject<{
|
|
164
|
+
candidateId: z.ZodString;
|
|
165
|
+
selectionRevision: z.ZodNumber;
|
|
166
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
167
|
+
resourceId: z.ZodString;
|
|
168
|
+
revision: z.ZodString;
|
|
169
|
+
pullRequestBase: z.ZodString;
|
|
170
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
171
|
+
kind: z.ZodLiteral<"output">;
|
|
172
|
+
tip: z.ZodObject<{
|
|
173
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
174
|
+
outputName: z.ZodString;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"retained-ref">;
|
|
178
|
+
ref: z.ZodString;
|
|
179
|
+
}, z.core.$strict>]>;
|
|
180
|
+
contributions: z.ZodArray<z.ZodObject<{
|
|
181
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
182
|
+
outputName: z.ZodString;
|
|
183
|
+
}, z.core.$strict>>;
|
|
184
|
+
}, z.core.$strict>>;
|
|
185
|
+
subjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
186
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
187
|
+
outputName: z.ZodString;
|
|
188
|
+
revision: z.ZodString;
|
|
189
|
+
pullRequestBase: z.ZodString;
|
|
190
|
+
baseRevision: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strict>>>;
|
|
192
|
+
context: z.ZodArray<z.ZodObject<{
|
|
193
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
194
|
+
outputName: z.ZodString;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
criteria: z.ZodArray<z.ZodString>;
|
|
197
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
export type DeliveryCandidate = z.infer<typeof deliveryCandidateSchema>;
|
|
200
|
+
export declare const deliveryQaCommandSchema: z.ZodObject<{
|
|
201
|
+
qaId: z.ZodString;
|
|
202
|
+
candidateId: z.ZodString;
|
|
203
|
+
verdict: z.ZodEnum<{
|
|
204
|
+
readonly Pass: "pass";
|
|
205
|
+
readonly Fail: "fail";
|
|
206
|
+
readonly Blocked: "blocked";
|
|
207
|
+
}>;
|
|
208
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
209
|
+
resourceId: z.ZodString;
|
|
210
|
+
revision: z.ZodString;
|
|
211
|
+
}, z.core.$strict>>;
|
|
212
|
+
environment: z.ZodObject<{
|
|
213
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
214
|
+
available: z.ZodBoolean;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
findings: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
217
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
219
|
+
revisionId: z.ZodString;
|
|
220
|
+
}, z.core.$strict>>>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
export type DeliveryQaCommand = z.infer<typeof deliveryQaCommandSchema>;
|
|
223
|
+
export declare const deliveryQaSchema: z.ZodObject<{
|
|
224
|
+
qaId: z.ZodString;
|
|
225
|
+
candidateId: z.ZodString;
|
|
226
|
+
verdict: z.ZodEnum<{
|
|
227
|
+
readonly Pass: "pass";
|
|
228
|
+
readonly Fail: "fail";
|
|
229
|
+
readonly Blocked: "blocked";
|
|
230
|
+
}>;
|
|
231
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
232
|
+
resourceId: z.ZodString;
|
|
233
|
+
revision: z.ZodString;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
environment: z.ZodObject<{
|
|
236
|
+
recipe: z.ZodOptional<z.ZodString>;
|
|
237
|
+
available: z.ZodBoolean;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
findings: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
240
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
|
+
workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
242
|
+
revisionId: z.ZodString;
|
|
243
|
+
}, z.core.$strict>>>;
|
|
244
|
+
exhausted: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
246
|
+
activationId: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
export type DeliveryQa = z.infer<typeof deliveryQaSchema>;
|
|
249
|
+
/** Agent input: what it did to one selected change, for Wake to verify against the provider. */
|
|
250
|
+
export declare const deliveryMaintenanceCommandSchema: z.ZodObject<{
|
|
251
|
+
maintenanceId: z.ZodString;
|
|
252
|
+
target: z.ZodObject<{
|
|
253
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
254
|
+
outputName: z.ZodString;
|
|
255
|
+
}, z.core.$strict>;
|
|
256
|
+
kind: z.ZodEnum<{
|
|
257
|
+
readonly Retarget: "retarget";
|
|
258
|
+
readonly Rebase: "rebase";
|
|
259
|
+
readonly Resolve: "resolve-conflicts";
|
|
260
|
+
}>;
|
|
261
|
+
expectedRevision: z.ZodString;
|
|
262
|
+
revision: z.ZodString;
|
|
263
|
+
pullRequestBase: z.ZodString;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
export type DeliveryMaintenanceCommand = z.infer<typeof deliveryMaintenanceCommandSchema>;
|
|
266
|
+
/**
|
|
267
|
+
* An immutable new subject for a selected change. The earlier subject, its reviews, checks and
|
|
268
|
+
* QA stay historical; the PR keeps its original owner and the producer is the maintaining Run.
|
|
269
|
+
*/
|
|
270
|
+
export declare const deliveryMaintenanceSchema: z.ZodObject<{
|
|
271
|
+
maintenanceId: z.ZodString;
|
|
272
|
+
target: z.ZodObject<{
|
|
273
|
+
childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
|
|
274
|
+
outputName: z.ZodString;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
kind: z.ZodEnum<{
|
|
277
|
+
readonly Retarget: "retarget";
|
|
278
|
+
readonly Rebase: "rebase";
|
|
279
|
+
readonly Resolve: "resolve-conflicts";
|
|
280
|
+
}>;
|
|
281
|
+
resourceId: z.ZodString;
|
|
282
|
+
repositoryResourceId: z.ZodString;
|
|
283
|
+
previous: z.ZodObject<{
|
|
284
|
+
revision: z.ZodString;
|
|
285
|
+
pullRequestBase: z.ZodString;
|
|
286
|
+
baseRevision: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.core.$strict>;
|
|
288
|
+
current: z.ZodObject<{
|
|
289
|
+
revision: z.ZodString;
|
|
290
|
+
pullRequestBase: z.ZodString;
|
|
291
|
+
baseRevision: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
recordedAt: z.ZodOptional<z.ZodString>;
|
|
294
|
+
producer: z.ZodObject<{
|
|
295
|
+
runId: z.ZodString;
|
|
296
|
+
activationId: z.ZodString;
|
|
297
|
+
}, z.core.$strict>;
|
|
298
|
+
}, z.core.$strict>;
|
|
299
|
+
export type DeliveryMaintenance = z.infer<typeof deliveryMaintenanceSchema>;
|
|
300
|
+
/** A final delivery gate can be reassessed through ordinary operator retry. */
|
|
301
|
+
export interface DeliveryCompletionBlock {
|
|
302
|
+
readonly reason: string;
|
|
303
|
+
readonly deliveryGate: {
|
|
304
|
+
readonly retryStage: StageName;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
export declare class DeliveryRejectionError extends Error {
|
|
308
|
+
readonly code: DeliveryRejection;
|
|
309
|
+
constructor(code: DeliveryRejection, message: string);
|
|
310
|
+
}
|