@leitwerk-dev/coding 0.3.1 → 0.4.1

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.
Files changed (123) hide show
  1. package/README.md +154 -13
  2. package/dist/chunk-3WJRJ3Q7.js +220 -0
  3. package/dist/chunk-3WJRJ3Q7.js.map +1 -0
  4. package/dist/chunk-ABQH2WZT.js +36 -0
  5. package/dist/chunk-ABQH2WZT.js.map +1 -0
  6. package/dist/chunk-B3PE6DPF.js +820 -0
  7. package/dist/chunk-B3PE6DPF.js.map +1 -0
  8. package/dist/chunk-DNG7D77K.js +65 -0
  9. package/dist/chunk-DNG7D77K.js.map +1 -0
  10. package/dist/chunk-E3DB4TIZ.js +49 -0
  11. package/dist/chunk-E3DB4TIZ.js.map +1 -0
  12. package/dist/chunk-L2TFD72B.js +16320 -0
  13. package/dist/chunk-L2TFD72B.js.map +1 -0
  14. package/dist/chunk-M2VTUPFO.js +265 -0
  15. package/dist/chunk-M2VTUPFO.js.map +1 -0
  16. package/dist/{chunk-YSC5GEQJ.js → chunk-QD6FI4HR.js} +7 -3
  17. package/dist/chunk-QD6FI4HR.js.map +1 -0
  18. package/dist/chunk-SKGB4CZS.js +14 -0
  19. package/dist/chunk-SKGB4CZS.js.map +1 -0
  20. package/dist/chunk-SZ4WOGV2.js +120 -0
  21. package/dist/chunk-SZ4WOGV2.js.map +1 -0
  22. package/dist/finalization-git-internal.d.ts +9 -0
  23. package/dist/finalization-git-internal.d.ts.map +1 -1
  24. package/dist/finalization-git.d.ts +1 -1
  25. package/dist/finalization-git.d.ts.map +1 -1
  26. package/dist/finalization-git.js +6 -3
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +18 -591
  30. package/dist/index.js.map +1 -1
  31. package/dist/pull-request-publication-internal.d.ts +34 -24
  32. package/dist/pull-request-publication-internal.d.ts.map +1 -1
  33. package/dist/repository-change-launch-internal-BudnAfL7.d.ts +88 -0
  34. package/dist/repository-change-launch-internal.d.ts +32 -11
  35. package/dist/repository-change-launch-internal.d.ts.map +1 -1
  36. package/dist/repository-change-launch.d.ts +4 -3
  37. package/dist/repository-change-launch.d.ts.map +1 -1
  38. package/dist/repository-change-launch.js +162 -34
  39. package/dist/repository-change-launch.js.map +1 -1
  40. package/dist/repository-change-process-DlgF04fU.d.ts +69 -0
  41. package/dist/repository-change-process.d.ts +30 -25
  42. package/dist/repository-change-process.d.ts.map +1 -1
  43. package/dist/repository-change-publication.d.ts +76 -7
  44. package/dist/repository-change-publication.d.ts.map +1 -1
  45. package/dist/repository-change-publication.js +624 -136
  46. package/dist/repository-change-publication.js.map +1 -1
  47. package/dist/repository-change-state-internal.d.ts +18 -4
  48. package/dist/repository-change-state-internal.d.ts.map +1 -1
  49. package/dist/repository-change-ui-launcher-internal.d.ts +34 -22
  50. package/dist/repository-change-ui-launcher-internal.d.ts.map +1 -1
  51. package/dist/repository-publication-receipt.d.ts +23 -0
  52. package/dist/repository-publication-receipt.d.ts.map +1 -0
  53. package/dist/repository-rebase/git.d.ts +8 -0
  54. package/dist/repository-rebase/git.d.ts.map +1 -1
  55. package/dist/repository-reconciliation.d.ts +47 -0
  56. package/dist/repository-reconciliation.d.ts.map +1 -0
  57. package/dist/repository-record.d.ts +6 -0
  58. package/dist/repository-record.d.ts.map +1 -0
  59. package/dist/settings.d.ts +15 -0
  60. package/dist/settings.d.ts.map +1 -0
  61. package/dist/turns/commit-message-evidence.d.ts +35 -0
  62. package/dist/turns/commit-message-evidence.d.ts.map +1 -0
  63. package/dist/turns/commit-message-evidence.js +9 -0
  64. package/dist/turns/generate-commit-message.d.ts +4 -1
  65. package/dist/turns/generate-commit-message.d.ts.map +1 -1
  66. package/dist/turns/generate-commit-message.js +7 -5
  67. package/dist/turns/generate-plan.d.ts.map +1 -1
  68. package/dist/turns/generate-plan.js +1 -1
  69. package/dist/turns/git-inspection-profile.d.ts +25 -0
  70. package/dist/turns/git-inspection-profile.d.ts.map +1 -0
  71. package/dist/turns/git-inspection-profile.js +8 -0
  72. package/dist/turns/implement.d.ts +1 -1
  73. package/dist/turns/implement.d.ts.map +1 -1
  74. package/dist/turns/implement.js +1 -1
  75. package/dist/turns/simplify-implementation.d.ts +1 -1
  76. package/dist/turns/simplify-implementation.d.ts.map +1 -1
  77. package/dist/turns/simplify-implementation.js +3 -3
  78. package/package.json +5 -9
  79. package/src/finalization-git-internal.ts +186 -114
  80. package/src/finalization-git.ts +1 -1
  81. package/src/index.ts +4 -1
  82. package/src/pull-request-publication-internal.ts +158 -79
  83. package/src/repository-change-launch-internal.ts +119 -12
  84. package/src/repository-change-launch.ts +8 -4
  85. package/src/repository-change-process.ts +252 -524
  86. package/src/repository-change-publication.ts +702 -121
  87. package/src/repository-change-state-internal.ts +34 -20
  88. package/src/repository-change-ui-launcher-internal.ts +139 -56
  89. package/src/repository-publication-receipt.ts +71 -0
  90. package/src/repository-rebase/git.ts +108 -29
  91. package/src/repository-reconciliation.ts +600 -0
  92. package/src/repository-record.ts +14 -0
  93. package/src/settings.ts +79 -0
  94. package/src/turns/commit-message-evidence.ts +241 -0
  95. package/src/turns/generate-commit-message.ts +53 -23
  96. package/src/turns/generate-plan.ts +26 -12
  97. package/src/turns/git-inspection-profile.ts +134 -0
  98. package/src/turns/implement.ts +13 -3
  99. package/src/turns/simplify-implementation.ts +10 -6
  100. package/dist/chunk-34B3Q75M.js +0 -25
  101. package/dist/chunk-34B3Q75M.js.map +0 -1
  102. package/dist/chunk-F6CEEAFE.js +0 -13
  103. package/dist/chunk-F6CEEAFE.js.map +0 -1
  104. package/dist/chunk-GO44KCUS.js +0 -154
  105. package/dist/chunk-GO44KCUS.js.map +0 -1
  106. package/dist/chunk-R3UCUGY6.js +0 -31
  107. package/dist/chunk-R3UCUGY6.js.map +0 -1
  108. package/dist/chunk-W7VJT6AN.js +0 -25
  109. package/dist/chunk-W7VJT6AN.js.map +0 -1
  110. package/dist/chunk-WKHVLLKE.js +0 -45
  111. package/dist/chunk-WKHVLLKE.js.map +0 -1
  112. package/dist/chunk-YSC5GEQJ.js.map +0 -1
  113. package/dist/repository-change-launch-internal-Dd-AONUs.d.ts +0 -67
  114. package/dist/turns/review-implementation.d.ts +0 -4
  115. package/dist/turns/review-implementation.d.ts.map +0 -1
  116. package/dist/turns/review-implementation.js +0 -8
  117. package/dist/turns/review-plan.d.ts +0 -4
  118. package/dist/turns/review-plan.d.ts.map +0 -1
  119. package/dist/turns/review-plan.js +0 -8
  120. package/src/turns/review-implementation.ts +0 -30
  121. package/src/turns/review-plan.ts +0 -24
  122. /package/dist/turns/{review-implementation.js.map → commit-message-evidence.js.map} +0 -0
  123. /package/dist/turns/{review-plan.js.map → git-inspection-profile.js.map} +0 -0
