@leitwerk-dev/coding 0.2.1 → 0.3.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 +18 -12
- package/dist/actions.d.ts +0 -5
- package/dist/actions.d.ts.map +1 -1
- package/dist/auto-work-branch-internal.d.ts +2 -18
- package/dist/auto-work-branch-internal.d.ts.map +1 -1
- package/dist/auto-work-branch.d.ts +1 -2
- package/dist/auto-work-branch.d.ts.map +1 -1
- package/dist/auto-work-branch.js +17 -94
- package/dist/auto-work-branch.js.map +1 -1
- package/dist/chunk-GO44KCUS.js +154 -0
- package/dist/chunk-GO44KCUS.js.map +1 -0
- package/dist/finalization-git-internal.d.ts +6 -45
- package/dist/finalization-git-internal.d.ts.map +1 -1
- package/dist/finalization-git.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -91
- package/dist/index.js.map +1 -1
- package/dist/repository-change-launch-internal.d.ts +3 -84
- package/dist/repository-change-launch-internal.d.ts.map +1 -1
- package/dist/repository-change-launch.d.ts +2 -2
- package/dist/repository-change-launch.d.ts.map +1 -1
- package/dist/repository-change-launch.js +2 -159
- package/dist/repository-change-launch.js.map +1 -1
- package/dist/repository-change-process.d.ts +7 -19
- package/dist/repository-change-process.d.ts.map +1 -1
- package/dist/repository-change-publication.d.ts +229 -0
- package/dist/repository-change-publication.d.ts.map +1 -0
- package/dist/repository-change-publication.js +368 -0
- package/dist/repository-change-publication.js.map +1 -0
- package/dist/repository-change-state-internal.d.ts +2 -11
- package/dist/repository-change-state-internal.d.ts.map +1 -1
- package/dist/repository-change-state.d.ts +0 -1
- package/dist/repository-change-state.d.ts.map +1 -1
- package/dist/repository-change-state.js +0 -7
- package/package.json +10 -4
- package/src/actions.ts +0 -13
- package/src/auto-work-branch-internal.ts +22 -130
- package/src/auto-work-branch.ts +1 -7
- package/src/finalization-git-internal.ts +60 -697
- package/src/index.ts +0 -1
- package/src/repository-change-launch-internal.ts +4 -268
- package/src/repository-change-launch.ts +1 -6
- package/src/repository-change-process.ts +8 -126
- package/src/repository-change-publication.ts +689 -0
- package/src/repository-change-state-internal.ts +4 -34
- package/src/repository-change-state.ts +0 -1
- package/dist/chunk-HUVXPZSF.js +0 -61
- package/dist/chunk-HUVXPZSF.js.map +0 -1
- package/dist/chunk-MY6XFGHM.js +0 -614
- package/dist/chunk-MY6XFGHM.js.map +0 -1
- package/dist/chunk-OERAYSVI.js +0 -27
- package/dist/chunk-OERAYSVI.js.map +0 -1
- package/dist/turns/resolve-merge-conflict.d.ts +0 -4
- package/dist/turns/resolve-merge-conflict.d.ts.map +0 -1
- package/dist/turns/resolve-merge-conflict.js +0 -8
- package/dist/turns/resolve-merge-conflict.js.map +0 -1
- package/src/turns/resolve-merge-conflict.ts +0 -26
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildGeneratePlanPrompt
|
|
3
|
+
} from "./chunk-W7VJT6AN.js";
|
|
1
4
|
import {
|
|
2
5
|
buildImplementPrompt
|
|
3
6
|
} from "./chunk-YSC5GEQJ.js";
|
|
4
|
-
import {
|
|
5
|
-
buildResolveMergeConflictPrompt
|
|
6
|
-
} from "./chunk-OERAYSVI.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewImplementationPrompt
|
|
9
9
|
} from "./chunk-R3UCUGY6.js";
|
|
@@ -13,22 +13,10 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
buildSimplifyImplementationPrompt
|
|
15
15
|
} from "./chunk-F6CEEAFE.js";
|
|
16
|
-
import {
|
|
17
|
-
runDeterministicFinalization
|
|
18
|
-
} from "./chunk-MY6XFGHM.js";
|
|
19
|
-
import {
|
|
20
|
-
clearReviewRefs,
|
|
21
|
-
createEmptyRepositoryChangeFinalizationState,
|
|
22
|
-
repositoryChangeStateCodec,
|
|
23
|
-
resetRepositoryChangeFinalizationState
|
|
24
|
-
} from "./chunk-HUVXPZSF.js";
|
|
25
16
|
import {
|
|
26
17
|
buildGenerateCommitMessagePrompt,
|
|
27
18
|
normalizeGeneratedCommitMessage
|
|
28
19
|
} from "./chunk-WKHVLLKE.js";
|
|
29
|
-
import {
|
|
30
|
-
buildGeneratePlanPrompt
|
|
31
|
-
} from "./chunk-W7VJT6AN.js";
|
|
32
20
|
import "./chunk-PX6F3LHL.js";
|
|
33
21
|
|
|
34
22
|
// src/actions.ts
|
|
@@ -86,14 +74,6 @@ var acceptReviewForm = {
|
|
|
86
74
|
],
|
|
87
75
|
submitLabel: "Accept review"
|
|
88
76
|
};
|
|
89
|
-
function createFinalizeChangeForm(copy) {
|
|
90
|
-
return {
|
|
91
|
-
id: codingActionIds.finalizeChange,
|
|
92
|
-
title: copy.title,
|
|
93
|
-
fields: [],
|
|
94
|
-
submitLabel: copy.title
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
77
|
|
|
98
78
|
// src/repository-change-process.ts
|
|
99
79
|
import { trimString as normalizeMessage, normalizeOptionalMarkdown } from "@leitwerk-dev/domain";
|
|
@@ -104,9 +84,45 @@ import {
|
|
|
104
84
|
humanTurn,
|
|
105
85
|
revisionAction
|
|
106
86
|
} from "@leitwerk-dev/process-sdk";
|
|
87
|
+
|
|
88
|
+
// src/repository-change-state-internal.ts
|
|
89
|
+
import { parseStructuralProcessState } from "@leitwerk-dev/process-sdk";
|
|
90
|
+
function createEmptyRepositoryChangeFinalizationState() {
|
|
91
|
+
return { generatedCommitMessage: null };
|
|
92
|
+
}
|
|
93
|
+
function stringOrNull(value) {
|
|
94
|
+
return typeof value === "string" ? value : null;
|
|
95
|
+
}
|
|
96
|
+
function toRecord(value) {
|
|
97
|
+
return typeof value === "object" && value !== null ? value : {};
|
|
98
|
+
}
|
|
99
|
+
function parseFinalizationState(value) {
|
|
100
|
+
const record = toRecord(value);
|
|
101
|
+
return { generatedCommitMessage: stringOrNull(record.generatedCommitMessage) };
|
|
102
|
+
}
|
|
103
|
+
var repositoryChangeStateCodec = {
|
|
104
|
+
parse(value) {
|
|
105
|
+
const record = toRecord(value);
|
|
106
|
+
return {
|
|
107
|
+
...parseStructuralProcessState(record),
|
|
108
|
+
finalization: parseFinalizationState(record.finalization),
|
|
109
|
+
extensionState: toRecord(record.extensionState)
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
serialize(value) {
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
function clearReviewRefs(semanticEntryRefs) {
|
|
117
|
+
return {
|
|
118
|
+
...semanticEntryRefs,
|
|
119
|
+
review: null
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// src/repository-change-process.ts
|
|
107
124
|
function createRepositoryChangeProcess(config) {
|
|
108
125
|
const turnIds = {
|
|
109
|
-
importPlan: "import_plan",
|
|
110
126
|
generatePlan: "generate_plan",
|
|
111
127
|
planDecision: "plan_decision",
|
|
112
128
|
reviewPlan: "review_plan",
|
|
@@ -117,25 +133,16 @@ function createRepositoryChangeProcess(config) {
|
|
|
117
133
|
implementationReviewFeedback: "implementation_review_feedback",
|
|
118
134
|
simplifyImplementation: "simplify_implementation",
|
|
119
135
|
simplificationDecision: "simplification_decision",
|
|
120
|
-
generateCommitMessage: "generate_commit_message"
|
|
121
|
-
commitAndMerge: "commit_and_merge",
|
|
122
|
-
resolveMergeConflict: "resolve_merge_conflict"
|
|
136
|
+
generateCommitMessage: "generate_commit_message"
|
|
123
137
|
};
|
|
124
138
|
const products = {
|
|
125
139
|
plan: "plan",
|
|
126
140
|
review: "review",
|
|
127
141
|
simplificationPlan: "simplification-plan",
|
|
128
142
|
implementationSummary: "implementation-summary",
|
|
129
|
-
mergeResolutionSummary: "merge-resolution-summary",
|
|
130
143
|
commitMessage: "commit-message"
|
|
131
144
|
};
|
|
132
145
|
const implementationTurnAvailableTools = ["read", "bash", "edit", "write"];
|
|
133
|
-
function resetFinalizationAfterMessage(state, overrides = {}) {
|
|
134
|
-
return resetRepositoryChangeFinalizationState({
|
|
135
|
-
generatedCommitMessage: state.finalization.generatedCommitMessage,
|
|
136
|
-
...overrides
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
146
|
function hasResolvedTurnRecordRef(ref) {
|
|
140
147
|
return typeof ref?.turnRecordId === "string" && ref.turnRecordId.trim() !== "";
|
|
141
148
|
}
|
|
@@ -318,7 +325,7 @@ function createRepositoryChangeProcess(config) {
|
|
|
318
325
|
required: true
|
|
319
326
|
}
|
|
320
327
|
],
|
|
321
|
-
commentary: "
|
|
328
|
+
commentary: "Publish this implementation, request another pass, simplify it, or run an automated review.",
|
|
322
329
|
actions: {
|
|
323
330
|
[codingActionIds.finalizeChange]: {
|
|
324
331
|
label: config.finalizeLabel,
|
|
@@ -463,23 +470,6 @@ function createRepositoryChangeProcess(config) {
|
|
|
463
470
|
}
|
|
464
471
|
}
|
|
465
472
|
});
|
|
466
|
-
const importPlanTurn = flow.automatic(turnIds.importPlan).description("Import handoff plan").run((ctx) => {
|
|
467
|
-
const planMarkdown = ctx.params.launchKind === "imported_plan" ? normalizeOptionalMarkdown(ctx.params.importedPlanMarkdown) : null;
|
|
468
|
-
if (!planMarkdown) {
|
|
469
|
-
throw new Error("No importedPlanMarkdown is available to import");
|
|
470
|
-
}
|
|
471
|
-
return {
|
|
472
|
-
outcome: "imported",
|
|
473
|
-
params: { plan: planMarkdown },
|
|
474
|
-
markdown: planMarkdown
|
|
475
|
-
};
|
|
476
|
-
}).outcome(
|
|
477
|
-
"imported",
|
|
478
|
-
(outcome) => outcome.description("Imported a handoff plan and skipped replanning").markdown("plan", { description: "Imported handoff plan", publish: true }).to(turnIds.implement).effect(({ ctx }) => ({
|
|
479
|
-
processPatch: { planRevision: ctx.process.planRevision + 1 },
|
|
480
|
-
state: clearReviewState(ctx.state)
|
|
481
|
-
}))
|
|
482
|
-
);
|
|
483
473
|
const generatePlanTurn = flow.llm(turnIds.generatePlan).description("Plan").tools("read", "bash").askQuestions().freshPrimary().buildPrompt(buildGeneratePlanPrompt).outcomeTool(
|
|
484
474
|
"plan_saved",
|
|
485
475
|
(tool) => tool.description(
|
|
@@ -550,7 +540,7 @@ function createRepositoryChangeProcess(config) {
|
|
|
550
540
|
).to(turnIds.implementationReviewFeedback)
|
|
551
541
|
).publish(products.review);
|
|
552
542
|
const simplifyImplementationTurn = flow.llm(turnIds.simplifyImplementation).description("Simplify").tools("read", "bash").rootBranchReview().startFromProductBranch(products.simplificationPlan).buildPrompt(buildSimplifyImplementationPrompt).publish(products.simplificationPlan).to(turnIds.simplificationDecision);
|
|
553
|
-
const generateCommitMessageTurn = flow.llm(turnIds.generateCommitMessage).description("Write Commit Message").modelPurpose("process_title_generation").rootBranchReview().startFromRoot().consume(products.plan).buildPrompt(buildGenerateCommitMessagePrompt).publish(products.commitMessage).to(config.publication
|
|
543
|
+
const generateCommitMessageTurn = flow.llm(turnIds.generateCommitMessage).description("Write Commit Message").modelPurpose("process_title_generation").rootBranchReview().startFromRoot().consume(products.plan).buildPrompt(buildGenerateCommitMessagePrompt).publish(products.commitMessage).to(config.publication.entryTurnId).state(
|
|
554
544
|
({ ctx }) => patchRepositoryChangeState(ctx.state, {
|
|
555
545
|
finalization: {
|
|
556
546
|
...ctx.state.finalization,
|
|
@@ -558,50 +548,17 @@ function createRepositoryChangeProcess(config) {
|
|
|
558
548
|
}
|
|
559
549
|
})
|
|
560
550
|
);
|
|
561
|
-
const
|
|
562
|
-
"merge_conflict",
|
|
563
|
-
(outcome) => outcome.description("Deterministic merge hit conflicts and needs conflict resolution").requiredString("headSha", "The current HEAD sha while the merge conflict is active").stringArray("conflictedFiles", "Conflicted files that need resolution").string("fetchedBaseSha", "The fetched origin/<baseBranch> sha when available").to(turnIds.resolveMergeConflict).state(
|
|
564
|
-
({ ctx }) => patchRepositoryChangeState(ctx.state, {
|
|
565
|
-
finalization: resetFinalizationAfterMessage(ctx.state)
|
|
566
|
-
})
|
|
567
|
-
)
|
|
568
|
-
).outcome(
|
|
569
|
-
"finalized",
|
|
570
|
-
(outcome) => outcome.description("Deterministic finalization succeeded").requiredString("headSha", "The final HEAD sha").requiredString("mergeMode", "How origin/<baseBranch> was integrated").requiredString("pushTarget", "The final base-branch publish target").requiredBoolean("usedConflictResolution", "Whether the merge required conflict resolution").complete().state(
|
|
571
|
-
({ ctx, event }) => patchRepositoryChangeState(ctx.state, {
|
|
572
|
-
finalization: resetFinalizationAfterMessage(ctx.state, {
|
|
573
|
-
usedConflictResolution: event.params.usedConflictResolution === true || ctx.state.finalization.usedConflictResolution,
|
|
574
|
-
finalizationSummaryMarkdown: normalizeOptionalMarkdown(ctx.output?.content),
|
|
575
|
-
finalizedHeadSha: normalizeMessage(event.params.headSha)
|
|
576
|
-
})
|
|
577
|
-
})
|
|
578
|
-
)
|
|
579
|
-
);
|
|
580
|
-
const resolveMergeConflictTurn = flow.llm(turnIds.resolveMergeConflict).description("Resolve merge conflict").tools("read", "bash", "edit", "write").fullPrimary().startFromRoot().buildPrompt(buildResolveMergeConflictPrompt).outcomeTool(
|
|
581
|
-
"clean",
|
|
582
|
-
(tool) => tool.description("The merge conflict was resolved and the repository is clean").requiredString("headSha", "The post-resolution HEAD sha").to(turnIds.commitAndMerge).state(
|
|
583
|
-
({ ctx, event }) => patchRepositoryChangeState(ctx.state, {
|
|
584
|
-
finalization: resetFinalizationAfterMessage(ctx.state, {
|
|
585
|
-
expectedPostConflictHeadSha: normalizeMessage(event.params.headSha),
|
|
586
|
-
usedConflictResolution: true
|
|
587
|
-
})
|
|
588
|
-
})
|
|
589
|
-
)
|
|
590
|
-
).publish(products.mergeResolutionSummary);
|
|
591
|
-
const planFlow = flow.fragment("plan").turn(importPlanTurn).turn(generatePlanTurn).turn({ id: turnIds.planDecision, definition: planDecisionSpec }).turn(reviewPlanTurn).turn({ id: turnIds.planReviewFeedback, definition: planReviewFeedbackSpec });
|
|
551
|
+
const planFlow = flow.fragment("plan").turn(generatePlanTurn).turn({ id: turnIds.planDecision, definition: planDecisionSpec }).turn(reviewPlanTurn).turn({ id: turnIds.planReviewFeedback, definition: planReviewFeedbackSpec });
|
|
592
552
|
const implementationFlow = flow.fragment("implementation").turn(implementTurn).turn({ id: turnIds.implementationDecision, definition: implementationDecisionSpec }).turn(reviewImplementationTurn).turn({
|
|
593
553
|
id: turnIds.implementationReviewFeedback,
|
|
594
554
|
definition: implementationReviewFeedbackSpec
|
|
595
555
|
}).turn(simplifyImplementationTurn).turn({ id: turnIds.simplificationDecision, definition: simplificationDecisionSpec });
|
|
596
556
|
const finalizationFlow = flow.fragment("finalization").turn(generateCommitMessageTurn);
|
|
597
|
-
|
|
598
|
-
finalizationFlow.turn(commitAndMergeTurn).turn(resolveMergeConflictTurn);
|
|
599
|
-
}
|
|
600
|
-
const builder = flow.process(config.processId).displayName(config.displayName).entry(turnIds.generatePlan).alternateEntry(turnIds.importPlan).happyPath(
|
|
557
|
+
const builder = flow.process(config.processId).displayName(config.displayName).entry(turnIds.generatePlan).happyPath(
|
|
601
558
|
turnIds.generatePlan,
|
|
602
559
|
turnIds.implement,
|
|
603
560
|
turnIds.generateCommitMessage,
|
|
604
|
-
...config.publication
|
|
561
|
+
...config.publication.happyPath ?? [config.publication.entryTurnId]
|
|
605
562
|
).piConfig({ sessionCwdTemplate: "{{{projectKey}}}" }).codecs({
|
|
606
563
|
params: config.paramsCodec,
|
|
607
564
|
state: repositoryChangeStateCodec
|
|
@@ -610,11 +567,12 @@ function createRepositoryChangeProcess(config) {
|
|
|
610
567
|
finalization: createEmptyRepositoryChangeFinalizationState(),
|
|
611
568
|
extensionState: {}
|
|
612
569
|
})).use(planFlow).use(implementationFlow).use(finalizationFlow);
|
|
613
|
-
|
|
570
|
+
builder.use(config.publication.fragment);
|
|
614
571
|
if (config.repositoryCredentials) builder.repositoryCredentials(config.repositoryCredentials);
|
|
615
572
|
if (config.launcher) builder.launcher(config.launcher);
|
|
616
573
|
const process = builder.define();
|
|
617
574
|
const decision = (id) => ({
|
|
575
|
+
/** @public */
|
|
618
576
|
id,
|
|
619
577
|
...process.turns.get(id)?.definition
|
|
620
578
|
});
|
|
@@ -646,7 +604,6 @@ var index_default = extension;
|
|
|
646
604
|
export {
|
|
647
605
|
acceptReviewForm,
|
|
648
606
|
codingActionIds,
|
|
649
|
-
createFinalizeChangeForm,
|
|
650
607
|
createRepositoryChangeProcess,
|
|
651
608
|
index_default as default,
|
|
652
609
|
requestReviewChangesForm,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/actions.ts","../src/repository-change-process.ts","../src/index.ts"],"sourcesContent":["import type { FormDefinition } from \"@leitwerk-dev/process-sdk\";\n\n/** @public */\nexport const codingActionIds = {\n\t/** @public */\n\tapprovePlan: \"approve_plan\",\n\t/** @internal */\n\trequestRevision: \"request_revision\",\n\t/** @internal */\n\trunReview: \"run_review\",\n\t/** @internal */\n\tsimplify: \"simplify\",\n\t/** @internal */\n\tacceptReview: \"accept_review\",\n\t/** @internal */\n\trequestReviewChanges: \"request_review_changes\",\n\t/** @internal */\n\tdismissReview: \"dismiss_review\",\n\t/** @public */\n\tfinalizeChange: \"finalize_change\",\n} as const;\n\nfunction notesForm(id: string, title: string, label: string, description: string): FormDefinition {\n\treturn {\n\t\tid,\n\t\ttitle,\n\t\tfields: [\n\t\t\t{ id: \"message\", label, kind: \"textarea\", primaryPrompt: true, required: true, description },\n\t\t],\n\t\tsubmitLabel: title,\n\t};\n}\n\n/** @internal */\nexport const requestRevisionForm = notesForm(\n\tcodingActionIds.requestRevision,\n\t\"Request revision\",\n\t\"Revision notes\",\n\t\"Instructions for the next implementation pass.\",\n);\n/** @internal */\nexport const requestReviewChangesForm = notesForm(\n\tcodingActionIds.requestReviewChanges,\n\t\"Request review changes\",\n\t\"Review notes\",\n\t\"Instructions for the next review pass.\",\n);\n/** @internal */\nexport const acceptReviewForm: FormDefinition = {\n\tid: codingActionIds.acceptReview,\n\ttitle: \"Accept review\",\n\tfields: [\n\t\t{\n\t\t\tid: \"message\",\n\t\t\tlabel: \"Review adjustment\",\n\t\t\tkind: \"textarea\",\n\t\t\tprimaryPrompt: true,\n\t\t\tdescription:\n\t\t\t\t\"Optional instructions to apply with the accepted review, such as dropping one finding.\",\n\t\t},\n\t],\n\tsubmitLabel: \"Accept review\",\n};\n\n/** @internal */\nexport function createFinalizeChangeForm(copy: {\n\t/** @internal */\n\ttitle: string;\n}): FormDefinition {\n\treturn {\n\t\tid: codingActionIds.finalizeChange,\n\t\ttitle: copy.title,\n\t\tfields: [],\n\t\tsubmitLabel: copy.title,\n\t};\n}\n","import { trimString as normalizeMessage, normalizeOptionalMarkdown } from \"@leitwerk-dev/domain\";\nimport {\n\tacceptedReviewHandoffAction,\n\ttype Codec,\n\tcreateEmptyStructuralProcessState,\n\ttype FlowFragmentBuilder,\n\ttype FormDefinition,\n\tflow,\n\ttype HumanTurnDefinition,\n\thumanTurn,\n\ttype ProcessLauncherDefinition,\n\ttype RepositoryCredentialProject,\n\ttype RepositoryCredentialRequirement,\n\trevisionAction,\n} from \"@leitwerk-dev/process-sdk\";\nimport {\n\tacceptReviewForm,\n\tcodingActionIds,\n\trequestReviewChangesForm,\n\trequestRevisionForm,\n} from \"./actions.js\";\nimport { runDeterministicFinalization } from \"./finalization-git-internal.js\";\nimport {\n\tclearReviewRefs,\n\tcreateEmptyRepositoryChangeFinalizationState,\n\ttype RepositoryChangeState,\n\trepositoryChangeStateCodec,\n\tresetRepositoryChangeFinalizationState,\n} from \"./repository-change-state-internal.js\";\nimport {\n\tbuildGenerateCommitMessagePrompt,\n\tnormalizeGeneratedCommitMessage,\n} from \"./turns/generate-commit-message.js\";\nimport { buildGeneratePlanPrompt } from \"./turns/generate-plan.js\";\nimport { buildImplementPrompt } from \"./turns/implement.js\";\nimport { buildResolveMergeConflictPrompt } from \"./turns/resolve-merge-conflict.js\";\nimport { buildReviewImplementationPrompt } from \"./turns/review-implementation.js\";\nimport { buildReviewPlanPrompt } from \"./turns/review-plan.js\";\nimport { buildSimplifyImplementationPrompt } from \"./turns/simplify-implementation.js\";\n\n/** @public */\nexport type RepositoryChangeParams = {\n\t/** @internal */\n\tlaunchKind: \"requested_change\" | \"imported_plan\";\n\t/** @internal */\n\timportedPlanMarkdown?: string;\n};\n\n/** @public */\nexport interface RepositoryChangeProcessConfig<TParams extends RepositoryChangeParams> {\n\t/** @public */\n\tprocessId: string;\n\t/** @public */\n\tdisplayName: string;\n\t/** @public */\n\tparamsCodec: Codec<TParams>;\n\t/** @public */\n\tlauncher?: ProcessLauncherDefinition<TParams>;\n\t/** @public */\n\tfinalizeLabel: string;\n\t/** @public */\n\tfinalizeForm: FormDefinition;\n\t/** @public */\n\tfinalizationDescription: string;\n\t/** @public */\n\trepositoryCredentials?(input: {\n\t\t/** @public */\n\t\tparams: TParams;\n\t\t/** @internal */\n\t\tprojects: readonly RepositoryCredentialProject[];\n\t}): readonly RepositoryCredentialRequirement[];\n\t/** @public */\n\tpublication?: {\n\t\t/** @public */\n\t\tentryTurnId: string;\n\t\t/** @public */\n\t\tfragment: FlowFragmentBuilder<TParams, RepositoryChangeState>;\n\t\t/** @public */\n\t\thappyPath?: readonly string[];\n\t};\n}\n\n/** @public */\nexport function createRepositoryChangeProcess<TParams extends RepositoryChangeParams>(\n\tconfig: RepositoryChangeProcessConfig<TParams>,\n) {\n\tconst turnIds = {\n\t\timportPlan: \"import_plan\",\n\t\tgeneratePlan: \"generate_plan\",\n\t\tplanDecision: \"plan_decision\",\n\t\treviewPlan: \"review_plan\",\n\t\tplanReviewFeedback: \"plan_review_feedback\",\n\t\timplement: \"implement\",\n\t\timplementationDecision: \"implementation_decision\",\n\t\treviewImplementation: \"review_implementation\",\n\t\timplementationReviewFeedback: \"implementation_review_feedback\",\n\t\tsimplifyImplementation: \"simplify_implementation\",\n\t\tsimplificationDecision: \"simplification_decision\",\n\t\tgenerateCommitMessage: \"generate_commit_message\",\n\t\tcommitAndMerge: \"commit_and_merge\",\n\t\tresolveMergeConflict: \"resolve_merge_conflict\",\n\t} as const;\n\n\tconst products = {\n\t\tplan: \"plan\",\n\t\treview: \"review\",\n\t\tsimplificationPlan: \"simplification-plan\",\n\t\timplementationSummary: \"implementation-summary\",\n\t\tmergeResolutionSummary: \"merge-resolution-summary\",\n\t\tcommitMessage: \"commit-message\",\n\t} as const;\n\n\tconst implementationTurnAvailableTools = [\"read\", \"bash\", \"edit\", \"write\"] as const;\n\n\tfunction resetFinalizationAfterMessage(\n\t\tstate: RepositoryChangeState,\n\t\toverrides: Partial<RepositoryChangeState[\"finalization\"]> = {},\n\t) {\n\t\treturn resetRepositoryChangeFinalizationState({\n\t\t\tgeneratedCommitMessage: state.finalization.generatedCommitMessage,\n\t\t\t...overrides,\n\t\t});\n\t}\n\n\tfunction hasResolvedTurnRecordRef(\n\t\tref: RepositoryChangeState[\"semanticEntryRefs\"][keyof RepositoryChangeState[\"semanticEntryRefs\"]],\n\t): ref is { entryId: string; turnRecordId: string } {\n\t\treturn typeof ref?.turnRecordId === \"string\" && ref.turnRecordId.trim() !== \"\";\n\t}\n\n\tfunction requireResolvedPlanRef(\n\t\tplan: RepositoryChangeState[\"semanticEntryRefs\"][keyof RepositoryChangeState[\"semanticEntryRefs\"]],\n\t\tusage: \"approval\" | \"review\" | \"simplification review\" | \"implementation review\",\n\t): asserts plan is { entryId: string; turnRecordId: string } {\n\t\tif (!hasResolvedTurnRecordRef(plan)) {\n\t\t\tthrow new Error(`No plan is available for ${usage}`);\n\t\t}\n\t}\n\n\tfunction clearReviewState(state: RepositoryChangeState): RepositoryChangeState {\n\t\treturn patchRepositoryChangeState(state, {\n\t\t\tclearReviewRefs: true,\n\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t});\n\t}\n\n\tfunction buildAcceptedFollowUpMessage(input: {\n\t\tkind: \"plan_review\" | \"implementation_review\" | \"simplification\";\n\t\tmarkdown: unknown;\n\t\tadjustment: unknown;\n\t}): string {\n\t\tconst markdown = normalizeOptionalMarkdown(input.markdown);\n\t\tif (!markdown) {\n\t\t\tthrow new Error(\n\t\t\t\tinput.kind === \"simplification\"\n\t\t\t\t\t? \"No simplification plan markdown is available to accept\"\n\t\t\t\t\t: \"No review output markdown is available to accept\",\n\t\t\t);\n\t\t}\n\t\tconst adjustment = normalizeMessage(input.adjustment);\n\t\tconst subject = input.kind === \"simplification\" ? \"simplification plan\" : \"review\";\n\t\tconst introduction =\n\t\t\tinput.kind === \"plan_review\"\n\t\t\t\t? \"Revise the plan according to this review:\"\n\t\t\t\t: `Implement according to this ${subject}:`;\n\t\tconst sections = [introduction, markdown];\n\t\tif (adjustment) {\n\t\t\tsections.push(\n\t\t\t\t`Also follow this adjustment where it conflicts with the ${subject}:`,\n\t\t\t\tadjustment,\n\t\t\t);\n\t\t}\n\t\tif (input.kind !== \"plan_review\") {\n\t\t\tsections.push(\n\t\t\t\t[\n\t\t\t\t\t\"This is now an implementation turn. Ignore earlier review-only or read-only instructions.\",\n\t\t\t\t\t\"You may change files in the repository workspace.\",\n\t\t\t\t\t`Use the available tools (${implementationTurnAvailableTools.join(\", \")}) to inspect, edit, build, and test the change.`,\n\t\t\t\t\t\"When finished, return an implementation summary.\",\n\t\t\t\t].join(\"\\n\"),\n\t\t\t);\n\t\t}\n\t\treturn sections.join(\"\\n\\n\");\n\t}\n\n\tfunction patchRepositoryChangeState(\n\t\tstate: RepositoryChangeState,\n\t\tinput: {\n\t\t\tfinalization?: RepositoryChangeState[\"finalization\"];\n\t\t\tclearReviewRefs?: boolean;\n\t\t\tclearProductRefs?: readonly string[];\n\t\t},\n\t): RepositoryChangeState {\n\t\tconst nextState: RepositoryChangeState = {\n\t\t\t...state,\n\t\t\t...(\"finalization\" in input ? { finalization: input.finalization } : {}),\n\t\t};\n\t\tconst productRefsToClear = new Set(input.clearProductRefs ?? []);\n\t\tif (input.clearReviewRefs) {\n\t\t\tproductRefsToClear.add(products.review);\n\t\t}\n\t\tif (!input.clearReviewRefs && productRefsToClear.size === 0) {\n\t\t\treturn nextState;\n\t\t}\n\t\tconst productRefs = { ...nextState.productRefs };\n\t\tfor (const productName of productRefsToClear) {\n\t\t\tdelete productRefs[productName];\n\t\t}\n\t\treturn {\n\t\t\t...nextState,\n\t\t\tsemanticEntryRefs: input.clearReviewRefs\n\t\t\t\t? clearReviewRefs(nextState.semanticEntryRefs)\n\t\t\t\t: nextState.semanticEntryRefs,\n\t\t\tproductRefs,\n\t\t};\n\t}\n\n\tconst planDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review Plan\",\n\t\treviewSemanticRef: \"plan\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Revision notes\",\n\t\t\t\tplaceholder: \"Describe what the next plan revision should improve\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary: \"Approve this plan, request a revision, or run an automated review.\",\n\t\tactions: {\n\t\t\t[codingActionIds.approvePlan]: {\n\t\t\t\tlabel: \"Approve plan\",\n\t\t\t\tdescription: \"Accept the current plan and continue into implementation.\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tto: turnIds.implement,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"approval\");\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\temit: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan_approved\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\texternalId: ctx.process.externalId,\n\t\t\t\t\t\t\t\t\tplanRevision: ctx.process.planRevision,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t\t[codingActionIds.requestRevision]: revisionAction({\n\t\t\t\tlabel: \"Request revision\",\n\t\t\t\tdescription: \"Send the plan back for another draft revision.\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestRevisionForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.generatePlan,\n\t\t\t\tqueueTarget: { semanticRef: \"currentPrimaryPathLeaf\" },\n\t\t\t\teffect: ({ ctx, input }) => {\n\t\t\t\t\tconst message = normalizeMessage(input.message);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\temit: [{ type: \"plan_revision_requested\", data: { message } }],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t}),\n\t\t\t[codingActionIds.runReview]: {\n\t\t\t\tlabel: \"Run automated review\",\n\t\t\t\tdescription: \"Send the current plan to the LLM reviewer.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewPlan,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"review\");\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\n\tconst planReviewFeedbackSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review Plan Feedback\",\n\t\treviewSemanticRef: \"review\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Review notes\",\n\t\t\t\tplaceholder: \"Describe how the next review pass should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Apply this feedback to the next plan revision, request a revised review, or dismiss it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept review\",\n\t\t\t\tdescription: \"Apply the current review outcome and continue with the plan flow.\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tto: turnIds.generatePlan,\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"plan_review\",\n\t\t\t\t\t\tmarkdown: ctx.readSemanticTurnResultMarkdown(\"review\"),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request review changes\",\n\t\t\t\tdescription: \"Ask the LLM reviewer to revise its plan review.\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tto: turnIds.reviewPlan,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Dismiss review\",\n\t\t\t\tdescription: \"Return to the plan decision without applying the review.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.planDecision,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst implementationDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review\",\n\t\treviewSemanticRef: \"currentPrimaryPathLeaf\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Revision notes\",\n\t\t\t\tplaceholder: \"Describe what the next implementation turn should improve\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Merge this implementation, request another pass, simplify it, or run an automated review.\",\n\t\tactions: {\n\t\t\t[codingActionIds.finalizeChange]: {\n\t\t\t\tlabel: config.finalizeLabel,\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: config.finalizeForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.generateCommitMessage,\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tfinalization: createEmptyRepositoryChangeFinalizationState(),\n\t\t\t\t\t\tclearReviewRefs: true,\n\t\t\t\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t},\n\t\t\t[codingActionIds.requestRevision]: revisionAction({\n\t\t\t\tlabel: \"Request revision\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestRevisionForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { semanticRef: \"currentPrimaryPathLeaf\" },\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.simplify]: {\n\t\t\t\tlabel: \"Simplify\",\n\t\t\t\tdescription: \"Ask for a focused simplification review before another implementation pass.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.simplifyImplementation,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"simplification review\");\n\t\t\t\t\treturn { state: clearReviewState(ctx.state) };\n\t\t\t\t},\n\t\t\t},\n\t\t\t[codingActionIds.runReview]: {\n\t\t\t\tlabel: \"Run automated review\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewImplementation,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"implementation review\");\n\t\t\t\t\treturn { state: clearReviewState(ctx.state) };\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\n\tconst implementationReviewFeedbackSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review implementation feedback\",\n\t\treviewSemanticRef: \"review\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Review notes\",\n\t\t\t\tplaceholder: \"Describe how the next implementation review pass should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Apply this feedback to the next implementation pass, request a revised review, or dismiss it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept review\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"implementation_review\",\n\t\t\t\t\t\tmarkdown: ctx.readSemanticTurnResultMarkdown(\"review\"),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request review changes\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewImplementation,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Dismiss review\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.implementationDecision,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst simplificationDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review simplification plan\",\n\t\treviewProduct: products.simplificationPlan,\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Simplification notes\",\n\t\t\t\tplaceholder: \"Describe how the simplification plan should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary: \"Apply this simplification plan, request changes to it, or reject it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept simplification plan\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { productName: products.simplificationPlan },\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"simplification\",\n\t\t\t\t\t\tmarkdown: ctx.readProductTurnResultMarkdown(products.simplificationPlan),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tclearReviewRefs: true,\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request simplification changes\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tto: turnIds.simplifyImplementation,\n\t\t\t\tqueueTarget: { productName: products.simplificationPlan },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Reject simplification plan\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Return to the implementation decision without applying the simplification plan.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.implementationDecision,\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t}),\n\t\t\t},\n\t\t},\n\t});\n\n\tconst importPlanTurn = flow\n\t\t.automatic<TParams, RepositoryChangeState>(turnIds.importPlan)\n\t\t.description(\"Import handoff plan\")\n\t\t.run((ctx) => {\n\t\t\tconst planMarkdown =\n\t\t\t\tctx.params.launchKind === \"imported_plan\"\n\t\t\t\t\t? normalizeOptionalMarkdown(ctx.params.importedPlanMarkdown)\n\t\t\t\t\t: null;\n\t\t\tif (!planMarkdown) {\n\t\t\t\tthrow new Error(\"No importedPlanMarkdown is available to import\");\n\t\t\t}\n\t\t\treturn {\n\t\t\t\toutcome: \"imported\",\n\t\t\t\tparams: { plan: planMarkdown },\n\t\t\t\tmarkdown: planMarkdown,\n\t\t\t};\n\t\t})\n\t\t.outcome(\"imported\", (outcome) =>\n\t\t\toutcome\n\t\t\t\t.description(\"Imported a handoff plan and skipped replanning\")\n\t\t\t\t.markdown(\"plan\", { description: \"Imported handoff plan\", publish: true })\n\t\t\t\t.to(turnIds.implement)\n\t\t\t\t.effect(({ ctx }) => ({\n\t\t\t\t\tprocessPatch: { planRevision: ctx.process.planRevision + 1 },\n\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t})),\n\t\t);\n\n\tconst generatePlanTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.generatePlan)\n\t\t.description(\"Plan\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.askQuestions()\n\t\t.freshPrimary()\n\t\t.buildPrompt(buildGeneratePlanPrompt)\n\t\t.outcomeTool(\"plan_saved\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Save the finished plan for review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.requiredString(\"summary\", \"Short summary of the proposed plan\")\n\t\t\t\t.requiredStringArray(\n\t\t\t\t\t\"acceptanceCriteria\",\n\t\t\t\t\t\"Acceptance criteria for the requested repository change\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planDecision)\n\t\t\t\t.effect(({ ctx, event }) => {\n\t\t\t\t\tconst planRevision = ctx.process.planRevision + 1;\n\t\t\t\t\tconst summary = normalizeMessage(event.params.summary);\n\t\t\t\t\tconst acceptanceCriteria = Array.isArray(event.params.acceptanceCriteria)\n\t\t\t\t\t\t? event.params.acceptanceCriteria.filter(\n\t\t\t\t\t\t\t\t(entry): entry is string => typeof entry === \"string\" && entry.trim() !== \"\",\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: [];\n\t\t\t\t\tconst planMarkdown = ctx.output?.content ?? \"\";\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\tprocessPatch: { planRevision },\n\t\t\t\t\t\tbroadcasts: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan.updated\",\n\t\t\t\t\t\t\t\tpayload: {\n\t\t\t\t\t\t\t\t\tplanRevision,\n\t\t\t\t\t\t\t\t\treviewState: \"awaiting_approval\",\n\t\t\t\t\t\t\t\t\tapproved: false,\n\t\t\t\t\t\t\t\t\tsummary,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\temit: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan_saved\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tplanRevision,\n\t\t\t\t\t\t\t\t\tsummary,\n\t\t\t\t\t\t\t\t\tplanMarkdown,\n\t\t\t\t\t\t\t\t\tacceptanceCriteria,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t)\n\t\t.publish(products.plan);\n\n\tconst reviewPlanTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.reviewPlan)\n\t\t.description(\"Assess Plan\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromReviewBranch()\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildReviewPlanPrompt)\n\t\t.outcomeTool(\"no_issues\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Approve the plan and publish the review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planDecision),\n\t\t)\n\t\t.outcomeTool(\"request_changes\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Request plan changes and publish actionable feedback. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planReviewFeedback),\n\t\t)\n\t\t.publish(products.review);\n\n\tconst implementTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.implement)\n\t\t.description(\"Implement\")\n\t\t.tools(...implementationTurnAvailableTools)\n\t\t.freshSeededPrimary()\n\t\t.continueFromProductBranch(products.simplificationPlan, {\n\t\t\tkind: \"semantic_ref\",\n\t\t\tref: \"review\",\n\t\t\tfallback: { kind: \"session_root\" },\n\t\t})\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildImplementPrompt)\n\t\t.publish(products.implementationSummary)\n\t\t.to(turnIds.implementationDecision)\n\t\t.state(({ ctx }) => clearReviewState(ctx.state));\n\n\tconst reviewImplementationTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.reviewImplementation)\n\t\t.description(\"Assess Implementation\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromReviewBranch()\n\t\t.buildPrompt(buildReviewImplementationPrompt)\n\t\t.outcomeTool(\"no_issues\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Approve the implementation and publish the review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.implementationDecision),\n\t\t)\n\t\t.outcomeTool(\"request_changes\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Request implementation changes and publish actionable feedback. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.implementationReviewFeedback),\n\t\t)\n\t\t.publish(products.review);\n\n\tconst simplifyImplementationTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.simplifyImplementation)\n\t\t.description(\"Simplify\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromProductBranch(products.simplificationPlan)\n\t\t.buildPrompt(buildSimplifyImplementationPrompt)\n\t\t.publish(products.simplificationPlan)\n\t\t.to(turnIds.simplificationDecision);\n\n\tconst generateCommitMessageTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.generateCommitMessage)\n\t\t.description(\"Write Commit Message\")\n\t\t.modelPurpose(\"process_title_generation\")\n\t\t.rootBranchReview()\n\t\t.startFromRoot()\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildGenerateCommitMessagePrompt)\n\t\t.publish(products.commitMessage)\n\t\t.to(config.publication?.entryTurnId ?? turnIds.commitAndMerge)\n\t\t.state(({ ctx }) =>\n\t\t\tpatchRepositoryChangeState(ctx.state, {\n\t\t\t\tfinalization: {\n\t\t\t\t\t...ctx.state.finalization,\n\t\t\t\t\tgeneratedCommitMessage: normalizeGeneratedCommitMessage(ctx.output?.content),\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\tconst commitAndMergeTurn = flow\n\t\t.automatic<TParams, RepositoryChangeState>(turnIds.commitAndMerge)\n\t\t.description(config.finalizationDescription)\n\t\t.run(runDeterministicFinalization)\n\t\t.outcome(\"merge_conflict\", (outcome) =>\n\t\t\toutcome\n\t\t\t\t.description(\"Deterministic merge hit conflicts and needs conflict resolution\")\n\t\t\t\t.requiredString(\"headSha\", \"The current HEAD sha while the merge conflict is active\")\n\t\t\t\t.stringArray(\"conflictedFiles\", \"Conflicted files that need resolution\")\n\t\t\t\t.string(\"fetchedBaseSha\", \"The fetched origin/<baseBranch> sha when available\")\n\t\t\t\t.to(turnIds.resolveMergeConflict)\n\t\t\t\t.state(({ ctx }) =>\n\t\t\t\t\tpatchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tfinalization: resetFinalizationAfterMessage(ctx.state),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t)\n\t\t.outcome(\"finalized\", (outcome) =>\n\t\t\toutcome\n\t\t\t\t.description(\"Deterministic finalization succeeded\")\n\t\t\t\t.requiredString(\"headSha\", \"The final HEAD sha\")\n\t\t\t\t.requiredString(\"mergeMode\", \"How origin/<baseBranch> was integrated\")\n\t\t\t\t.requiredString(\"pushTarget\", \"The final base-branch publish target\")\n\t\t\t\t.requiredBoolean(\"usedConflictResolution\", \"Whether the merge required conflict resolution\")\n\t\t\t\t.complete()\n\t\t\t\t.state(({ ctx, event }) =>\n\t\t\t\t\tpatchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tfinalization: resetFinalizationAfterMessage(ctx.state, {\n\t\t\t\t\t\t\tusedConflictResolution:\n\t\t\t\t\t\t\t\tevent.params.usedConflictResolution === true ||\n\t\t\t\t\t\t\t\tctx.state.finalization.usedConflictResolution,\n\t\t\t\t\t\t\tfinalizationSummaryMarkdown: normalizeOptionalMarkdown(ctx.output?.content),\n\t\t\t\t\t\t\tfinalizedHeadSha: normalizeMessage(event.params.headSha),\n\t\t\t\t\t\t}),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t);\n\n\tconst resolveMergeConflictTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.resolveMergeConflict)\n\t\t.description(\"Resolve merge conflict\")\n\t\t.tools(\"read\", \"bash\", \"edit\", \"write\")\n\t\t.fullPrimary()\n\t\t.startFromRoot()\n\t\t.buildPrompt(buildResolveMergeConflictPrompt)\n\t\t.outcomeTool(\"clean\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\"The merge conflict was resolved and the repository is clean\")\n\t\t\t\t.requiredString(\"headSha\", \"The post-resolution HEAD sha\")\n\t\t\t\t.to(turnIds.commitAndMerge)\n\t\t\t\t.state(({ ctx, event }) =>\n\t\t\t\t\tpatchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tfinalization: resetFinalizationAfterMessage(ctx.state, {\n\t\t\t\t\t\t\texpectedPostConflictHeadSha: normalizeMessage(event.params.headSha),\n\t\t\t\t\t\t\tusedConflictResolution: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t)\n\t\t.publish(products.mergeResolutionSummary);\n\n\tconst planFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"plan\")\n\t\t.turn(importPlanTurn)\n\t\t.turn(generatePlanTurn)\n\t\t.turn({ id: turnIds.planDecision, definition: planDecisionSpec })\n\t\t.turn(reviewPlanTurn)\n\t\t.turn({ id: turnIds.planReviewFeedback, definition: planReviewFeedbackSpec });\n\n\tconst implementationFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"implementation\")\n\t\t.turn(implementTurn)\n\t\t.turn({ id: turnIds.implementationDecision, definition: implementationDecisionSpec })\n\t\t.turn(reviewImplementationTurn)\n\t\t.turn({\n\t\t\tid: turnIds.implementationReviewFeedback,\n\t\t\tdefinition: implementationReviewFeedbackSpec,\n\t\t})\n\t\t.turn(simplifyImplementationTurn)\n\t\t.turn({ id: turnIds.simplificationDecision, definition: simplificationDecisionSpec });\n\n\tconst finalizationFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"finalization\")\n\t\t.turn(generateCommitMessageTurn);\n\tif (!config.publication) {\n\t\tfinalizationFlow.turn(commitAndMergeTurn).turn(resolveMergeConflictTurn);\n\t}\n\n\tconst builder = flow\n\t\t.process<TParams, RepositoryChangeState>(config.processId)\n\t\t.displayName(config.displayName)\n\t\t.entry(turnIds.generatePlan)\n\t\t.alternateEntry(turnIds.importPlan)\n\t\t.happyPath(\n\t\t\tturnIds.generatePlan,\n\t\t\tturnIds.implement,\n\t\t\tturnIds.generateCommitMessage,\n\t\t\t...(config.publication?.happyPath ?? [turnIds.commitAndMerge]),\n\t\t)\n\t\t.piConfig({ sessionCwdTemplate: \"{{{projectKey}}}\" })\n\t\t.codecs({\n\t\t\tparams: config.paramsCodec,\n\t\t\tstate: repositoryChangeStateCodec,\n\t\t})\n\t\t.initialState(() => ({\n\t\t\t...createEmptyStructuralProcessState(),\n\t\t\tfinalization: createEmptyRepositoryChangeFinalizationState(),\n\t\t\textensionState: {},\n\t\t}))\n\t\t.use(planFlow)\n\t\t.use(implementationFlow)\n\t\t.use(finalizationFlow);\n\tif (config.publication) builder.use(config.publication.fragment);\n\tif (config.repositoryCredentials) builder.repositoryCredentials(config.repositoryCredentials);\n\tif (config.launcher) builder.launcher(config.launcher);\n\tconst process = builder.define();\n\tconst decision = (id: string) =>\n\t\t({\n\t\t\tid,\n\t\t\t...(process.turns.get(id)?.definition as HumanTurnDefinition),\n\t\t}) as HumanTurnDefinition & {\n\t\t\t/** @internal */\n\t\t\tid: string;\n\t\t};\n\treturn {\n\t\t/** @public */\n\t\tprocess,\n\t\t/** @internal */\n\t\tplanDecision: decision(turnIds.planDecision),\n\t\t/** @internal */\n\t\tplanReviewFeedback: decision(turnIds.planReviewFeedback),\n\t\t/** @internal */\n\t\timplementationDecision: decision(turnIds.implementationDecision),\n\t\t/** @internal */\n\t\timplementationReviewFeedback: decision(turnIds.implementationReviewFeedback),\n\t\t/** @internal */\n\t\tsimplificationDecision: decision(turnIds.simplificationDecision),\n\t};\n}\n","import type { LeitwerkExtensionModule } from \"@leitwerk-dev/process-sdk\";\n\n/** @internal */\nconst manifest = {\n\t/** @internal */\n\tid: \"coding\",\n\t/** @internal */\n\tversion: \"0.1.0\",\n} as const;\n/** @public */\nconst extension: LeitwerkExtensionModule = { manifest };\nexport default extension;\n\nexport {\n\tacceptReviewForm,\n\tcodingActionIds,\n\tcreateFinalizeChangeForm,\n\trequestReviewChangesForm,\n\trequestRevisionForm,\n} from \"./actions.js\";\nexport { createRepositoryChangeProcess } from \"./repository-change-process.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,oBAAoB,SAAS,QAAQ,kBAAkB;AAAA;AAAA,IAEvD,wBAAwB,SAAS,QAAQ,sBAAsB;AAAA;AAAA,IAE/D,8BAA8B,SAAS,QAAQ,4BAA4B;AAAA;AAAA,IAE3E,wBAAwB,SAAS,QAAQ,sBAAsB;AAAA,EAChE;AACD;;;ACnyBA,IAAM,WAAW;AAAA;AAAA,EAEhB,IAAI;AAAA;AAAA,EAEJ,SAAS;AACV;AAEA,IAAM,YAAqC,EAAE,SAAS;AACtD,IAAO,gBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/actions.ts","../src/repository-change-process.ts","../src/repository-change-state-internal.ts","../src/index.ts"],"sourcesContent":["import type { FormDefinition } from \"@leitwerk-dev/process-sdk\";\n\n/** @public */\nexport const codingActionIds = {\n\t/** @public */\n\tapprovePlan: \"approve_plan\",\n\t/** @internal */\n\trequestRevision: \"request_revision\",\n\t/** @internal */\n\trunReview: \"run_review\",\n\t/** @internal */\n\tsimplify: \"simplify\",\n\t/** @internal */\n\tacceptReview: \"accept_review\",\n\t/** @internal */\n\trequestReviewChanges: \"request_review_changes\",\n\t/** @internal */\n\tdismissReview: \"dismiss_review\",\n\t/** @public */\n\tfinalizeChange: \"finalize_change\",\n} as const;\n\nfunction notesForm(id: string, title: string, label: string, description: string): FormDefinition {\n\treturn {\n\t\tid,\n\t\ttitle,\n\t\tfields: [\n\t\t\t{ id: \"message\", label, kind: \"textarea\", primaryPrompt: true, required: true, description },\n\t\t],\n\t\tsubmitLabel: title,\n\t};\n}\n\n/** @internal */\nexport const requestRevisionForm = notesForm(\n\tcodingActionIds.requestRevision,\n\t\"Request revision\",\n\t\"Revision notes\",\n\t\"Instructions for the next implementation pass.\",\n);\n/** @internal */\nexport const requestReviewChangesForm = notesForm(\n\tcodingActionIds.requestReviewChanges,\n\t\"Request review changes\",\n\t\"Review notes\",\n\t\"Instructions for the next review pass.\",\n);\n/** @internal */\nexport const acceptReviewForm: FormDefinition = {\n\tid: codingActionIds.acceptReview,\n\ttitle: \"Accept review\",\n\tfields: [\n\t\t{\n\t\t\tid: \"message\",\n\t\t\tlabel: \"Review adjustment\",\n\t\t\tkind: \"textarea\",\n\t\t\tprimaryPrompt: true,\n\t\t\tdescription:\n\t\t\t\t\"Optional instructions to apply with the accepted review, such as dropping one finding.\",\n\t\t},\n\t],\n\tsubmitLabel: \"Accept review\",\n};\n","import { trimString as normalizeMessage, normalizeOptionalMarkdown } from \"@leitwerk-dev/domain\";\nimport {\n\tacceptedReviewHandoffAction,\n\ttype Codec,\n\tcreateEmptyStructuralProcessState,\n\ttype FlowFragmentBuilder,\n\ttype FormDefinition,\n\tflow,\n\ttype HumanTurnDefinition,\n\thumanTurn,\n\ttype ProcessLauncherDefinition,\n\ttype RepositoryCredentialProject,\n\ttype RepositoryCredentialRequirement,\n\trevisionAction,\n} from \"@leitwerk-dev/process-sdk\";\nimport {\n\tacceptReviewForm,\n\tcodingActionIds,\n\trequestReviewChangesForm,\n\trequestRevisionForm,\n} from \"./actions.js\";\nimport {\n\tclearReviewRefs,\n\tcreateEmptyRepositoryChangeFinalizationState,\n\ttype RepositoryChangeState,\n\trepositoryChangeStateCodec,\n} from \"./repository-change-state-internal.js\";\nimport {\n\tbuildGenerateCommitMessagePrompt,\n\tnormalizeGeneratedCommitMessage,\n} from \"./turns/generate-commit-message.js\";\nimport { buildGeneratePlanPrompt } from \"./turns/generate-plan.js\";\nimport { buildImplementPrompt } from \"./turns/implement.js\";\nimport { buildReviewImplementationPrompt } from \"./turns/review-implementation.js\";\nimport { buildReviewPlanPrompt } from \"./turns/review-plan.js\";\nimport { buildSimplifyImplementationPrompt } from \"./turns/simplify-implementation.js\";\n\n/** @public */\nexport type RepositoryChangeParams = object;\n\n/** @public */\nexport interface RepositoryChangeProcessConfig<TParams extends RepositoryChangeParams> {\n\t/** @public */\n\tprocessId: string;\n\t/** @public */\n\tdisplayName: string;\n\t/** @public */\n\tparamsCodec: Codec<TParams>;\n\t/** @public */\n\tlauncher?: ProcessLauncherDefinition<TParams>;\n\t/** @public */\n\tfinalizeLabel: string;\n\t/** @public */\n\tfinalizeForm: FormDefinition;\n\t/** @public */\n\trepositoryCredentials?(input: {\n\t\t/** @public */\n\t\tparams: TParams;\n\t\t/** @internal */\n\t\tprojects: readonly RepositoryCredentialProject[];\n\t}): readonly RepositoryCredentialRequirement[];\n\t/** @public */\n\tpublication: {\n\t\t/** @public */\n\t\tentryTurnId: string;\n\t\t/** @public */\n\t\tfragment: FlowFragmentBuilder<TParams, RepositoryChangeState>;\n\t\t/** @public */\n\t\thappyPath?: readonly string[];\n\t};\n}\n\n/** @public */\nexport function createRepositoryChangeProcess<TParams extends RepositoryChangeParams>(\n\tconfig: RepositoryChangeProcessConfig<TParams>,\n) {\n\tconst turnIds = {\n\t\tgeneratePlan: \"generate_plan\",\n\t\tplanDecision: \"plan_decision\",\n\t\treviewPlan: \"review_plan\",\n\t\tplanReviewFeedback: \"plan_review_feedback\",\n\t\timplement: \"implement\",\n\t\timplementationDecision: \"implementation_decision\",\n\t\treviewImplementation: \"review_implementation\",\n\t\timplementationReviewFeedback: \"implementation_review_feedback\",\n\t\tsimplifyImplementation: \"simplify_implementation\",\n\t\tsimplificationDecision: \"simplification_decision\",\n\t\tgenerateCommitMessage: \"generate_commit_message\",\n\t} as const;\n\n\tconst products = {\n\t\tplan: \"plan\",\n\t\treview: \"review\",\n\t\tsimplificationPlan: \"simplification-plan\",\n\t\timplementationSummary: \"implementation-summary\",\n\t\tcommitMessage: \"commit-message\",\n\t} as const;\n\n\tconst implementationTurnAvailableTools = [\"read\", \"bash\", \"edit\", \"write\"] as const;\n\n\tfunction hasResolvedTurnRecordRef(\n\t\tref: RepositoryChangeState[\"semanticEntryRefs\"][keyof RepositoryChangeState[\"semanticEntryRefs\"]],\n\t): ref is { entryId: string; turnRecordId: string } {\n\t\treturn typeof ref?.turnRecordId === \"string\" && ref.turnRecordId.trim() !== \"\";\n\t}\n\n\tfunction requireResolvedPlanRef(\n\t\tplan: RepositoryChangeState[\"semanticEntryRefs\"][keyof RepositoryChangeState[\"semanticEntryRefs\"]],\n\t\tusage: \"approval\" | \"review\" | \"simplification review\" | \"implementation review\",\n\t): asserts plan is { entryId: string; turnRecordId: string } {\n\t\tif (!hasResolvedTurnRecordRef(plan)) {\n\t\t\tthrow new Error(`No plan is available for ${usage}`);\n\t\t}\n\t}\n\n\tfunction clearReviewState(state: RepositoryChangeState): RepositoryChangeState {\n\t\treturn patchRepositoryChangeState(state, {\n\t\t\tclearReviewRefs: true,\n\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t});\n\t}\n\n\tfunction buildAcceptedFollowUpMessage(input: {\n\t\tkind: \"plan_review\" | \"implementation_review\" | \"simplification\";\n\t\tmarkdown: unknown;\n\t\tadjustment: unknown;\n\t}): string {\n\t\tconst markdown = normalizeOptionalMarkdown(input.markdown);\n\t\tif (!markdown) {\n\t\t\tthrow new Error(\n\t\t\t\tinput.kind === \"simplification\"\n\t\t\t\t\t? \"No simplification plan markdown is available to accept\"\n\t\t\t\t\t: \"No review output markdown is available to accept\",\n\t\t\t);\n\t\t}\n\t\tconst adjustment = normalizeMessage(input.adjustment);\n\t\tconst subject = input.kind === \"simplification\" ? \"simplification plan\" : \"review\";\n\t\tconst introduction =\n\t\t\tinput.kind === \"plan_review\"\n\t\t\t\t? \"Revise the plan according to this review:\"\n\t\t\t\t: `Implement according to this ${subject}:`;\n\t\tconst sections = [introduction, markdown];\n\t\tif (adjustment) {\n\t\t\tsections.push(\n\t\t\t\t`Also follow this adjustment where it conflicts with the ${subject}:`,\n\t\t\t\tadjustment,\n\t\t\t);\n\t\t}\n\t\tif (input.kind !== \"plan_review\") {\n\t\t\tsections.push(\n\t\t\t\t[\n\t\t\t\t\t\"This is now an implementation turn. Ignore earlier review-only or read-only instructions.\",\n\t\t\t\t\t\"You may change files in the repository workspace.\",\n\t\t\t\t\t`Use the available tools (${implementationTurnAvailableTools.join(\", \")}) to inspect, edit, build, and test the change.`,\n\t\t\t\t\t\"When finished, return an implementation summary.\",\n\t\t\t\t].join(\"\\n\"),\n\t\t\t);\n\t\t}\n\t\treturn sections.join(\"\\n\\n\");\n\t}\n\n\tfunction patchRepositoryChangeState(\n\t\tstate: RepositoryChangeState,\n\t\tinput: {\n\t\t\tfinalization?: RepositoryChangeState[\"finalization\"];\n\t\t\tclearReviewRefs?: boolean;\n\t\t\tclearProductRefs?: readonly string[];\n\t\t},\n\t): RepositoryChangeState {\n\t\tconst nextState: RepositoryChangeState = {\n\t\t\t...state,\n\t\t\t...(\"finalization\" in input ? { finalization: input.finalization } : {}),\n\t\t};\n\t\tconst productRefsToClear = new Set(input.clearProductRefs ?? []);\n\t\tif (input.clearReviewRefs) {\n\t\t\tproductRefsToClear.add(products.review);\n\t\t}\n\t\tif (!input.clearReviewRefs && productRefsToClear.size === 0) {\n\t\t\treturn nextState;\n\t\t}\n\t\tconst productRefs = { ...nextState.productRefs };\n\t\tfor (const productName of productRefsToClear) {\n\t\t\tdelete productRefs[productName];\n\t\t}\n\t\treturn {\n\t\t\t...nextState,\n\t\t\tsemanticEntryRefs: input.clearReviewRefs\n\t\t\t\t? clearReviewRefs(nextState.semanticEntryRefs)\n\t\t\t\t: nextState.semanticEntryRefs,\n\t\t\tproductRefs,\n\t\t};\n\t}\n\n\tconst planDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review Plan\",\n\t\treviewSemanticRef: \"plan\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Revision notes\",\n\t\t\t\tplaceholder: \"Describe what the next plan revision should improve\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary: \"Approve this plan, request a revision, or run an automated review.\",\n\t\tactions: {\n\t\t\t[codingActionIds.approvePlan]: {\n\t\t\t\tlabel: \"Approve plan\",\n\t\t\t\tdescription: \"Accept the current plan and continue into implementation.\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tto: turnIds.implement,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"approval\");\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\temit: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan_approved\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\texternalId: ctx.process.externalId,\n\t\t\t\t\t\t\t\t\tplanRevision: ctx.process.planRevision,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t\t[codingActionIds.requestRevision]: revisionAction({\n\t\t\t\tlabel: \"Request revision\",\n\t\t\t\tdescription: \"Send the plan back for another draft revision.\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestRevisionForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.generatePlan,\n\t\t\t\tqueueTarget: { semanticRef: \"currentPrimaryPathLeaf\" },\n\t\t\t\teffect: ({ ctx, input }) => {\n\t\t\t\t\tconst message = normalizeMessage(input.message);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\temit: [{ type: \"plan_revision_requested\", data: { message } }],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t}),\n\t\t\t[codingActionIds.runReview]: {\n\t\t\t\tlabel: \"Run automated review\",\n\t\t\t\tdescription: \"Send the current plan to the LLM reviewer.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewPlan,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"review\");\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\n\tconst planReviewFeedbackSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review Plan Feedback\",\n\t\treviewSemanticRef: \"review\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Review notes\",\n\t\t\t\tplaceholder: \"Describe how the next review pass should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Apply this feedback to the next plan revision, request a revised review, or dismiss it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept review\",\n\t\t\t\tdescription: \"Apply the current review outcome and continue with the plan flow.\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tto: turnIds.generatePlan,\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"plan_review\",\n\t\t\t\t\t\tmarkdown: ctx.readSemanticTurnResultMarkdown(\"review\"),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request review changes\",\n\t\t\t\tdescription: \"Ask the LLM reviewer to revise its plan review.\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tto: turnIds.reviewPlan,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Dismiss review\",\n\t\t\t\tdescription: \"Return to the plan decision without applying the review.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.planDecision,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst implementationDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review\",\n\t\treviewSemanticRef: \"currentPrimaryPathLeaf\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Revision notes\",\n\t\t\t\tplaceholder: \"Describe what the next implementation turn should improve\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Publish this implementation, request another pass, simplify it, or run an automated review.\",\n\t\tactions: {\n\t\t\t[codingActionIds.finalizeChange]: {\n\t\t\t\tlabel: config.finalizeLabel,\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: config.finalizeForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.generateCommitMessage,\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tfinalization: createEmptyRepositoryChangeFinalizationState(),\n\t\t\t\t\t\tclearReviewRefs: true,\n\t\t\t\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t},\n\t\t\t[codingActionIds.requestRevision]: revisionAction({\n\t\t\t\tlabel: \"Request revision\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestRevisionForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { semanticRef: \"currentPrimaryPathLeaf\" },\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.simplify]: {\n\t\t\t\tlabel: \"Simplify\",\n\t\t\t\tdescription: \"Ask for a focused simplification review before another implementation pass.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.simplifyImplementation,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"simplification review\");\n\t\t\t\t\treturn { state: clearReviewState(ctx.state) };\n\t\t\t\t},\n\t\t\t},\n\t\t\t[codingActionIds.runReview]: {\n\t\t\t\tlabel: \"Run automated review\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewImplementation,\n\t\t\t\teffect: ({ ctx }) => {\n\t\t\t\t\trequireResolvedPlanRef(ctx.state.semanticEntryRefs.plan, \"implementation review\");\n\t\t\t\t\treturn { state: clearReviewState(ctx.state) };\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\n\tconst implementationReviewFeedbackSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review implementation feedback\",\n\t\treviewSemanticRef: \"review\",\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Review notes\",\n\t\t\t\tplaceholder: \"Describe how the next implementation review pass should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary:\n\t\t\t\"Apply this feedback to the next implementation pass, request a revised review, or dismiss it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept review\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"implementation_review\",\n\t\t\t\t\t\tmarkdown: ctx.readSemanticTurnResultMarkdown(\"review\"),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tclearProductRefs: [products.simplificationPlan],\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request review changes\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.reviewImplementation,\n\t\t\t\tqueueTarget: { semanticRef: \"review\" },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Dismiss review\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.implementationDecision,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst simplificationDecisionSpec = humanTurn<TParams, RepositoryChangeState>({\n\t\tdescription: \"Review simplification plan\",\n\t\treviewProduct: products.simplificationPlan,\n\t\tnotesFields: [\n\t\t\t{\n\t\t\t\tid: \"message\",\n\t\t\t\tlabel: \"Simplification notes\",\n\t\t\t\tplaceholder: \"Describe how the simplification plan should change\",\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcommentary: \"Apply this simplification plan, request changes to it, or reject it.\",\n\t\tactions: {\n\t\t\t[codingActionIds.acceptReview]: acceptedReviewHandoffAction({\n\t\t\t\tlabel: \"Accept simplification plan\",\n\t\t\t\tacceptanceState: \"accepted\",\n\t\t\t\tform: acceptReviewForm,\n\t\t\t\tschedulable: true,\n\t\t\t\tto: turnIds.implement,\n\t\t\t\tqueueTarget: { productName: products.simplificationPlan },\n\t\t\t\tresolveBodyMarkdown: ({ ctx, input }) =>\n\t\t\t\t\tbuildAcceptedFollowUpMessage({\n\t\t\t\t\t\tkind: \"simplification\",\n\t\t\t\t\t\tmarkdown: ctx.readProductTurnResultMarkdown(products.simplificationPlan),\n\t\t\t\t\t\tadjustment: input.message,\n\t\t\t\t\t}),\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: patchRepositoryChangeState(ctx.state, {\n\t\t\t\t\t\tclearReviewRefs: true,\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\t[codingActionIds.requestReviewChanges]: revisionAction({\n\t\t\t\tlabel: \"Request simplification changes\",\n\t\t\t\tacceptanceState: \"requires_changes\",\n\t\t\t\tform: requestReviewChangesForm,\n\t\t\t\tto: turnIds.simplifyImplementation,\n\t\t\t\tqueueTarget: { productName: products.simplificationPlan },\n\t\t\t}),\n\t\t\t[codingActionIds.dismissReview]: {\n\t\t\t\tlabel: \"Reject simplification plan\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Return to the implementation decision without applying the simplification plan.\",\n\t\t\t\tacceptanceState: \"neutral\",\n\t\t\t\tto: turnIds.implementationDecision,\n\t\t\t\teffect: ({ ctx }) => ({\n\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t}),\n\t\t\t},\n\t\t},\n\t});\n\n\tconst generatePlanTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.generatePlan)\n\t\t.description(\"Plan\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.askQuestions()\n\t\t.freshPrimary()\n\t\t.buildPrompt(buildGeneratePlanPrompt)\n\t\t.outcomeTool(\"plan_saved\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Save the finished plan for review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.requiredString(\"summary\", \"Short summary of the proposed plan\")\n\t\t\t\t.requiredStringArray(\n\t\t\t\t\t\"acceptanceCriteria\",\n\t\t\t\t\t\"Acceptance criteria for the requested repository change\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planDecision)\n\t\t\t\t.effect(({ ctx, event }) => {\n\t\t\t\t\tconst planRevision = ctx.process.planRevision + 1;\n\t\t\t\t\tconst summary = normalizeMessage(event.params.summary);\n\t\t\t\t\tconst acceptanceCriteria = Array.isArray(event.params.acceptanceCriteria)\n\t\t\t\t\t\t? event.params.acceptanceCriteria.filter(\n\t\t\t\t\t\t\t\t(entry): entry is string => typeof entry === \"string\" && entry.trim() !== \"\",\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: [];\n\t\t\t\t\tconst planMarkdown = ctx.output?.content ?? \"\";\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstate: clearReviewState(ctx.state),\n\t\t\t\t\t\tprocessPatch: { planRevision },\n\t\t\t\t\t\tbroadcasts: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan.updated\",\n\t\t\t\t\t\t\t\tpayload: {\n\t\t\t\t\t\t\t\t\tplanRevision,\n\t\t\t\t\t\t\t\t\treviewState: \"awaiting_approval\",\n\t\t\t\t\t\t\t\t\tapproved: false,\n\t\t\t\t\t\t\t\t\tsummary,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\temit: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"plan_saved\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tplanRevision,\n\t\t\t\t\t\t\t\t\tsummary,\n\t\t\t\t\t\t\t\t\tplanMarkdown,\n\t\t\t\t\t\t\t\t\tacceptanceCriteria,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t)\n\t\t.publish(products.plan);\n\n\tconst reviewPlanTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.reviewPlan)\n\t\t.description(\"Assess Plan\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromReviewBranch()\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildReviewPlanPrompt)\n\t\t.outcomeTool(\"no_issues\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Approve the plan and publish the review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planDecision),\n\t\t)\n\t\t.outcomeTool(\"request_changes\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Request plan changes and publish actionable feedback. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.planReviewFeedback),\n\t\t)\n\t\t.publish(products.review);\n\n\tconst implementTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.implement)\n\t\t.description(\"Implement\")\n\t\t.tools(...implementationTurnAvailableTools)\n\t\t.freshSeededPrimary()\n\t\t.continueFromProductBranch(products.simplificationPlan, {\n\t\t\tkind: \"semantic_ref\",\n\t\t\tref: \"review\",\n\t\t\tfallback: { kind: \"session_root\" },\n\t\t})\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildImplementPrompt)\n\t\t.publish(products.implementationSummary)\n\t\t.to(turnIds.implementationDecision)\n\t\t.state(({ ctx }) => clearReviewState(ctx.state));\n\n\tconst reviewImplementationTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.reviewImplementation)\n\t\t.description(\"Assess Implementation\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromReviewBranch()\n\t\t.buildPrompt(buildReviewImplementationPrompt)\n\t\t.outcomeTool(\"no_issues\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Approve the implementation and publish the review. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.implementationDecision),\n\t\t)\n\t\t.outcomeTool(\"request_changes\", (tool) =>\n\t\t\ttool\n\t\t\t\t.description(\n\t\t\t\t\t\"Request implementation changes and publish actionable feedback. Its Markdown may include Mermaid diagrams or uploaded images.\",\n\t\t\t\t)\n\t\t\t\t.to(turnIds.implementationReviewFeedback),\n\t\t)\n\t\t.publish(products.review);\n\n\tconst simplifyImplementationTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.simplifyImplementation)\n\t\t.description(\"Simplify\")\n\t\t.tools(\"read\", \"bash\")\n\t\t.rootBranchReview()\n\t\t.startFromProductBranch(products.simplificationPlan)\n\t\t.buildPrompt(buildSimplifyImplementationPrompt)\n\t\t.publish(products.simplificationPlan)\n\t\t.to(turnIds.simplificationDecision);\n\n\tconst generateCommitMessageTurn = flow\n\t\t.llm<TParams, RepositoryChangeState>(turnIds.generateCommitMessage)\n\t\t.description(\"Write Commit Message\")\n\t\t.modelPurpose(\"process_title_generation\")\n\t\t.rootBranchReview()\n\t\t.startFromRoot()\n\t\t.consume(products.plan)\n\t\t.buildPrompt(buildGenerateCommitMessagePrompt)\n\t\t.publish(products.commitMessage)\n\t\t.to(config.publication.entryTurnId)\n\t\t.state(({ ctx }) =>\n\t\t\tpatchRepositoryChangeState(ctx.state, {\n\t\t\t\tfinalization: {\n\t\t\t\t\t...ctx.state.finalization,\n\t\t\t\t\tgeneratedCommitMessage: normalizeGeneratedCommitMessage(ctx.output?.content),\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\tconst planFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"plan\")\n\t\t.turn(generatePlanTurn)\n\t\t.turn({ id: turnIds.planDecision, definition: planDecisionSpec })\n\t\t.turn(reviewPlanTurn)\n\t\t.turn({ id: turnIds.planReviewFeedback, definition: planReviewFeedbackSpec });\n\n\tconst implementationFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"implementation\")\n\t\t.turn(implementTurn)\n\t\t.turn({ id: turnIds.implementationDecision, definition: implementationDecisionSpec })\n\t\t.turn(reviewImplementationTurn)\n\t\t.turn({\n\t\t\tid: turnIds.implementationReviewFeedback,\n\t\t\tdefinition: implementationReviewFeedbackSpec,\n\t\t})\n\t\t.turn(simplifyImplementationTurn)\n\t\t.turn({ id: turnIds.simplificationDecision, definition: simplificationDecisionSpec });\n\n\tconst finalizationFlow = flow\n\t\t.fragment<TParams, RepositoryChangeState>(\"finalization\")\n\t\t.turn(generateCommitMessageTurn);\n\n\tconst builder = flow\n\t\t.process<TParams, RepositoryChangeState>(config.processId)\n\t\t.displayName(config.displayName)\n\t\t.entry(turnIds.generatePlan)\n\t\t.happyPath(\n\t\t\tturnIds.generatePlan,\n\t\t\tturnIds.implement,\n\t\t\tturnIds.generateCommitMessage,\n\t\t\t...(config.publication.happyPath ?? [config.publication.entryTurnId]),\n\t\t)\n\t\t.piConfig({ sessionCwdTemplate: \"{{{projectKey}}}\" })\n\t\t.codecs({\n\t\t\tparams: config.paramsCodec,\n\t\t\tstate: repositoryChangeStateCodec,\n\t\t})\n\t\t.initialState(() => ({\n\t\t\t...createEmptyStructuralProcessState(),\n\t\t\tfinalization: createEmptyRepositoryChangeFinalizationState(),\n\t\t\textensionState: {},\n\t\t}))\n\t\t.use(planFlow)\n\t\t.use(implementationFlow)\n\t\t.use(finalizationFlow);\n\tbuilder.use(config.publication.fragment);\n\tif (config.repositoryCredentials) builder.repositoryCredentials(config.repositoryCredentials);\n\tif (config.launcher) builder.launcher(config.launcher);\n\tconst process = builder.define();\n\tconst decision = (id: string) =>\n\t\t({\n\t\t\t/** @public */\n\t\t\tid,\n\t\t\t...(process.turns.get(id)?.definition as HumanTurnDefinition),\n\t\t}) as HumanTurnDefinition & {\n\t\t\t/** @public */ id: string;\n\t\t};\n\treturn {\n\t\t/** @public */\n\t\tprocess,\n\t\t/** @internal */\n\t\tplanDecision: decision(turnIds.planDecision),\n\t\t/** @internal */\n\t\tplanReviewFeedback: decision(turnIds.planReviewFeedback),\n\t\t/** @internal */\n\t\timplementationDecision: decision(turnIds.implementationDecision),\n\t\t/** @internal */\n\t\timplementationReviewFeedback: decision(turnIds.implementationReviewFeedback),\n\t\t/** @internal */\n\t\tsimplificationDecision: decision(turnIds.simplificationDecision),\n\t};\n}\n","import type { Codec, StructuralProcessState } from \"@leitwerk-dev/process-sdk\";\nimport { parseStructuralProcessState } from \"@leitwerk-dev/process-sdk\";\n\n/** @public */\nexport interface RepositoryChangeFinalizationState {\n\t/** @public */\n\tgeneratedCommitMessage: string | null;\n}\n\n/** @public */\nexport interface RepositoryChangeState extends StructuralProcessState {\n\t/** @public */\n\tfinalization: RepositoryChangeFinalizationState;\n\t/** Namespaced state owned by a caller-supplied publication workflow. */\n\t/** @public */\n\textensionState?: Record<string, unknown>;\n}\n\n/** @internal */\nexport function createEmptyRepositoryChangeFinalizationState(): RepositoryChangeFinalizationState {\n\treturn { generatedCommitMessage: null };\n}\n\nfunction stringOrNull(value: unknown): string | null {\n\treturn typeof value === \"string\" ? value : null;\n}\n\nfunction toRecord(value: unknown): Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null ? (value as Record<string, unknown>) : {};\n}\n\nfunction parseFinalizationState(value: unknown): RepositoryChangeFinalizationState {\n\tconst record = toRecord(value);\n\treturn { generatedCommitMessage: stringOrNull(record.generatedCommitMessage) };\n}\n\n/** @internal */\nexport const repositoryChangeStateCodec: Codec<RepositoryChangeState> = {\n\tparse(value) {\n\t\tconst record = toRecord(value);\n\t\treturn {\n\t\t\t...parseStructuralProcessState(record),\n\t\t\tfinalization: parseFinalizationState(record.finalization),\n\t\t\textensionState: toRecord(record.extensionState),\n\t\t};\n\t},\n\tserialize(value) {\n\t\treturn value;\n\t},\n};\n\n/** @internal */\nexport function clearReviewRefs(\n\tsemanticEntryRefs: RepositoryChangeState[\"semanticEntryRefs\"],\n): RepositoryChangeState[\"semanticEntryRefs\"] {\n\treturn {\n\t\t...semanticEntryRefs,\n\t\treview: null,\n\t};\n}\n","import type { LeitwerkExtensionModule } from \"@leitwerk-dev/process-sdk\";\n\n/** @internal */\nconst manifest = {\n\t/** @internal */\n\tid: \"coding\",\n\t/** @internal */\n\tversion: \"0.1.0\",\n} as const;\n/** @public */\nconst extension: LeitwerkExtensionModule = { manifest };\nexport default extension;\n\nexport {\n\tacceptReviewForm,\n\tcodingActionIds,\n\trequestReviewChangesForm,\n\trequestRevisionForm,\n} from \"./actions.js\";\nexport { createRepositoryChangeProcess } from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ACP,QAAQ,OAAO;AAAA,IACf,OAAO;AAAA,EACR,CAAC,EACA,aAAa,OAAO;AAAA,IACpB,GAAG,kCAAkC;AAAA,IACrC,cAAc,6CAA6C;AAAA,IAC3D,gBAAgB,CAAC;AAAA,EAClB,EAAE,EACD,IAAI,QAAQ,EACZ,IAAI,kBAAkB,EACtB,IAAI,gBAAgB;AACtB,UAAQ,IAAI,OAAO,YAAY,QAAQ;AACvC,MAAI,OAAO,sBAAuB,SAAQ,sBAAsB,OAAO,qBAAqB;AAC5F,MAAI,OAAO,SAAU,SAAQ,SAAS,OAAO,QAAQ;AACrD,QAAM,UAAU,QAAQ,OAAO;AAC/B,QAAM,WAAW,CAAC,QAChB;AAAA;AAAA,IAEA;AAAA,IACA,GAAI,QAAQ,MAAM,IAAI,EAAE,GAAG;AAAA,EAC5B;AAGD,SAAO;AAAA;AAAA,IAEN;AAAA;AAAA,IAEA,cAAc,SAAS,QAAQ,YAAY;AAAA;AAAA,IAE3C,oBAAoB,SAAS,QAAQ,kBAAkB;AAAA;AAAA,IAEvD,wBAAwB,SAAS,QAAQ,sBAAsB;AAAA;AAAA,IAE/D,8BAA8B,SAAS,QAAQ,4BAA4B;AAAA;AAAA,IAE3E,wBAAwB,SAAS,QAAQ,sBAAsB;AAAA,EAChE;AACD;;;AE7qBA,IAAM,WAAW;AAAA;AAAA,EAEhB,IAAI;AAAA;AAAA,EAEJ,SAAS;AACV;AAEA,IAAM,YAAqC,EAAE,SAAS;AACtD,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Codec
|
|
2
|
-
/** @internal */
|
|
3
|
-
export type RepositoryChangeLaunchKind = "requested_change" | "imported_plan";
|
|
1
|
+
import type { Codec } from "@leitwerk-dev/process-sdk";
|
|
4
2
|
/** @public */
|
|
5
3
|
export interface RepositoryChangeParamsBase {
|
|
6
4
|
/** @public */
|
|
@@ -11,25 +9,11 @@ export interface RepositoryChangeParamsBase {
|
|
|
11
9
|
workBranch: string;
|
|
12
10
|
/** @public */
|
|
13
11
|
prompt: string;
|
|
14
|
-
/** @internal */
|
|
15
|
-
launchKind: RepositoryChangeLaunchKind;
|
|
16
|
-
/** @internal */
|
|
17
|
-
importedPlanMarkdown?: string;
|
|
18
12
|
}
|
|
19
13
|
/** @public */
|
|
20
|
-
export type RepositoryChangeLaunchParams<TExtra extends object = Record<never, never>> = TExtra &
|
|
21
|
-
/** @public */
|
|
22
|
-
launchKind: "requested_change";
|
|
23
|
-
} | {
|
|
24
|
-
/** @public */
|
|
25
|
-
launchKind: "imported_plan";
|
|
26
|
-
/** @internal */
|
|
27
|
-
importedPlanMarkdown: string;
|
|
28
|
-
});
|
|
14
|
+
export type RepositoryChangeLaunchParams<TExtra extends object = Record<never, never>> = TExtra & RepositoryChangeParamsBase;
|
|
29
15
|
/** @public */
|
|
30
16
|
export interface NormalizedRepositoryChangeParamsInput {
|
|
31
|
-
/** @internal */
|
|
32
|
-
launchKind: string;
|
|
33
17
|
/** @internal */
|
|
34
18
|
repoLocator: string;
|
|
35
19
|
/** @internal */
|
|
@@ -38,8 +22,6 @@ export interface NormalizedRepositoryChangeParamsInput {
|
|
|
38
22
|
workBranch: string;
|
|
39
23
|
/** @internal */
|
|
40
24
|
prompt: string;
|
|
41
|
-
/** @internal */
|
|
42
|
-
importedPlanMarkdown: string;
|
|
43
25
|
}
|
|
44
26
|
/** @public */
|
|
45
27
|
export declare function repositoryChangeParamsRecord(value: unknown, displayName: string): Record<string, unknown>;
|
|
@@ -48,69 +30,6 @@ export declare function normalizeRepositoryChangeParamsInput(value: unknown, dis
|
|
|
48
30
|
/** @public */
|
|
49
31
|
export declare function createRepositoryChangeParamsCodec<T extends RepositoryChangeParamsBase>(input: {
|
|
50
32
|
/** @public */
|
|
51
|
-
|
|
52
|
-
/** @public */
|
|
53
|
-
normalize(value: unknown): NormalizedRepositoryChangeParamsInput & Omit<T, keyof RepositoryChangeParamsBase>;
|
|
33
|
+
normalize(value: unknown): T;
|
|
54
34
|
}): Codec<T>;
|
|
55
|
-
/** @internal */
|
|
56
|
-
export interface RepositoryChangeLaunchPlannerInput {
|
|
57
|
-
/** @internal */
|
|
58
|
-
input: Record<string, unknown>;
|
|
59
|
-
/** @internal */
|
|
60
|
-
metadata?: Record<string, unknown> | null;
|
|
61
|
-
}
|
|
62
|
-
/** @internal */
|
|
63
|
-
export type RepositoryChangeLaunchResolution<T extends RepositoryChangeParamsBase> = {
|
|
64
|
-
/** @internal */
|
|
65
|
-
ok: true;
|
|
66
|
-
/** @internal */
|
|
67
|
-
launchConfig: ProcessLaunchConfig<T>;
|
|
68
|
-
} | {
|
|
69
|
-
/** @internal */
|
|
70
|
-
ok: false;
|
|
71
|
-
/** @internal */
|
|
72
|
-
errors: readonly LauncherValidationError[];
|
|
73
|
-
};
|
|
74
|
-
/** @internal */
|
|
75
|
-
export interface RepositoryChangeLaunchPlanner<T extends RepositoryChangeParamsBase> {
|
|
76
|
-
/** @internal */
|
|
77
|
-
plan(input: RepositoryChangeLaunchPlannerInput): RepositoryChangeLaunchResolution<T>;
|
|
78
|
-
}
|
|
79
|
-
/** @internal */
|
|
80
|
-
export declare function formatRepositoryChangeLaunchErrors(errors: readonly LauncherValidationError[]): string;
|
|
81
|
-
/** @internal */
|
|
82
|
-
export declare function createRepositoryChangeLaunchPlanner<T extends RepositoryChangeParamsBase>(config: {
|
|
83
|
-
/** @internal */
|
|
84
|
-
processId: string;
|
|
85
|
-
/** @internal */
|
|
86
|
-
normalize(input: Record<string, unknown>): T & {
|
|
87
|
-
/** @internal */
|
|
88
|
-
importedPlanMarkdown?: string;
|
|
89
|
-
};
|
|
90
|
-
/** @internal */
|
|
91
|
-
validateRepoLocator(repoLocator: string): string | null;
|
|
92
|
-
/** @internal */
|
|
93
|
-
validate?(input: Record<string, unknown>, params: T): readonly LauncherValidationError[];
|
|
94
|
-
/** @internal */
|
|
95
|
-
prepare?(params: T): T;
|
|
96
|
-
/** @internal */
|
|
97
|
-
deferWithoutWorkBranch?: boolean;
|
|
98
|
-
}): RepositoryChangeLaunchPlanner<T>;
|
|
99
|
-
/** @internal */
|
|
100
|
-
export declare function createRepositoryChangeUiLauncher<T extends RepositoryChangeParamsBase>(config: {
|
|
101
|
-
/** @internal */
|
|
102
|
-
id: string;
|
|
103
|
-
/** @internal */
|
|
104
|
-
formId: string;
|
|
105
|
-
/** @internal */
|
|
106
|
-
title: string;
|
|
107
|
-
/** @internal */
|
|
108
|
-
workBranchDescription: string;
|
|
109
|
-
/** @internal */
|
|
110
|
-
sshCredentials?: boolean;
|
|
111
|
-
/** @internal */
|
|
112
|
-
resolveRelaunchInput?: UiLauncherDefinition<T>["resolveRelaunchInput"];
|
|
113
|
-
/** @internal */
|
|
114
|
-
resolveLaunchConfig: UiLauncherDefinition<T>["resolveLaunchConfig"];
|
|
115
|
-
}): ProcessLauncherDefinition<T>;
|
|
116
35
|
//# sourceMappingURL=repository-change-launch-internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-change-launch-internal.d.ts","sourceRoot":"","sources":["../src/repository-change-launch-internal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"repository-change-launch-internal.d.ts","sourceRoot":"","sources":["../src/repository-change-launch-internal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,cAAc;AACd,MAAM,WAAW,0BAA0B;IAC1C,cAAc;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,MAAM,MAAM,4BAA4B,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,GAC9F,0BAA0B,CAAC;AAE5B,cAAc;AACd,MAAM,WAAW,qCAAqC;IACrD,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,wBAAgB,4BAA4B,CAC3C,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB;AAED,cAAc;AACd,wBAAgB,oCAAoC,CACnD,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,GACjB,qCAAqC,CASvC;AAED,cAAc;AACd,wBAAgB,iCAAiC,CAAC,CAAC,SAAS,0BAA0B,EAAE,KAAK,EAAE;IAC9F,cAAc;IACd,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC;CAC7B,GAAG,KAAK,CAAC,CAAC,CAAC,CAEX"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { NormalizedRepositoryChangeParamsInput,
|
|
2
|
-
export {
|
|
1
|
+
export type { NormalizedRepositoryChangeParamsInput, RepositoryChangeLaunchParams, RepositoryChangeParamsBase, } from "./repository-change-launch-internal.js";
|
|
2
|
+
export { createRepositoryChangeParamsCodec, normalizeRepositoryChangeParamsInput, repositoryChangeParamsRecord, } from "./repository-change-launch-internal.js";
|
|
3
3
|
//# sourceMappingURL=repository-change-launch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-change-launch.d.ts","sourceRoot":"","sources":["../src/repository-change-launch.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,qCAAqC,EACrC,
|
|
1
|
+
{"version":3,"file":"repository-change-launch.d.ts","sourceRoot":"","sources":["../src/repository-change-launch.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,qCAAqC,EACrC,4BAA4B,EAC5B,0BAA0B,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,iCAAiC,EACjC,oCAAoC,EACpC,4BAA4B,GAC5B,MAAM,wCAAwC,CAAC"}
|