dsh-better-edit 0.3.0 → 0.3.2

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 (74) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +9 -5
  3. package/README.zh.md +1 -2
  4. package/lib/constants.js +3 -1
  5. package/lib/contract.js +133 -76
  6. package/lib/drift.js +5 -98
  7. package/lib/dsh-context.js +2 -24
  8. package/lib/edit-engine.js +6 -5
  9. package/lib/edit-pipeline.js +3 -121
  10. package/lib/edit-response.js +16 -8
  11. package/lib/file-kind.js +6 -121
  12. package/lib/file-reader.js +4 -77
  13. package/lib/file-view.js +446 -23
  14. package/lib/fs-bridge.js +39 -1
  15. package/lib/guidance/materialize.js +25 -4
  16. package/lib/guidance/resolve.js +3 -9
  17. package/lib/hash-store.js +6 -3
  18. package/lib/hashline/alphabet.js +2 -6
  19. package/lib/hashline/anchor-pipeline.js +770 -7
  20. package/lib/hashline/apply.js +2 -223
  21. package/lib/hashline/hash-assign.js +248 -13
  22. package/lib/hashline/hash.js +67 -29
  23. package/lib/hashline/hasher.js +2 -23
  24. package/lib/hashline/index.js +7 -1
  25. package/lib/hashline/parse.js +2 -35
  26. package/lib/hashline/pure.js +2 -213
  27. package/lib/hashline/resolve.js +3 -366
  28. package/lib/hashline/served.js +2 -120
  29. package/lib/index.js +0 -2
  30. package/lib/mutation.js +218 -10
  31. package/lib/noop-guard.js +20 -0
  32. package/lib/preview-controller.js +65 -0
  33. package/lib/prompts.js +14 -20
  34. package/lib/read-render.js +3 -139
  35. package/lib/served-store.js +2 -216
  36. package/lib/session-view.js +309 -11
  37. package/lib/tool-edit.js +71 -125
  38. package/lib/tool-undo.js +11 -5
  39. package/lib/truncate.js +3 -95
  40. package/lib/types/constants.d.ts +2 -0
  41. package/lib/types/contract.d.ts +102 -28
  42. package/lib/types/drift.d.ts +5 -29
  43. package/lib/types/dsh-context.d.ts +2 -20
  44. package/lib/types/edit-pipeline.d.ts +3 -44
  45. package/lib/types/file-kind.d.ts +6 -18
  46. package/lib/types/file-reader.d.ts +4 -45
  47. package/lib/types/file-view.d.ts +99 -34
  48. package/lib/types/guidance/materialize.d.ts +3 -3
  49. package/lib/types/guidance/resolve.d.ts +2 -2
  50. package/lib/types/hashline/alphabet.d.ts +1 -5
  51. package/lib/types/hashline/anchor-pipeline.d.ts +111 -10
  52. package/lib/types/hashline/apply.d.ts +1 -22
  53. package/lib/types/hashline/hash-assign.d.ts +25 -19
  54. package/lib/types/hashline/hash.d.ts +8 -9
  55. package/lib/types/hashline/hasher.d.ts +1 -8
  56. package/lib/types/hashline/index.d.ts +7 -1
  57. package/lib/types/hashline/parse.d.ts +1 -7
  58. package/lib/types/hashline/pure.d.ts +1 -26
  59. package/lib/types/hashline/resolve.d.ts +1 -63
  60. package/lib/types/hashline/served.d.ts +1 -43
  61. package/lib/types/mutation.d.ts +63 -10
  62. package/lib/types/noop-guard.d.ts +29 -0
  63. package/lib/types/preview-controller.d.ts +33 -0
  64. package/lib/types/prompts.d.ts +9 -9
  65. package/lib/types/read-render.d.ts +3 -18
  66. package/lib/types/served-store.d.ts +2 -81
  67. package/lib/types/session-view.d.ts +68 -9
  68. package/lib/types/tool-edit.d.ts +3 -14
  69. package/lib/types/truncate.d.ts +3 -29
  70. package/lib/types/validation.d.ts +6 -7
  71. package/lib/types/workspace.d.ts +2 -21
  72. package/lib/validation.js +6 -33
  73. package/lib/workspace.js +2 -27
  74. package/package.json +2 -2
@@ -1,6 +1,2 @@
1
- export const HASH_LEN = 3;
2
- export const ALPH = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
3
- const ALPH_SAFE = ALPH.replace(/-/g, "\\-");
4
- export const ALPH_RE = new RegExp(`^[${ALPH_SAFE}]+$`);
5
- export const HASH_CLASS = `[${ALPH_SAFE}]{${HASH_LEN}}`;
6
- export const HASH_RE = new RegExp(`^${HASH_CLASS}$`);
1
+ // @deprecated — private to HashAssign seam. Use `from "./hash-assign.js"` instead.
2
+ export * from "./hash-assign.js";