@@ -11,6 +11,8 @@ export interface RebaseInput {
11
11
  /** @internal */
12
12
  conflict: ConflictEvidence;
13
13
  }
14
+ /** @internal */
15
+ export declare function hasPreparedRebase(input: RebaseInput): boolean;
14
16
  /** Persist the lease before changing HEAD; a retry resumes Git's own rebase state. @internal */
15
17
  export declare function prepareRebase(input: RebaseInput): RebaseRecord;
16
18
  /** @internal */
@@ -27,5 +29,11 @@ export declare function verifyRebase(input: RebaseInput): {
27
29
  baseSha: string;
28
30
  };
29
31
  /** @internal */
32
+ export declare class ConcurrentRebaseSourceError extends Error {
33
+ readonly repair: ReturnType<typeof verifyRebase>;
34
+ readonly published: boolean;
35
+ constructor(repair: ReturnType<typeof verifyRebase>, published?: boolean);
36
+ }
37
+ /** @internal */
30
38
  export declare function publishRebase(input: RebaseInput): ReturnType<typeof verifyRebase>;
31
39
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/repository-rebase/git.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,YAAY,CAAC;AAChE,OAAO,EACN,KAAK,YAAY,EAMjB,MAAM,aAAa,CAAC;AAErB,gBAAgB;AAChB,MAAM,WAAW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AgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAwC9D;AACD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA4B5D;AACD,gBAAgB;AAChB,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG;IACjD,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB,CAuBA;AACD,gBAAgB;AAChB,qBAAa,2BAA4B,SAAQ,KAAK;IAEpD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC;IAChD,QAAQ,CAAC,SAAS;gBADT,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,EACvC,SAAS,UAAQ;CAI3B;AAED,gBAAgB;AAChB,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAgFjF"}
@@ -0,0 +1,47 @@
1
+ import type { GitIdentity } from "./finalization-git.js";
2
+ /** @internal */
3
+ export interface ReconciliationInput {
4
+ projectKey: string;
5
+ repoPath: string;
6
+ workBranch: string;
7
+ /** Last remote baseline, not the latest observation. */
8
+ baselineSha: string;
9
+ /** Trusted project identity for replaying unpublished commits. */
10
+ gitIdentity?: GitIdentity;
11
+ }
12
+ /** @internal */
13
+ export interface ReconciliationResult {
14
+ status: "ready" | "conflicts";
15
+ remoteHead: string | null;
16
+ headSha: string;
17
+ changed: boolean;
18
+ }
19
+ /**
20
+ * Reconcile only unpublished work onto the fetched source branch. Checkpoint commits
21
+ * retain the index and working tree separately, including non-ignored untracked files.
22
+ * They are retained under private refs and removed from HEAD before publication.
23
+ * A conflicted rebase is deliberately left in place for the existing adjustment turn.
24
+ * @internal
25
+ */
26
+ export declare function reconcileRepository(input: ReconciliationInput): ReconciliationResult;
27
+ /** Reject ignored-file collisions before a target checkout/rebase can overwrite them. @internal */
28
+ export declare function assertReconciliationTargetSafe(input: Pick<ReconciliationInput, "repoPath" | "projectKey">, targetSha: string): void;
29
+ /** Preserve a target rebase as a net local delta when its source lease changes. @internal */
30
+ export declare function retainConcurrentRebase(input: ReconciliationInput & {
31
+ rebasedHead: string;
32
+ targetBase: string;
33
+ gitIdentity: GitIdentity;
34
+ }): void;
35
+ /** @internal */
36
+ export declare function repositoryWorktreeIsDirty(input: Pick<ReconciliationInput, "repoPath" | "projectKey">): boolean;
37
+ /** Capture the baseline before the first implementation, including an unpublished branch. @internal */
38
+ export declare function prepareInitialRepository(input: Omit<ReconciliationInput, "baselineSha">): ReconciliationResult;
39
+ /** Missing branches are allowed only before first publication. @internal */
40
+ export declare function reconcilePublicationRepository(input: Omit<ReconciliationInput, "baselineSha"> & {
41
+ baselineSha?: string;
42
+ }): ReconciliationResult;
43
+ /** Record only a remotely verified publication, including recovery after a lost reply. @internal */
44
+ export declare function recordRepositoryPublication(input: ReconciliationInput, headSha: string): void;
45
+ /** @internal */
46
+ export declare const reconciliationPrompt = "Repository synchronization preserves the current remote source branch and unpublished local work. If preparation left a rebase in progress, inspect git status and .git/leitwerk-reconciliation.json. Resolve conflicts preserving both intended changes and the original authors/sign-offs, then git add and GIT_EDITOR=true git rebase --continue until complete. Use the captured operation.identity for the committer when continuing, if present. Do not skip commits, remove the two Leitwerk checkpoint commits, reset, abort, or push. Checkpoint commits will be removed automatically by delivery; do not amend them. After resolving, finish with the turn's required success outcome so delivery can restore the ordinary checkout and request validation. If blocked, use cannot_repair when available or abort_turn otherwise, and retain the checkout. When no rebase is active, perform the requested adjustment and validate the combined result against the current repository instructions before the required success outcome. Never publish without validation after reconciliation.";
47
+ //# sourceMappingURL=repository-reconciliation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-reconciliation.d.ts","sourceRoot":"","sources":["../src/repository-reconcili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C,mBAAmB,EAAE,aAAa,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACxE,oBAAoB,CAmCtB;AAED,oGAAoG;AACpG,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAgB7F;AAED,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,8iCAA8iC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /** Repository-local JSON with atomic replacement. Callers own validation and locking. @internal */
2
+ export declare function repositoryRecord<T>(gitDirectory: string, name: string): {
3
+ read: () => T | null;
4
+ save: (record: T) => void;
5
+ };
6
+ //# sourceMappingURL=repository-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-record.d.ts","sourceRoot":"","sources":["../src/repository-record.ts"],"names":[],"mappings":"AAGA,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;gBAG1D,CAAC,GAAG,IAAI;mBACH,CAAC,KAAG,IAAI;EAKxB"}
@@ -0,0 +1,15 @@
1
+ import type { ScopedSettingsDeclaration, SettingDefinition } from "@leitwerk-dev/process-sdk";
2
+ /** @public */
3
+ export declare const codingPurposes: {
4
+ /** @public */
5
+ readonly planning: "coding.planning";
6
+ /** @public */
7
+ readonly implementation: "coding.implementation";
8
+ /** @public */
9
+ readonly review: "coding.review";
10
+ };
11
+ /** @internal */
12
+ export declare const commitMessageGitTimeout: SettingDefinition<number>;
13
+ /** @public */
14
+ export declare const codingSettings: ScopedSettingsDeclaration;
15
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9F,cAAc;AACd,eAAO,MAAM,cAAc;IAC1B,cAAc;;IAEd,cAAc;;IAEd,cAAc;;CAEL,CAAC;AAEX,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,iBAAiB,CAAC,MAAM,CA2B7D,CAAC;AAwBF,cAAc;AACd,eAAO,MAAM,cAAc,EAAE,yBAa5B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { ScopedSettingsSnapshot } from "@leitwerk-dev/domain";
2
+ import { type TurnDiagnosticReport } from "@leitwerk-dev/process-sdk";
3
+ interface GitOutput {
4
+ text: string;
5
+ truncated: boolean;
6
+ }
7
+ interface RepositoryChanges {
8
+ key: string;
9
+ path: string;
10
+ head: string;
11
+ status: GitOutput;
12
+ stagedDiff: GitOutput;
13
+ unstagedDiff: GitOutput;
14
+ untrackedFiles: GitOutput;
15
+ }
16
+ /** @internal */
17
+ export interface RepositoryCommitMessagePreparation {
18
+ /** @internal */
19
+ repositories: RepositoryChanges[];
20
+ }
21
+ /** @internal */
22
+ export declare function prepareRepositoryCommitMessageEvidence(ctx: {
23
+ projects: readonly {
24
+ key: string;
25
+ }[];
26
+ repo: {
27
+ get(key: string): {
28
+ fsPath: string;
29
+ };
30
+ };
31
+ scopedSettings?: ScopedSettingsSnapshot;
32
+ reportDiagnostic?: (report: TurnDiagnosticReport) => void;
33
+ }): Promise<RepositoryCommitMessagePreparation>;
34
+ export {};
35
+ //# sourceMappingURL=commit-message-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-message-evidence.d.ts","sourceRoot":"","sources":["../../src/turns/commit-message-evidence.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAGN,KAAK,oBAAoB,EACzB,MAAM,2BAA2B,CAAC;AAKnC,UAAU,SAAS;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,iBAAiB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE,SAAS,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IAClD,gBAAgB;IAChB,YAAY,EAAE,iBAAiB,EAAE,CAAC;CAClC;AA0HD,gBAAgB;AAChB,wBAAsB,sCAAsC,CAAC,GAAG,EAAE;IACjE,QAAQ,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrC,IAAI,EAAE;QAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAC/C,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC1D,GAAG,OAAO,CAAC,kCAAkC,CAAC,CA+E9C"}
@@ -0,0 +1,9 @@
1
+ import {
2
+ prepareRepositoryCommitMessageEvidence
3
+ } from "../chunk-M2VTUPFO.js";
4
+ import "../chunk-SZ4WOGV2.js";
5
+ import "../chunk-PX6F3LHL.js";
6
+ export {
7
+ prepareRepositoryCommitMessageEvidence
8
+ };
9
+ //# sourceMappingURL=commit-message-evidence.js.map
@@ -1,6 +1,9 @@
1
1
  import { type FlowPromptContext } from "@leitwerk-dev/process-sdk";
