@gitkraken/conflict-tools 0.2.4-beta.9 → 0.4.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +55 -7
  2. package/README.md +308 -59
  3. package/dist/errors/conflict.d.ts +1 -1
  4. package/dist/extraction/extract.d.ts +15 -1
  5. package/dist/extraction/extract.js +1 -1
  6. package/dist/extraction/parser.js +5 -5
  7. package/dist/git/port-dispatch.d.ts +14 -2
  8. package/dist/git/port-dispatch.js +1 -3
  9. package/dist/index.d.ts +6 -6
  10. package/dist/index.js +1 -1
  11. package/dist/ports/git.d.ts +20 -1
  12. package/dist/ports/parser.d.ts +27 -6
  13. package/dist/ports/validator.d.ts +29 -0
  14. package/dist/ports/validator.js +1 -0
  15. package/dist/reference-integrity/detect.d.ts +39 -4
  16. package/dist/reference-integrity/detect.js +2 -2
  17. package/dist/reference-integrity/snapshot.d.ts +28 -6
  18. package/dist/reference-integrity/snapshot.js +1 -1
  19. package/dist/resolution/detect-code-loss.d.ts +23 -0
  20. package/dist/resolution/detect-code-loss.js +1 -0
  21. package/dist/resolver/apply-resolutions.js +1 -1
  22. package/dist/resolver/deps.d.ts +1 -1
  23. package/dist/resolver/fix-loop.d.ts +67 -0
  24. package/dist/resolver/fix-loop.js +2 -0
  25. package/dist/resolver/mechanical.d.ts +25 -0
  26. package/dist/resolver/mechanical.js +1 -0
  27. package/dist/resolver/model-budget.d.ts +26 -0
  28. package/dist/resolver/model-budget.js +1 -0
  29. package/dist/resolver/parse-response.d.ts +9 -1
  30. package/dist/resolver/parse-response.js +1 -1
  31. package/dist/resolver/prompt.d.ts +13 -2
  32. package/dist/resolver/prompt.js +27 -7
  33. package/dist/resolver/refine-pass.d.ts +8 -0
  34. package/dist/resolver/refine-pass.js +1 -1
  35. package/dist/resolver/rename-choice.d.ts +15 -0
  36. package/dist/resolver/rename-choice.js +1 -0
  37. package/dist/resolver/rename-group.d.ts +22 -0
  38. package/dist/resolver/rename-group.js +1 -0
  39. package/dist/resolver/resolve-conflict.d.ts +7 -1
  40. package/dist/resolver/resolve-conflict.js +1 -1
  41. package/dist/resolver/resolve-conflicts.js +1 -1
  42. package/dist/resolver/summarize-operation.js +1 -1
  43. package/dist/resolver/validate.js +1 -1
  44. package/dist/types/events.d.ts +30 -3
  45. package/dist/types/findings.d.ts +25 -15
  46. package/dist/types/resolution.d.ts +17 -1
  47. package/dist/types/step.d.ts +47 -5
  48. package/dist/types/summary.d.ts +17 -10
  49. package/dist/validation/findings.d.ts +9 -0
  50. package/dist/validation/findings.js +1 -0
  51. package/dist/validation/markers.d.ts +11 -0
  52. package/dist/{ports/verify.js → validation/markers.js} +1 -1
  53. package/package.json +1 -1
  54. package/dist/ports/verify.d.ts +0 -30
@@ -0,0 +1,11 @@
1
+ import { Issue } from "../types/issue.js";
2
+
3
+ //#region src/validation/markers.d.ts
4
+ interface VerificationResult {
5
+ valid: boolean;
6
+ issues?: Issue[];
7
+ }
8
+ declare const CONFLICT_MARKER_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp];
9
+ declare function checkResidualMarkers(_filePath: string, content: string): VerificationResult;
10
+ //#endregion
11
+ export { CONFLICT_MARKER_PATTERNS, VerificationResult, checkResidualMarkers };
@@ -1,2 +1,2 @@
1
1
  const e=[/^<{7}(\s|$)/,/^\|{7}(\s|$)/,/^={7}(\s|$)/,/^>{7}(\s|$)/];function t(t,n){let r=n.split(`
2
- `),i=[];for(let t=0;t<r.length;t++){let n=r[t]??``;for(let r of e)if(r.test(n)){i.push(t+1);break}}return i.length===0?{valid:!0}:{valid:!1,issues:[{severity:`error`,message:`Residual conflict markers found at line(s) ${i.join(`, `)}.`}]}}export{t as checkResidualMarkers};
2
+ `),i=[];for(let t=0;t<r.length;t++){let n=r[t]??``;for(let r of e)if(r.test(n)){i.push(t+1);break}}return i.length===0?{valid:!0}:{valid:!1,issues:[{severity:`error`,message:`Residual conflict markers found at line(s) ${i.join(`, `)}.`}]}}export{e as CONFLICT_MARKER_PATTERNS,t as checkResidualMarkers};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/conflict-tools",
3
- "version": "0.2.4-beta.9",
3
+ "version": "0.4.0",
4
4
  "description": "AI-powered git conflict resolution.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Axosoft, LLC dba GitKraken",
@@ -1,30 +0,0 @@
1
- import { SourceOverlay } from "./parser.js";
2
- import { Issue } from "../types/issue.js";
3
-
4
- //#region src/ports/verify.d.ts
5
- interface VerificationResult {
6
- valid: boolean;
7
- issues?: Issue[];
8
- }
9
- interface ValidatorFinding {
10
- /** Open category string set by the consumer (e.g. `'type-error'`, `'lint:no-console'`). */
11
- category: string;
12
- severity: 'error' | 'warning';
13
- file: string;
14
- /** 1-indexed. */
15
- line?: number;
16
- message: string;
17
- }
18
- /**
19
- * The consumer's validation port (RFC stages 5/7). Plug in any checks — syntax, real import
20
- * resolution, types, lint, project rules. **Non-blocking**: runs post-refine over an overlay (one file
21
- * for per-file validation, or the whole touched set for cross-file); its findings are advisory (folded
22
- * into the operation's findings and verdict), never a re-resolve. The only blocking gate is residual
23
- * conflict markers, checked built-in by the resolver ({@link checkResidualMarkers}) — not this port.
24
- */
25
- interface Validator {
26
- validate(sources: SourceOverlay): Promise<ValidatorFinding[]>;
27
- }
28
- declare function checkResidualMarkers(_filePath: string, content: string): VerificationResult;
29
- //#endregion
30
- export { Validator, ValidatorFinding, VerificationResult, checkResidualMarkers };