@devcxl/opencode-cabbage 0.3.1 → 1.0.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/README.md +34 -19
- package/README.zh.md +34 -19
- package/assets/agents/dev-lifecycle.md +60 -41
- package/assets/agents/team/architect.md +36 -1
- package/assets/agents/team/developer.md +89 -0
- package/assets/agents/team/goal-verify.md +5 -1
- package/assets/agents/team/reviewer.md +42 -1
- package/assets/commands/code.md +3 -2
- package/assets/commands/design.md +3 -2
- package/assets/commands/release.md +3 -2
- package/assets/commands/requirements.md +3 -2
- package/assets/commands/review.md +3 -2
- package/assets/commands/setup.md +3 -2
- package/assets/commands/tasks.md +2 -1
- package/assets/prompts/bootstrap.md +9 -8
- package/assets/prompts/stage-contract.md +55 -0
- package/assets/skills/flow-code/SKILL.md +38 -140
- package/assets/skills/flow-design/SKILL.md +33 -74
- package/assets/skills/flow-release/SKILL.md +31 -51
- package/assets/skills/flow-requirements/SKILL.md +47 -45
- package/assets/skills/flow-review/SKILL.md +26 -112
- package/assets/skills/flow-setup/SKILL.md +40 -43
- package/assets/skills/flow-tasks/SKILL.md +30 -139
- package/assets/skills/flow-tdd/SKILL.md +30 -31
- package/dist/kernel/caller.d.ts +48 -0
- package/dist/kernel/caller.js +88 -0
- package/dist/kernel/caller.js.map +1 -0
- package/dist/kernel/context.d.ts +27 -0
- package/dist/kernel/context.js +73 -0
- package/dist/kernel/context.js.map +1 -0
- package/dist/kernel/flow.d.ts +166 -0
- package/dist/kernel/flow.js +387 -0
- package/dist/kernel/flow.js.map +1 -0
- package/dist/kernel/legacy.d.ts +19 -0
- package/dist/kernel/legacy.js +34 -0
- package/dist/kernel/legacy.js.map +1 -0
- package/dist/kernel/mutex.d.ts +8 -0
- package/dist/kernel/mutex.js +23 -0
- package/dist/kernel/mutex.js.map +1 -0
- package/dist/kernel/permission.d.ts +21 -0
- package/dist/kernel/permission.js +37 -0
- package/dist/kernel/permission.js.map +1 -0
- package/dist/kernel/profile.d.ts +35 -0
- package/dist/kernel/profile.js +144 -0
- package/dist/kernel/profile.js.map +1 -0
- package/dist/kernel/records.d.ts +87 -0
- package/dist/kernel/records.js +197 -0
- package/dist/kernel/records.js.map +1 -0
- package/dist/kernel/release.d.ts +104 -0
- package/dist/kernel/release.js +229 -0
- package/dist/kernel/release.js.map +1 -0
- package/dist/kernel/review.d.ts +34 -0
- package/dist/kernel/review.js +81 -0
- package/dist/kernel/review.js.map +1 -0
- package/dist/kernel/session-index.d.ts +43 -0
- package/dist/kernel/session-index.js +120 -0
- package/dist/kernel/session-index.js.map +1 -0
- package/dist/kernel/setup.d.ts +70 -0
- package/dist/kernel/setup.js +324 -0
- package/dist/kernel/setup.js.map +1 -0
- package/dist/kernel/slug.d.ts +23 -0
- package/dist/kernel/slug.js +67 -0
- package/dist/kernel/slug.js.map +1 -0
- package/dist/kernel/task.d.ts +208 -0
- package/dist/kernel/task.js +788 -0
- package/dist/kernel/task.js.map +1 -0
- package/dist/{flowrun → kernel/tdd}/adapter.d.ts +1 -1
- package/dist/kernel/tdd/adapter.js.map +1 -0
- package/dist/{flowrun → kernel/tdd}/digest.d.ts +1 -1
- package/dist/kernel/tdd/digest.js.map +1 -0
- package/dist/{flowrun → kernel/tdd}/evaluator.d.ts +1 -1
- package/dist/kernel/tdd/evaluator.js.map +1 -0
- package/dist/kernel/tdd/evidence.d.ts +42 -0
- package/dist/kernel/tdd/evidence.js +48 -0
- package/dist/kernel/tdd/evidence.js.map +1 -0
- package/dist/{flowrun → kernel/tdd}/state.d.ts +1 -1
- package/dist/kernel/tdd/state.js.map +1 -0
- package/dist/kernel/types.d.ts +180 -0
- package/dist/kernel/types.js +2 -0
- package/dist/kernel/types.js.map +1 -0
- package/dist/kernel/worktree.d.ts +45 -0
- package/dist/kernel/worktree.js +127 -0
- package/dist/kernel/worktree.js.map +1 -0
- package/dist/plugin/agents.d.ts +5 -17
- package/dist/plugin/agents.js +0 -23
- package/dist/plugin/agents.js.map +1 -1
- package/dist/plugin/flow-control.d.ts +80 -0
- package/dist/plugin/flow-control.js +254 -0
- package/dist/plugin/flow-control.js.map +1 -0
- package/dist/plugin/goal.d.ts +7 -46
- package/dist/plugin/goal.js +32 -116
- package/dist/plugin/goal.js.map +1 -1
- package/dist/plugin/prompt-lint.js +78 -5
- package/dist/plugin/prompt-lint.js.map +1 -1
- package/dist/plugin/release-control.d.ts +37 -0
- package/dist/plugin/release-control.js +304 -0
- package/dist/plugin/release-control.js.map +1 -0
- package/dist/plugin/server.d.ts +19 -0
- package/dist/plugin/server.js +147 -302
- package/dist/plugin/server.js.map +1 -1
- package/dist/plugin/setup-control.d.ts +45 -0
- package/dist/plugin/setup-control.js +80 -0
- package/dist/plugin/setup-control.js.map +1 -0
- package/dist/plugin/shell.d.ts +7 -34
- package/dist/plugin/shell.js +12 -137
- package/dist/plugin/shell.js.map +1 -1
- package/dist/plugin/skills.d.ts +1 -1
- package/dist/plugin/skills.js +16 -17
- package/dist/plugin/skills.js.map +1 -1
- package/dist/plugin/task-control.d.ts +90 -0
- package/dist/plugin/task-control.js +201 -0
- package/dist/plugin/task-control.js.map +1 -0
- package/dist/plugin/tdd-checkpoint.d.ts +118 -0
- package/dist/plugin/tdd-checkpoint.js +581 -0
- package/dist/plugin/tdd-checkpoint.js.map +1 -0
- package/dist/util/paths.d.ts +0 -2
- package/dist/util/paths.js +1 -7
- package/dist/util/paths.js.map +1 -1
- package/package.json +1 -1
- package/assets/agents/team/backend.md +0 -66
- package/assets/agents/team/frontend.md +0 -63
- package/assets/commands/handoff.md +0 -4
- package/assets/commands/test.md +0 -4
- package/assets/context/CONTEXT.md +0 -40
- package/assets/skills/flow-handoff/SKILL.md +0 -76
- package/assets/skills/flow-requirements/references/interview-guide.md +0 -35
- package/assets/skills/flow-test/SKILL.md +0 -75
- package/dist/flowrun/adapter.js.map +0 -1
- package/dist/flowrun/audit.d.ts +0 -5
- package/dist/flowrun/audit.js +0 -67
- package/dist/flowrun/audit.js.map +0 -1
- package/dist/flowrun/ci.d.ts +0 -64
- package/dist/flowrun/ci.js +0 -184
- package/dist/flowrun/ci.js.map +0 -1
- package/dist/flowrun/coverage.d.ts +0 -70
- package/dist/flowrun/coverage.js +0 -207
- package/dist/flowrun/coverage.js.map +0 -1
- package/dist/flowrun/digest.js.map +0 -1
- package/dist/flowrun/evaluator.js.map +0 -1
- package/dist/flowrun/gate.d.ts +0 -28
- package/dist/flowrun/gate.js +0 -139
- package/dist/flowrun/gate.js.map +0 -1
- package/dist/flowrun/github.d.ts +0 -24
- package/dist/flowrun/github.js +0 -154
- package/dist/flowrun/github.js.map +0 -1
- package/dist/flowrun/index.d.ts +0 -14
- package/dist/flowrun/index.js +0 -15
- package/dist/flowrun/index.js.map +0 -1
- package/dist/flowrun/merge.d.ts +0 -57
- package/dist/flowrun/merge.js +0 -180
- package/dist/flowrun/merge.js.map +0 -1
- package/dist/flowrun/migration.d.ts +0 -11
- package/dist/flowrun/migration.js +0 -276
- package/dist/flowrun/migration.js.map +0 -1
- package/dist/flowrun/resilience.d.ts +0 -18
- package/dist/flowrun/resilience.js +0 -80
- package/dist/flowrun/resilience.js.map +0 -1
- package/dist/flowrun/state.js.map +0 -1
- package/dist/flowrun/transitions.d.ts +0 -66
- package/dist/flowrun/transitions.js +0 -168
- package/dist/flowrun/transitions.js.map +0 -1
- package/dist/flowrun/types.d.ts +0 -356
- package/dist/flowrun/types.js +0 -21
- package/dist/flowrun/types.js.map +0 -1
- package/dist/flowrun/validator.d.ts +0 -19
- package/dist/flowrun/validator.js +0 -209
- package/dist/flowrun/validator.js.map +0 -1
- package/dist/plugin/broker.d.ts +0 -73
- package/dist/plugin/broker.js +0 -140
- package/dist/plugin/broker.js.map +0 -1
- package/dist/plugin/tdd-tool.d.ts +0 -62
- package/dist/plugin/tdd-tool.js +0 -336
- package/dist/plugin/tdd-tool.js.map +0 -1
- /package/dist/{flowrun → kernel/tdd}/adapter.js +0 -0
- /package/dist/{flowrun → kernel/tdd}/digest.js +0 -0
- /package/dist/{flowrun → kernel/tdd}/evaluator.js +0 -0
- /package/dist/{flowrun → kernel/tdd}/state.js +0 -0
package/dist/flowrun/types.d.ts
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
export declare const FLOW_RUN_STAGES: readonly ["requirements", "design", "tasks", "code", "test", "review", "merge"];
|
|
2
|
-
export type FlowStage = typeof FLOW_RUN_STAGES[number];
|
|
3
|
-
export declare const FLOW_RUN_STATUSES: readonly ["planned", "running", "blocked", "merging", "completed", "cancelled"];
|
|
4
|
-
export type FlowRunStatus = typeof FLOW_RUN_STATUSES[number];
|
|
5
|
-
export declare const TASK_STATUSES: readonly ["pending", "ready", "running", "blocked", "reviewing", "merged", "cancelled"];
|
|
6
|
-
export type TaskStatus = typeof TASK_STATUSES[number];
|
|
7
|
-
export declare const STAGE_STATUSES: readonly ["pending", "running", "pass", "failed", "blocked"];
|
|
8
|
-
export type StageStatus = typeof STAGE_STATUSES[number];
|
|
9
|
-
export declare const CHECKPOINT_STATUSES: readonly ["pending", "pass", "fail"];
|
|
10
|
-
export type CheckpointStatus = typeof CHECKPOINT_STATUSES[number];
|
|
11
|
-
export interface EvidenceEntry {
|
|
12
|
-
command: string;
|
|
13
|
-
exitCode: number | null;
|
|
14
|
-
summary: string;
|
|
15
|
-
timestamp: string;
|
|
16
|
-
}
|
|
17
|
-
export interface Checkpoint {
|
|
18
|
-
name: string;
|
|
19
|
-
status: CheckpointStatus;
|
|
20
|
-
evidence: EvidenceEntry[];
|
|
21
|
-
}
|
|
22
|
-
export interface StageState {
|
|
23
|
-
status: StageStatus;
|
|
24
|
-
requiredArtifacts: string[];
|
|
25
|
-
checks: Checkpoint[];
|
|
26
|
-
completedAt: string | null;
|
|
27
|
-
evidence: EvidenceEntry[];
|
|
28
|
-
}
|
|
29
|
-
export interface AcceptanceCriterion {
|
|
30
|
-
id: string;
|
|
31
|
-
description: string;
|
|
32
|
-
verification: "tdd" | "regression" | "manual";
|
|
33
|
-
}
|
|
34
|
-
export type TddMode = "strict" | "relaxed" | "bypass";
|
|
35
|
-
export type TddEnforcement = "advisory" | "runtime";
|
|
36
|
-
export interface TddRunnerPolicy {
|
|
37
|
-
adapter: "vitest";
|
|
38
|
-
baseCommand: string;
|
|
39
|
-
timeoutMs: number;
|
|
40
|
-
executionInputPatterns: string[];
|
|
41
|
-
}
|
|
42
|
-
export interface VersionedDigest {
|
|
43
|
-
algorithm: "sha256-content-v1" | "sha256-output-v1" | "git-tree-v1";
|
|
44
|
-
value: string;
|
|
45
|
-
}
|
|
46
|
-
export type TddApproval = {
|
|
47
|
-
kind: "planning-pr";
|
|
48
|
-
repo: string;
|
|
49
|
-
prNumber: number;
|
|
50
|
-
reviewId: number;
|
|
51
|
-
approver: string;
|
|
52
|
-
mergedCommitSha: string;
|
|
53
|
-
policyDigest: string;
|
|
54
|
-
} | {
|
|
55
|
-
kind: "issue-comment";
|
|
56
|
-
repo: string;
|
|
57
|
-
issueNumber: number;
|
|
58
|
-
commentId: number;
|
|
59
|
-
approver: string;
|
|
60
|
-
commentBodyDigest: VersionedDigest;
|
|
61
|
-
policyDigest: string;
|
|
62
|
-
} | {
|
|
63
|
-
kind: "legacy-migration";
|
|
64
|
-
fromSchemaVersion: 1;
|
|
65
|
-
};
|
|
66
|
-
export interface TaskCommand {
|
|
67
|
-
command: string;
|
|
68
|
-
cwd: string;
|
|
69
|
-
timeoutMs: number;
|
|
70
|
-
env: Record<string, string>;
|
|
71
|
-
}
|
|
72
|
-
export type AlternativeValidation = {
|
|
73
|
-
validationId: string;
|
|
74
|
-
kind: "command";
|
|
75
|
-
command: TaskCommand;
|
|
76
|
-
} | {
|
|
77
|
-
validationId: string;
|
|
78
|
-
kind: "manual";
|
|
79
|
-
description: string;
|
|
80
|
-
};
|
|
81
|
-
export interface TddException {
|
|
82
|
-
reason: string;
|
|
83
|
-
alternativeValidation: AlternativeValidation[];
|
|
84
|
-
approval: TddApproval;
|
|
85
|
-
}
|
|
86
|
-
export interface TddPolicy {
|
|
87
|
-
mode: TddMode;
|
|
88
|
-
enforcement: TddEnforcement;
|
|
89
|
-
runner: TddRunnerPolicy | null;
|
|
90
|
-
testFilePatterns: string[];
|
|
91
|
-
implementationFilePatterns: string[];
|
|
92
|
-
generatedArtifactPatterns: string[];
|
|
93
|
-
exception: TddException | null;
|
|
94
|
-
source: {
|
|
95
|
-
manifestPath: string;
|
|
96
|
-
revisionSha: string;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
export type TddFailureKind = "assertion" | "missing-behavior" | "infrastructure" | "timeout" | "unknown";
|
|
100
|
-
export interface TddCommandEvidence {
|
|
101
|
-
command: string;
|
|
102
|
-
testSelector: string | null;
|
|
103
|
-
exitCode: number | null;
|
|
104
|
-
failureKind: TddFailureKind | null;
|
|
105
|
-
testsCollected: number | null;
|
|
106
|
-
testsFailed: number | null;
|
|
107
|
-
startedAt: string;
|
|
108
|
-
finishedAt: string;
|
|
109
|
-
durationMs: number;
|
|
110
|
-
changedFiles: string[];
|
|
111
|
-
outputDigest: VersionedDigest;
|
|
112
|
-
workspaceDigest: VersionedDigest;
|
|
113
|
-
executionInputDigest: VersionedDigest;
|
|
114
|
-
summary: string;
|
|
115
|
-
}
|
|
116
|
-
export interface TddTaskStartEvidence {
|
|
117
|
-
status: "pending" | "pass" | "fail";
|
|
118
|
-
headSha: string | null;
|
|
119
|
-
treeSha: string | null;
|
|
120
|
-
startedAt: string | null;
|
|
121
|
-
}
|
|
122
|
-
export interface TaskExecutionBinding {
|
|
123
|
-
branch: string;
|
|
124
|
-
baseSha: string;
|
|
125
|
-
startHeadSha: string;
|
|
126
|
-
worktreeId: string;
|
|
127
|
-
sessionId: string;
|
|
128
|
-
}
|
|
129
|
-
export interface TddCycleEvidence {
|
|
130
|
-
cycleId: string;
|
|
131
|
-
criterionId: string;
|
|
132
|
-
reworkRevision: number;
|
|
133
|
-
status: "started" | "red" | "pass" | "failed" | "abandoned";
|
|
134
|
-
startWorkspaceDigest: VersionedDigest;
|
|
135
|
-
testFiles: string[];
|
|
136
|
-
redTestDigest: VersionedDigest | null;
|
|
137
|
-
redAttempts: TddCommandEvidence[];
|
|
138
|
-
greenAttempts: TddCommandEvidence[];
|
|
139
|
-
}
|
|
140
|
-
export interface TddRegressionEvidence {
|
|
141
|
-
status: "pending" | "pass" | "fail" | "skipped";
|
|
142
|
-
headSha: string | null;
|
|
143
|
-
treeSha: string | null;
|
|
144
|
-
reworkRevision: number;
|
|
145
|
-
runs: TddCommandEvidence[];
|
|
146
|
-
}
|
|
147
|
-
export interface FinalVerificationEvidence {
|
|
148
|
-
status: "pending" | "pass" | "fail";
|
|
149
|
-
headSha: string | null;
|
|
150
|
-
treeSha: string | null;
|
|
151
|
-
runs: TddCommandEvidence[];
|
|
152
|
-
}
|
|
153
|
-
export type AlternativeValidationEvidence = {
|
|
154
|
-
validationId: string;
|
|
155
|
-
kind: "command";
|
|
156
|
-
status: "pass" | "fail";
|
|
157
|
-
headSha: string;
|
|
158
|
-
treeSha: string;
|
|
159
|
-
reworkRevision: number;
|
|
160
|
-
evidence: TddCommandEvidence;
|
|
161
|
-
} | {
|
|
162
|
-
validationId: string;
|
|
163
|
-
kind: "manual";
|
|
164
|
-
status: "pass" | "fail";
|
|
165
|
-
headSha: string;
|
|
166
|
-
treeSha: string;
|
|
167
|
-
reworkRevision: number;
|
|
168
|
-
reviewRef: string;
|
|
169
|
-
reviewer: string;
|
|
170
|
-
contentDigest: VersionedDigest;
|
|
171
|
-
policyDigest: string;
|
|
172
|
-
summary: string;
|
|
173
|
-
};
|
|
174
|
-
export interface ReworkApproval {
|
|
175
|
-
reworkRevision: number;
|
|
176
|
-
kind: "refactor";
|
|
177
|
-
headSha: string;
|
|
178
|
-
treeSha: string;
|
|
179
|
-
reviewerSessionId: string;
|
|
180
|
-
reviewerMessageId: string;
|
|
181
|
-
contentDigest: VersionedDigest;
|
|
182
|
-
policyDigest: string;
|
|
183
|
-
}
|
|
184
|
-
export interface TddReworkEvidence {
|
|
185
|
-
reworkRevision: number;
|
|
186
|
-
kind: "behavior" | "refactor";
|
|
187
|
-
affectedCriterionIds: string[];
|
|
188
|
-
status: "started" | "evidence-ready" | "pass" | "fail";
|
|
189
|
-
startHeadSha: string;
|
|
190
|
-
approval: ReworkApproval | null;
|
|
191
|
-
}
|
|
192
|
-
export interface TddEvidence {
|
|
193
|
-
revision: number;
|
|
194
|
-
reworkRevision: number;
|
|
195
|
-
status: "not-recorded" | "pending" | "in-progress" | "pass" | "fail" | "waived";
|
|
196
|
-
taskStart: TddTaskStartEvidence;
|
|
197
|
-
cycles: TddCycleEvidence[];
|
|
198
|
-
regression: TddRegressionEvidence;
|
|
199
|
-
verification: FinalVerificationEvidence;
|
|
200
|
-
alternativeValidation: AlternativeValidationEvidence[];
|
|
201
|
-
reworks: TddReworkEvidence[];
|
|
202
|
-
warnings: string[];
|
|
203
|
-
updatedAt: string | null;
|
|
204
|
-
}
|
|
205
|
-
export interface CoveragePolicy {
|
|
206
|
-
command: string;
|
|
207
|
-
threshold: number;
|
|
208
|
-
report: {
|
|
209
|
-
format: "istanbul-json-summary";
|
|
210
|
-
path: string;
|
|
211
|
-
metric: "lines";
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
export interface CoverageEvidence {
|
|
215
|
-
status: "pending" | "pass" | "fail";
|
|
216
|
-
headSha: string;
|
|
217
|
-
actual: number | null;
|
|
218
|
-
threshold: number;
|
|
219
|
-
metric: "lines";
|
|
220
|
-
reportDigest: string | null;
|
|
221
|
-
summary: string;
|
|
222
|
-
}
|
|
223
|
-
export interface TddComplianceCheckpoint {
|
|
224
|
-
status: "pending" | "pass" | "fail" | "waived";
|
|
225
|
-
evidenceRevision: number;
|
|
226
|
-
reworkRevision: number;
|
|
227
|
-
headSha: string;
|
|
228
|
-
treeSha: string;
|
|
229
|
-
summary: string;
|
|
230
|
-
}
|
|
231
|
-
export interface PRCheckpoints {
|
|
232
|
-
prNumber: number;
|
|
233
|
-
localChecks: Checkpoint;
|
|
234
|
-
ciChecks: Checkpoint;
|
|
235
|
-
reviewerApproval: Checkpoint;
|
|
236
|
-
goalVerification: Checkpoint;
|
|
237
|
-
branchProtection: Checkpoint;
|
|
238
|
-
mergeResult: Checkpoint;
|
|
239
|
-
tddCompliance: TddComplianceCheckpoint | null;
|
|
240
|
-
verification: FinalVerificationEvidence | null;
|
|
241
|
-
coverage: CoverageEvidence | null;
|
|
242
|
-
qualityContractDigest: string | null;
|
|
243
|
-
}
|
|
244
|
-
export interface TaskState {
|
|
245
|
-
id: string;
|
|
246
|
-
name: string;
|
|
247
|
-
status: TaskStatus;
|
|
248
|
-
dependsOn: string[];
|
|
249
|
-
area: string;
|
|
250
|
-
expectedFiles: string[];
|
|
251
|
-
parallelSafe: boolean;
|
|
252
|
-
prNumber: number | null;
|
|
253
|
-
prCheckpoints: PRCheckpoints | null;
|
|
254
|
-
blockedReason: string | null;
|
|
255
|
-
startedAt: string | null;
|
|
256
|
-
acceptanceCriteria: AcceptanceCriterion[];
|
|
257
|
-
testCommands: TaskCommand[];
|
|
258
|
-
verifyCommands: TaskCommand[];
|
|
259
|
-
executionBinding: TaskExecutionBinding | null;
|
|
260
|
-
tddPolicy: TddPolicy;
|
|
261
|
-
tddEvidence: TddEvidence;
|
|
262
|
-
coveragePolicy: CoveragePolicy | null;
|
|
263
|
-
}
|
|
264
|
-
export interface RepositoryQualityPolicy {
|
|
265
|
-
mode: "off" | "required";
|
|
266
|
-
requiredChecks: Array<{
|
|
267
|
-
context: string;
|
|
268
|
-
appId: number;
|
|
269
|
-
workflowPath: string;
|
|
270
|
-
workflowRef: string;
|
|
271
|
-
workflowBlobSha: string;
|
|
272
|
-
}>;
|
|
273
|
-
}
|
|
274
|
-
export interface FlowRun {
|
|
275
|
-
flowRunId: string;
|
|
276
|
-
repo: string;
|
|
277
|
-
parentIssueNumber: number;
|
|
278
|
-
status: FlowRunStatus;
|
|
279
|
-
schemaVersion: number;
|
|
280
|
-
revision: number;
|
|
281
|
-
stages: Record<FlowStage, StageState>;
|
|
282
|
-
tasks: Record<string, TaskState>;
|
|
283
|
-
startedAt: string | null;
|
|
284
|
-
lastTickAt: string | null;
|
|
285
|
-
nextTickAfter: string | null;
|
|
286
|
-
maxRuntime: number;
|
|
287
|
-
completedAt: string | null;
|
|
288
|
-
repositoryQualityPolicy: RepositoryQualityPolicy;
|
|
289
|
-
}
|
|
290
|
-
export interface GoalFlowRunRef {
|
|
291
|
-
repo: string;
|
|
292
|
-
parentIssueNumber: number;
|
|
293
|
-
flowRunId: string;
|
|
294
|
-
}
|
|
295
|
-
export type FlowControlOp = "run-start" | "stage-start" | "stage-complete" | "task-start" | "pr-create" | "run-finalize";
|
|
296
|
-
export interface FlowControlRequest {
|
|
297
|
-
op: FlowControlOp;
|
|
298
|
-
parentIssueNumber: number;
|
|
299
|
-
stage?: FlowStage;
|
|
300
|
-
taskId?: string;
|
|
301
|
-
executionBinding?: TaskExecutionBinding;
|
|
302
|
-
tddPolicy?: TddPolicy;
|
|
303
|
-
currentHeadSha?: string;
|
|
304
|
-
prTitle?: string;
|
|
305
|
-
prBody?: string;
|
|
306
|
-
baseBranch?: string;
|
|
307
|
-
}
|
|
308
|
-
export interface FlowControlResponse {
|
|
309
|
-
ok: boolean;
|
|
310
|
-
error?: {
|
|
311
|
-
code: string;
|
|
312
|
-
message: string;
|
|
313
|
-
};
|
|
314
|
-
flowRunStatus?: FlowRunStatus;
|
|
315
|
-
stage?: {
|
|
316
|
-
name: FlowStage;
|
|
317
|
-
status: StageStatus;
|
|
318
|
-
};
|
|
319
|
-
task?: {
|
|
320
|
-
taskId: string;
|
|
321
|
-
status: TaskStatus;
|
|
322
|
-
executionBinding?: TaskExecutionBinding | null;
|
|
323
|
-
};
|
|
324
|
-
pr?: {
|
|
325
|
-
prNumber: number;
|
|
326
|
-
prUrl: string;
|
|
327
|
-
created: boolean;
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
export interface ValidationError {
|
|
331
|
-
path: string;
|
|
332
|
-
message: string;
|
|
333
|
-
}
|
|
334
|
-
export type FlowRunReadResult = {
|
|
335
|
-
ok: true;
|
|
336
|
-
data: FlowRun;
|
|
337
|
-
migrated: boolean;
|
|
338
|
-
} | {
|
|
339
|
-
ok: false;
|
|
340
|
-
code: "NOT_FOUND" | "INVALID_JSON" | "UNSUPPORTED_SCHEMA" | "MIGRATION_FAILED" | "VALIDATION_FAILED";
|
|
341
|
-
errors: ValidationError[];
|
|
342
|
-
};
|
|
343
|
-
export declare const CURRENT_SCHEMA_VERSION = 2;
|
|
344
|
-
export declare const DEFAULT_MAX_RUNTIME_MS = 86400000;
|
|
345
|
-
export declare const CABINET_START_MARKER = "<!-- cabbage-flow-run:start -->";
|
|
346
|
-
export declare const CABINET_END_MARKER = "<!-- cabbage-flow-run:end -->";
|
|
347
|
-
export declare const LABEL_PREFIX = "cabbage:";
|
|
348
|
-
export declare const FLOW_RUN_LABELS: {
|
|
349
|
-
readonly flow: "cabbage:flow";
|
|
350
|
-
readonly running: "cabbage:running";
|
|
351
|
-
readonly blocked: "cabbage:blocked";
|
|
352
|
-
readonly merging: "cabbage:merging";
|
|
353
|
-
readonly completed: "cabbage:completed";
|
|
354
|
-
readonly cancelled: "cabbage:cancelled";
|
|
355
|
-
readonly resume: "cabbage:resume";
|
|
356
|
-
};
|
package/dist/flowrun/types.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const FLOW_RUN_STAGES = ["requirements", "design", "tasks", "code", "test", "review", "merge"];
|
|
2
|
-
export const FLOW_RUN_STATUSES = ["planned", "running", "blocked", "merging", "completed", "cancelled"];
|
|
3
|
-
export const TASK_STATUSES = ["pending", "ready", "running", "blocked", "reviewing", "merged", "cancelled"];
|
|
4
|
-
export const STAGE_STATUSES = ["pending", "running", "pass", "failed", "blocked"];
|
|
5
|
-
export const CHECKPOINT_STATUSES = ["pending", "pass", "fail"];
|
|
6
|
-
// ─── 常量 ───
|
|
7
|
-
export const CURRENT_SCHEMA_VERSION = 2;
|
|
8
|
-
export const DEFAULT_MAX_RUNTIME_MS = 86_400_000;
|
|
9
|
-
export const CABINET_START_MARKER = "<!-- cabbage-flow-run:start -->";
|
|
10
|
-
export const CABINET_END_MARKER = "<!-- cabbage-flow-run:end -->";
|
|
11
|
-
export const LABEL_PREFIX = "cabbage:";
|
|
12
|
-
export const FLOW_RUN_LABELS = {
|
|
13
|
-
flow: `${LABEL_PREFIX}flow`,
|
|
14
|
-
running: `${LABEL_PREFIX}running`,
|
|
15
|
-
blocked: `${LABEL_PREFIX}blocked`,
|
|
16
|
-
merging: `${LABEL_PREFIX}merging`,
|
|
17
|
-
completed: `${LABEL_PREFIX}completed`,
|
|
18
|
-
cancelled: `${LABEL_PREFIX}cancelled`,
|
|
19
|
-
resume: `${LABEL_PREFIX}resume`,
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/flowrun/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AAG9G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,CAAU,CAAA;AAGhH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAA;AAGpH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAA;AAG1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAU,CAAA;AAoZvE,aAAa;AAEb,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAA;AACvC,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAA;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAAiC,CAAA;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,+BAA+B,CAAA;AAEjE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAA;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,GAAG,YAAY,MAAM;IAC3B,OAAO,EAAE,GAAG,YAAY,SAAS;IACjC,OAAO,EAAE,GAAG,YAAY,SAAS;IACjC,OAAO,EAAE,GAAG,YAAY,SAAS;IACjC,SAAS,EAAE,GAAG,YAAY,WAAW;IACrC,SAAS,EAAE,GAAG,YAAY,WAAW;IACrC,MAAM,EAAE,GAAG,YAAY,QAAQ;CACvB,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type FlowRun, type TaskState, type ValidationError } from "./types.js";
|
|
2
|
-
export type { ValidationError } from "./types.js";
|
|
3
|
-
export declare function validateFlowRun(raw: unknown): {
|
|
4
|
-
data: FlowRun | null;
|
|
5
|
-
errors: ValidationError[];
|
|
6
|
-
};
|
|
7
|
-
export interface DagValidationError {
|
|
8
|
-
path: string;
|
|
9
|
-
message: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 验证 Task DAG:
|
|
13
|
-
* - Task ID 唯一
|
|
14
|
-
* - record key 与 Task.id 一致
|
|
15
|
-
* - 所有依赖存在
|
|
16
|
-
* - 禁止自依赖
|
|
17
|
-
* - 检测环路
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateFlowRunDag(tasks: Record<string, TaskState>): DagValidationError[];
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { FLOW_RUN_STAGES, FLOW_RUN_STATUSES, TASK_STATUSES, STAGE_STATUSES, CHECKPOINT_STATUSES, } from "./types.js";
|
|
2
|
-
export function validateFlowRun(raw) {
|
|
3
|
-
const errors = [];
|
|
4
|
-
if (!raw || typeof raw !== "object") {
|
|
5
|
-
errors.push({ path: "", message: "FlowRun must be a non-null object" });
|
|
6
|
-
return { data: null, errors };
|
|
7
|
-
}
|
|
8
|
-
const obj = raw;
|
|
9
|
-
if (typeof obj.flowRunId !== "string" || !obj.flowRunId) {
|
|
10
|
-
errors.push({ path: "flowRunId", message: "Required string" });
|
|
11
|
-
}
|
|
12
|
-
if (typeof obj.repo !== "string" || !obj.repo) {
|
|
13
|
-
errors.push({ path: "repo", message: "Required string" });
|
|
14
|
-
}
|
|
15
|
-
if (typeof obj.parentIssueNumber !== "number" || obj.parentIssueNumber <= 0) {
|
|
16
|
-
errors.push({ path: "parentIssueNumber", message: "Required positive number" });
|
|
17
|
-
}
|
|
18
|
-
if (!FLOW_RUN_STATUSES.includes(obj.status)) {
|
|
19
|
-
errors.push({ path: "status", message: `Must be one of: ${FLOW_RUN_STATUSES.join(", ")}` });
|
|
20
|
-
}
|
|
21
|
-
if (typeof obj.schemaVersion !== "number") {
|
|
22
|
-
errors.push({ path: "schemaVersion", message: "Required number" });
|
|
23
|
-
}
|
|
24
|
-
if (typeof obj.revision !== "number" || obj.revision < 0) {
|
|
25
|
-
errors.push({ path: "revision", message: "Required non-negative number" });
|
|
26
|
-
}
|
|
27
|
-
// v2: FlowRun 级 repositoryQualityPolicy
|
|
28
|
-
if (!obj.repositoryQualityPolicy || typeof obj.repositoryQualityPolicy !== "object") {
|
|
29
|
-
errors.push({ path: "repositoryQualityPolicy", message: "Required object" });
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
const rqp = obj.repositoryQualityPolicy;
|
|
33
|
-
if (typeof rqp.mode !== "string" || !["off", "required"].includes(rqp.mode)) {
|
|
34
|
-
errors.push({ path: "repositoryQualityPolicy.mode", message: 'Must be "off" or "required"' });
|
|
35
|
-
}
|
|
36
|
-
if (!Array.isArray(rqp.requiredChecks)) {
|
|
37
|
-
errors.push({ path: "repositoryQualityPolicy.requiredChecks", message: "Required array" });
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
validateStages(obj.stages, errors);
|
|
41
|
-
validateTasks(obj.tasks, errors);
|
|
42
|
-
const data = errors.length === 0 ? raw : null;
|
|
43
|
-
return { data, errors };
|
|
44
|
-
}
|
|
45
|
-
function validateStages(stages, errors) {
|
|
46
|
-
if (!stages || typeof stages !== "object") {
|
|
47
|
-
errors.push({ path: "stages", message: "Required object with stage keys" });
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
const stageObj = stages;
|
|
51
|
-
for (const key of FLOW_RUN_STAGES) {
|
|
52
|
-
const s = stageObj[key];
|
|
53
|
-
if (!s || typeof s !== "object") {
|
|
54
|
-
errors.push({ path: `stages.${key}`, message: "Missing or invalid stage object" });
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
validateStage(key, s, errors);
|
|
58
|
-
}
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
function validateStage(stageKey, stage, errors) {
|
|
62
|
-
if (!STAGE_STATUSES.includes(stage.status)) {
|
|
63
|
-
errors.push({ path: `stages.${stageKey}.status`, message: "Invalid stage status" });
|
|
64
|
-
}
|
|
65
|
-
if (!Array.isArray(stage.requiredArtifacts)) {
|
|
66
|
-
errors.push({ path: `stages.${stageKey}.requiredArtifacts`, message: "Required array" });
|
|
67
|
-
}
|
|
68
|
-
if (typeof stage.completedAt !== "string" && stage.completedAt !== null) {
|
|
69
|
-
errors.push({ path: `stages.${stageKey}.completedAt`, message: "Must be string or null" });
|
|
70
|
-
}
|
|
71
|
-
if (!Array.isArray(stage.checks)) {
|
|
72
|
-
errors.push({ path: `stages.${stageKey}.checks`, message: "Required array" });
|
|
73
|
-
}
|
|
74
|
-
if (!Array.isArray(stage.evidence)) {
|
|
75
|
-
errors.push({ path: `stages.${stageKey}.evidence`, message: "Required array" });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function validateTasks(tasks, errors) {
|
|
79
|
-
if (!tasks || typeof tasks !== "object") {
|
|
80
|
-
errors.push({ path: "tasks", message: "Required object with task keys" });
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
const taskObj = tasks;
|
|
84
|
-
for (const [key, value] of Object.entries(taskObj)) {
|
|
85
|
-
if (!value || typeof value !== "object") {
|
|
86
|
-
errors.push({ path: `tasks.${key}`, message: "Invalid task object" });
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
validateTask(key, value, errors);
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
function validateTask(taskKey, task, errors) {
|
|
94
|
-
if (!task.id || typeof task.id !== "string") {
|
|
95
|
-
errors.push({ path: `tasks.${taskKey}.id`, message: "Required string" });
|
|
96
|
-
}
|
|
97
|
-
if (!TASK_STATUSES.includes(task.status)) {
|
|
98
|
-
errors.push({ path: `tasks.${taskKey}.status`, message: "Invalid task status" });
|
|
99
|
-
}
|
|
100
|
-
if (!Array.isArray(task.dependsOn)) {
|
|
101
|
-
errors.push({ path: `tasks.${taskKey}.dependsOn`, message: "Required array" });
|
|
102
|
-
}
|
|
103
|
-
if (!Array.isArray(task.expectedFiles)) {
|
|
104
|
-
errors.push({ path: `tasks.${taskKey}.expectedFiles`, message: "Required array" });
|
|
105
|
-
}
|
|
106
|
-
if (!Array.isArray(task.testCommands)) {
|
|
107
|
-
errors.push({ path: `tasks.${taskKey}.testCommands`, message: "Required array" });
|
|
108
|
-
}
|
|
109
|
-
// v2: acceptanceCriteria
|
|
110
|
-
if (!Array.isArray(task.acceptanceCriteria)) {
|
|
111
|
-
errors.push({ path: `tasks.${taskKey}.acceptanceCriteria`, message: "Required array" });
|
|
112
|
-
}
|
|
113
|
-
// v2: verifyCommands
|
|
114
|
-
if (!Array.isArray(task.verifyCommands)) {
|
|
115
|
-
errors.push({ path: `tasks.${taskKey}.verifyCommands`, message: "Required array" });
|
|
116
|
-
}
|
|
117
|
-
// v2: tddPolicy
|
|
118
|
-
if (!task.tddPolicy || typeof task.tddPolicy !== "object") {
|
|
119
|
-
errors.push({ path: `tasks.${taskKey}.tddPolicy`, message: "Required object" });
|
|
120
|
-
}
|
|
121
|
-
// v2: tddEvidence
|
|
122
|
-
if (!task.tddEvidence || typeof task.tddEvidence !== "object") {
|
|
123
|
-
errors.push({ path: `tasks.${taskKey}.tddEvidence`, message: "Required object" });
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* 验证 Task DAG:
|
|
128
|
-
* - Task ID 唯一
|
|
129
|
-
* - record key 与 Task.id 一致
|
|
130
|
-
* - 所有依赖存在
|
|
131
|
-
* - 禁止自依赖
|
|
132
|
-
* - 检测环路
|
|
133
|
-
*/
|
|
134
|
-
export function validateFlowRunDag(tasks) {
|
|
135
|
-
const errors = [];
|
|
136
|
-
// Task ID 唯一(Record key 天然唯一,检查 key 与 id 是否一致)
|
|
137
|
-
const seenIds = new Set();
|
|
138
|
-
for (const [key, task] of Object.entries(tasks)) {
|
|
139
|
-
if (key !== task.id) {
|
|
140
|
-
errors.push({ path: `tasks.${key}`, message: `Record key "${key}" does not match task.id "${task.id}"` });
|
|
141
|
-
}
|
|
142
|
-
if (seenIds.has(task.id)) {
|
|
143
|
-
errors.push({ path: `tasks.${key}`, message: `Duplicate task id "${task.id}"` });
|
|
144
|
-
}
|
|
145
|
-
seenIds.add(task.id);
|
|
146
|
-
}
|
|
147
|
-
// 禁止自依赖 + 依赖存在
|
|
148
|
-
for (const [key, task] of Object.entries(tasks)) {
|
|
149
|
-
for (const dep of task.dependsOn) {
|
|
150
|
-
if (dep === task.id) {
|
|
151
|
-
errors.push({ path: `tasks.${key}.dependsOn`, message: `Task "${task.id}" depends on itself` });
|
|
152
|
-
}
|
|
153
|
-
if (!seenIds.has(dep)) {
|
|
154
|
-
errors.push({ path: `tasks.${key}.dependsOn`, message: `Dependency "${dep}" not found in tasks` });
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
// 环路检测(拓扑排序)
|
|
159
|
-
if (errors.length === 0) {
|
|
160
|
-
const cycleError = detectCycle(tasks, seenIds);
|
|
161
|
-
if (cycleError) {
|
|
162
|
-
errors.push(cycleError);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return errors;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* 拓扑排序检测环路,返回发现环路时的错误
|
|
169
|
-
*/
|
|
170
|
-
function detectCycle(tasks, allIds) {
|
|
171
|
-
const inDegree = new Map();
|
|
172
|
-
const adjacency = new Map();
|
|
173
|
-
for (const id of allIds) {
|
|
174
|
-
inDegree.set(id, 0);
|
|
175
|
-
adjacency.set(id, []);
|
|
176
|
-
}
|
|
177
|
-
for (const task of Object.values(tasks)) {
|
|
178
|
-
for (const dep of task.dependsOn) {
|
|
179
|
-
adjacency.get(dep).push(task.id);
|
|
180
|
-
inDegree.set(task.id, (inDegree.get(task.id) ?? 0) + 1);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const queue = [];
|
|
184
|
-
for (const [id, degree] of inDegree) {
|
|
185
|
-
if (degree === 0)
|
|
186
|
-
queue.push(id);
|
|
187
|
-
}
|
|
188
|
-
let visitedCount = 0;
|
|
189
|
-
while (queue.length > 0) {
|
|
190
|
-
const current = queue.shift();
|
|
191
|
-
visitedCount++;
|
|
192
|
-
for (const neighbor of adjacency.get(current) ?? []) {
|
|
193
|
-
const newDegree = (inDegree.get(neighbor) ?? 1) - 1;
|
|
194
|
-
inDegree.set(neighbor, newDegree);
|
|
195
|
-
if (newDegree === 0)
|
|
196
|
-
queue.push(neighbor);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (visitedCount !== allIds.size) {
|
|
200
|
-
// 找出环路中的节点
|
|
201
|
-
const cycleNodes = [...allIds].filter(id => (inDegree.get(id) ?? 0) > 0);
|
|
202
|
-
return {
|
|
203
|
-
path: "tasks",
|
|
204
|
-
message: `Circular dependency detected involving: ${cycleNodes.join(", ")}`,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
return null;
|
|
208
|
-
}
|
|
209
|
-
//# sourceMappingURL=validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/flowrun/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,GAEvF,MAAM,YAAY,CAAA;AAInB,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,MAAM,MAAM,GAAsB,EAAE,CAAA;IAEpC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC,CAAA;QACvE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;IAC/B,CAAC;IAED,MAAM,GAAG,GAAG,GAA8B,CAAA;IAE1C,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAA;IAChE,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAA;IAC3D,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,iBAAiB,KAAK,QAAQ,IAAI,GAAG,CAAC,iBAAiB,IAAI,CAAC,EAAE,CAAC;QAC5E,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,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