2
+ import type { RepositoryCommitMessagePreparation } from "./commit-message-evidence.js";
2
3
  /** @internal */
3
4
  export declare function normalizeGeneratedCommitMessage(value: unknown): string;
4
5
  /** @internal */
5
- export declare function buildGenerateCommitMessagePrompt<TParams, TState>(ctx: FlowPromptContext<TParams, TState, "plan">): string;
6
+ export declare function buildRepositoryCommitMessagesPrompt<TParams, TState>(ctx: FlowPromptContext<TParams, TState, "plan" | "implementation-summary", RepositoryCommitMessagePreparation>): string;
7
+ /** @internal */
8
+ export declare function parseRepositoryCommitMessages(raw: unknown, keys: string[]): Record<string, string>;
6
9
  //# sourceMappingURL=generate-commit-message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-commit-message.d.ts","sourceRoot":"","sources":["../../src/turns/generate-commit-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,iBAAiB,EACtB,MAAM,2BAA2B,CAAC;AAEnC,gBAAgB;AAChB,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAatE;AAED,gBAAgB;AAChB,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,MAAM,EAC/D,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,GAC7C,MAAM,CAwBR"}
1
+ {"version":3,"file":"generate-commit-message.d.ts","sourceRoot":"","sources":["../../src/turns/generate-commit-message.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,KAAK,iBAAiB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAEvF,gBAAgB;AAChB,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAatE;AAYD,gBAAgB;AAChB,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,MAAM,EAClE,GAAG,EAAE,iBAAiB,CACrB,OAAO,EACP,MAAM,EACN,MAAM,GAAG,wBAAwB,EACjC,kCAAkC,CAClC,GACC,MAAM,CAuBR;AACD,gBAAgB;AAChB,wBAAgB,6BAA6B,CAC5C,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EAAE,GACZ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB"}
@@ -1,10 +1,12 @@
1
1
  import {
2
- buildGenerateCommitMessagePrompt,
3
- normalizeGeneratedCommitMessage
4
- } from "../chunk-WKHVLLKE.js";
2
+ buildRepositoryCommitMessagesPrompt,
3
+ normalizeGeneratedCommitMessage,
4
+ parseRepositoryCommitMessages
5
+ } from "../chunk-DNG7D77K.js";
5
6
  import "../chunk-PX6F3LHL.js";
