@mrsf/cli 0.6.0 → 0.7.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 (37) hide show
  1. package/README.md +10 -7
  2. package/dist/browser.cjs +1101 -24
  3. package/dist/browser.cjs.map +4 -4
  4. package/dist/browser.d.ts +11 -0
  5. package/dist/browser.js +8 -0
  6. package/dist/evaluation/generate-reanchor-cases.d.ts +10 -0
  7. package/dist/evaluation/generate-reanchor-cases.js +301 -0
  8. package/dist/evaluation/reanchor-eval.d.ts +111 -0
  9. package/dist/evaluation/reanchor-eval.js +266 -0
  10. package/dist/evaluation/reanchor-gates.d.ts +29 -0
  11. package/dist/evaluation/reanchor-gates.js +47 -0
  12. package/dist/evaluation/run-reanchor-eval.d.ts +3 -0
  13. package/dist/evaluation/run-reanchor-eval.js +103 -0
  14. package/dist/evaluation/run-reanchor-generator.d.ts +3 -0
  15. package/dist/evaluation/run-reanchor-generator.js +63 -0
  16. package/dist/evaluation/run-reanchor-profile.d.ts +3 -0
  17. package/dist/evaluation/run-reanchor-profile.js +129 -0
  18. package/dist/index.cjs +1209 -34
  19. package/dist/index.cjs.map +4 -4
  20. package/dist/index.d.ts +12 -0
  21. package/dist/index.js +9 -0
  22. package/dist/lib/anchor-context.d.ts +46 -0
  23. package/dist/lib/anchor-context.js +474 -0
  24. package/dist/lib/confidence-calibration.d.ts +16 -0
  25. package/dist/lib/confidence-calibration.js +120 -0
  26. package/dist/lib/fuzzy.d.ts +14 -1
  27. package/dist/lib/fuzzy.js +140 -19
  28. package/dist/lib/git.d.ts +2 -0
  29. package/dist/lib/git.js +12 -0
  30. package/dist/lib/global-reconciliation.d.ts +11 -0
  31. package/dist/lib/global-reconciliation.js +145 -0
  32. package/dist/lib/reanchor-core.d.ts +7 -0
  33. package/dist/lib/reanchor-core.js +46 -4
  34. package/dist/lib/reanchor.js +82 -11
  35. package/dist/lib/revision-projection.d.ts +21 -0
  36. package/dist/lib/revision-projection.js +203 -0
  37. package/package.json +5 -1
package/README.md CHANGED
@@ -195,13 +195,16 @@ mrsf list --json --open
195
195
 
196
196
  ### `mrsf reanchor [files...]`
197
197
 
198
- Re-anchor comments after the source document has been edited. Uses a multi-step resolution algorithm (§7.4):
198
+ Re-anchor comments after the source document has been edited. The repository's
199
+ **Anchor Mesh** implementation combines verified Git shifts, source-revision
200
+ projection, Markdown structure, bounded text matching, confidence calibration,
201
+ and nearby comments as landmarks. It prefers `ambiguous` or `orphaned` results
202
+ over an unsupported relocation.
199
203
 
200
- 1. **Diff-based shift** — uses `git diff` to calculate line offsets
201
- 2. **Exact text match** — searches for `selected_text` verbatim
202
- 3. **Fuzzy match** — token-level LCS + Levenshtein similarity
203
- 4. **Line/column fallback** — checks whether original position is still plausible
204
- 5. **Orphan** — retains unresolvable comments and marks them for review
204
+ See the
205
+ [non-normative implementation guide](https://sidemark.org/guide/reanchoring)
206
+ for the complete pipeline, execution modes, tuning values, and evaluation
207
+ methodology.
205
208
 
206
209
  ```bash
207
210
  # Dry run — see what would change without writing
@@ -456,7 +459,7 @@ The CLI and Sidemark VS Code extension use the following extension fields:
456
459
 
457
460
  | Field | Scope | Type | Set by | Description |
458
461
  |---|---|---|---|---|
459
- | `x_reanchor_status` | comment | `"anchored"` \| `"shifted"` \| `"fuzzy"` \| `"orphaned"` | `mrsf reanchor` | Result of the most recent reanchor pass. `orphaned` means the anchor text could not be found in the current document. |
462
+ | `x_reanchor_status` | comment | `"anchored"` \| `"shifted"` \| `"fuzzy"` \| `"ambiguous"` \| `"orphaned"` | `mrsf reanchor` | Result of the most recent reanchor pass. `ambiguous` means evidence conflicts or multiple candidates remain; `orphaned` means no defensible anchor was found. |
460
463
  | `x_reanchor_score` | comment | `number` (0–1) | `mrsf reanchor` | Confidence score from the reanchor algorithm. `1.0` = exact match, lower values indicate fuzzy or shifted matches. |
461
464
 
462
465
  ### Adding your own fields