6
7
  export {
7
- buildGenerateCommitMessagePrompt,
8
- normalizeGeneratedCommitMessage
8
+ buildRepositoryCommitMessagesPrompt,
9
+ normalizeGeneratedCommitMessage,
10
+ parseRepositoryCommitMessages
9
11
  };
10
12
  //# sourceMappingURL=generate-commit-message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-plan.d.ts","sourceRoot":"","sources":["../../src/turns/generate-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,CAAC,GAC5D,MAAM,CAkBR"}
1
+ {"version":3,"file":"generate-plan.d.ts","sourceRoot":"","sources":["../../src/turns/generate-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,CAAC,GAC5D,MAAM,CAgCR"}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildGeneratePlanPrompt
3
- } from "../chunk-W7VJT6AN.js";
3
+ } from "../chunk-ABQH2WZT.js";
4
4
  import "../chunk-PX6F3LHL.js";
5
5
  export {
6
6
  buildGeneratePlanPrompt
@@ -0,0 +1,25 @@
1
+ /** @internal */
2
+ export interface GitTrace2Summary {
3
+ /** @internal */
4
+ counters: Record<string, number>;
5
+ /** @internal */
6
+ regionsMs: Record<string, number>;
7
+ /** Trace was absent, malformed, or exceeded the parsing budget. @internal */
8
+ incomplete: boolean;
9
+ }
10
+ /** Reduces a bounded Trace2 stream to allowlisted numbers; never retains raw events. @internal */
11
+ export declare class GitTrace2Collector {
12
+ private readonly decoder;
13
+ private readonly summary;
14
+ private bytes;
15
+ private pending;
16
+ private droppingLine;
17
+ private sawEvent;
18
+ /** @internal */
19
+ write(chunk: Buffer): void;
20
+ /** @internal */
21
+ finish(): GitTrace2Summary;
22
+ private consume;
23
+ private readEvent;
24
+ }
25
+ //# sourceMappingURL=git-inspection-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-inspection-profile.d.ts","sourceRoot":"","sources":["../../src/turns/git-inspection-profile.ts"],"names":[],"mappings":"AA2BA,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAChC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,6EAA6E;IAC7E,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,kGAAkG;AAClG,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwE;IAChG,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAS;IAEzB,gBAAgB;IAChB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAS1B,gBAAgB;IAChB,MAAM,IAAI,gBAAgB;IAO1B,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,SAAS;CAiDjB"}
@@ -0,0 +1,8 @@
1
+ import {
2
+ GitTrace2Collector
3
+ } from "../chunk-SZ4WOGV2.js";
4
+ import "../chunk-PX6F3LHL.js";
5
+ export {
6
+ GitTrace2Collector
7
+ };
8
+ //# sourceMappingURL=git-inspection-profile.js.map
@@ -1,4 +1,4 @@
1
1
  import type { FlowPromptContext, StructuralProcessState } from "@leitwerk-dev/process-sdk";
2
2
  /** @internal */
3
- export declare function buildImplementPrompt(ctx: FlowPromptContext<unknown, StructuralProcessState, "plan">): string;
3
+ export declare function buildImplementPrompt(ctx: Pick<FlowPromptContext<unknown, StructuralProcessState, "plan">, "prompts" | "input" | "repo">): string;
4
4
  //# sourceMappingURL=implement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"implement.d.ts","sourceRoot":"","sources":["../../src/turns/implement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,CAAC,GAC7D,MAAM,CAgBR"}
1
+ {"version":3,"file":"implement.d.ts","sourceRoot":"","sources":["../../src/turns/implement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,IAAI,CACR,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAC1D,SAAS,GAAG,OAAO,GAAG,MAAM,CAC5B,GACC,MAAM,CAuBR"}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildImplementPrompt
3
- } from "../chunk-YSC5GEQJ.js";
3
+ } from "../chunk-QD6FI4HR.js";
4
4
  import "../chunk-PX6F3LHL.js";
5
5
  export {
6
6
  buildImplementPrompt
@@ -1,4 +1,4 @@
1
1
  import type { FlowPromptContext, StructuralProcessState } from "@leitwerk-dev/process-sdk";
2
2
  /** @internal */
3
- export declare function buildSimplifyImplementationPrompt(_ctx: FlowPromptContext<unknown, StructuralProcessState>): string;
3
+ export declare function buildStreamlinedSimplificationPrompt(ctx: FlowPromptContext<unknown, StructuralProcessState>): string;
4
4
  //# sourceMappingURL=simplify-implementation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"simplify-implementation.d.ts","sourceRoot":"","sources":["../../src/turns/simplify-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,iCAAiC,CAChD,IAAI,EAAE,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,CAAC,GACtD,MAAM,CAMR"}
1
+ {"version":3,"file":"simplify-implementation.d.ts","sourceRoot":"","sources":["../../src/turns/simplify-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,gBAAgB;AAChB,wBAAgB,oCAAoC,CACnD,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,CAAC,GACrD,MAAM,CAUR"}
@@ -1,8 +1,8 @@
1
1
  import {
2
- buildSimplifyImplementationPrompt
3
- } from "../chunk-F6CEEAFE.js";
2
+ buildStreamlinedSimplificationPrompt
3
+ } from "../chunk-SKGB4CZS.js";
4
4
  import "../chunk-PX6F3LHL.js";
5
5
  export {
6
- buildSimplifyImplementationPrompt
6
+ buildStreamlinedSimplificationPrompt
7
7
  };
8
8
  //# sourceMappingURL=simplify-implementation.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leitwerk-dev/coding",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/leitwerk-dev/leitwerk.git",
@@ -45,11 +45,6 @@
45
45
  "import": "./dist/turns/implement.js",
46
46
  "types": "./dist/turns/implement.d.ts"
47
47
  },
48
- "./turns/review-implementation": {
49
- "source": "./src/turns/review-implementation.ts",
50
- "import": "./dist/turns/review-implementation.js",
51
- "types": "./dist/turns/review-implementation.d.ts"
52
- },
53
48
  "./turns/simplify-implementation": {
54
49
  "source": "./src/turns/simplify-implementation.ts",
55
50
  "import": "./dist/turns/simplify-implementation.js",
@@ -70,11 +65,12 @@
70
65
  "build": "tsup --silent"
71
66
  },
72
67
  "dependencies": {
73
- "@leitwerk-dev/domain": "0.3.1",
74
- "@leitwerk-dev/process-sdk": "0.3.1"
68
+ "@leitwerk-dev/domain": "0.4.1",
69
+ "@leitwerk-dev/process-sdk": "0.4.1"
75
70
  },
76
71
  "devDependencies": {
77
- "@leitwerk-dev/test-support": "0.3.1",
72
+ "@leitwerk-dev/extension-runtime": "0.4.1",
73
+ "@leitwerk-dev/test-support": "0.4.1",
78
74
  "tsup": "^8.5.1"
79
75
  },
80
76
  "license": "Apache-2.0",