@hizliemre/horse-code 0.1.2 → 0.2.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/dist/{app-LAJN3TWC.js → app-2GPGCDX6.js} +136 -329
  2. package/dist/{chunk-K2VERI5Q.js → chunk-23CLQ2KO.js} +365 -666
  3. package/dist/{chunk-KOWMHL23.js → chunk-5ZV42XGJ.js} +2 -2
  4. package/dist/{chunk-2SVAHH5N.js → chunk-63E73TGI.js} +2 -4
  5. package/dist/{chunk-DTWKSZXY.js → chunk-6OSEQOYY.js} +2 -2
  6. package/dist/{chunk-SSDLHWSF.js → chunk-6W4UH2BQ.js} +33 -1
  7. package/dist/{chunk-RPVAIS3P.js → chunk-7JMWPTJ5.js} +1724 -306
  8. package/dist/{chunk-VPAWRRHL.js → chunk-AE36LLL2.js} +31 -21
  9. package/dist/{chunk-FFYBY2NA.js → chunk-KAGKX2YT.js} +2 -4
  10. package/dist/{chunk-4EWK7HWQ.js → chunk-KKWZBZYK.js} +10 -0
  11. package/dist/{chunk-DRZSUQ7Q.js → chunk-LLL7QWXB.js} +18 -7
  12. package/dist/{chunk-WYQBRCKY.js → chunk-LNW557IO.js} +2 -2
  13. package/dist/{chunk-IW2KBAVZ.js → chunk-LPQU436C.js} +12 -1
  14. package/dist/chunk-M2RKCIGV.js +11 -0
  15. package/dist/{chunk-NNTIACT4.js → chunk-MRZVA5JB.js} +4 -4
  16. package/dist/{chunk-EQX7BQYN.js → chunk-UGESK765.js} +1 -1
  17. package/dist/{chunk-PGOYDOI4.js → chunk-XEGQT5EN.js} +3 -5
  18. package/dist/{chunk-FGVJFMK5.js → chunk-ZSQ24YDJ.js} +1 -1
  19. package/dist/cli.js +379 -93
  20. package/dist/{discover-5URG7C4J.js → discover-G2Z6XC3O.js} +9 -3
  21. package/dist/fix-JOIXQFVP.js +33 -0
  22. package/dist/git-QZTDZSJY.js +8 -0
  23. package/dist/{ongoing-XP6WXNI7.js → ongoing-WHYXPW24.js} +4 -4
  24. package/dist/{project-graph-IOPCSZUA.js → project-graph-5HNPRFQG.js} +2 -3
  25. package/dist/{run-LQOZ5I7Z.js → run-P6ZYL5JL.js} +2 -3
  26. package/dist/{save-skills-NSLBU33X.js → save-skills-X7U3KCPU.js} +1 -1
  27. package/dist/{trace-ZMB7LT7W.js → trace-X6TU3AG6.js} +2 -3
  28. package/dist/{trace-adopt-C6TUWFJL.js → trace-adopt-URECQWJV.js} +2 -3
  29. package/dist/{trace-run-F23MFTY4.js → trace-run-7U4WJZ3V.js} +6 -7
  30. package/dist/{triage-ES5OHZOS.js → triage-FCYHD2AQ.js} +8 -9
  31. package/dist/{verify-3R7DGUSI.js → verify-6SC4I77M.js} +18 -19
  32. package/package.json +1 -1
  33. package/dist/chunk-3UYA3KUG.js +0 -212
  34. package/dist/chunk-B67BK5GQ.js +0 -34
  35. package/dist/chunk-O74BDQKS.js +0 -28
  36. package/dist/fix-CMARU6JR.js +0 -34
  37. package/dist/git-VTSZALSR.js +0 -6
@@ -2,10 +2,10 @@ import {
2
2
  Board,
3
3
  refreshAfterChange,
4
4
  runTaskCycle
5
- } from "./chunk-RPVAIS3P.js";
5
+ } from "./chunk-7JMWPTJ5.js";
6
6
  import {
7
7
  defaultGitRunner
8
- } from "./chunk-IW2KBAVZ.js";
8
+ } from "./chunk-LPQU436C.js";
9
9
 
10
10
  // src/engine/fix.ts
11
11
  function cardFromFinding(f, id) {
@@ -1,9 +1,7 @@
1
1
  import {
2
- stateRoot
3
- } from "./chunk-SSDLHWSF.js";
4
- import {
2
+ stateRoot,
5
3
  writeAtomic
6
- } from "./chunk-B67BK5GQ.js";
4
+ } from "./chunk-6W4UH2BQ.js";
7
5
 
8
6
  // src/migrate/migrated.ts
9
7
  import { readFile, mkdir } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  hashContent,
3
3
  traceDir
4
- } from "./chunk-FFYBY2NA.js";
4
+ } from "./chunk-KAGKX2YT.js";
5
5
 
6
6
  // src/engine/project-brief.ts
7
7
  import { readFile, writeFile, mkdir } from "fs/promises";
@@ -70,7 +70,7 @@ async function gatherBriefInput(cwd, files) {
70
70
  async function ourOwnOutput(cwd) {
71
71
  const out = /* @__PURE__ */ new Set();
72
72
  try {
73
- const { loadTraceIndex, traceRootRel } = await import("./trace-ZMB7LT7W.js");
73
+ const { loadTraceIndex, traceRootRel } = await import("./trace-X6TU3AG6.js");
74
74
  const root = traceRootRel().replace(/\\/g, "/");
75
75
  out.add(`${root}/PROJECT.md`);
76
76
  out.add(`${root}/PROJECT.json`);
@@ -27,9 +27,41 @@ function inLinkedWorktree(cwd, run) {
27
27
  return resolve(dir) !== resolve(common);
28
28
  }
29
29
 
30
+ // src/session/atomic.ts
31
+ import { rename, rm, writeFile } from "fs/promises";
32
+ import { renameSync, rmSync, writeFileSync } from "fs";
33
+ var seq = 0;
34
+ var tmpName = (path) => `${path}.${process.pid}.${seq++}.tmp`;
35
+ async function writeAtomic(path, data) {
36
+ const tmp = tmpName(path);
37
+ try {
38
+ await writeFile(tmp, data, "utf8");
39
+ await rename(tmp, path);
40
+ } catch (e) {
41
+ await rm(tmp, { force: true }).catch(() => {
42
+ });
43
+ throw e;
44
+ }
45
+ }
46
+ function writeAtomicSync(path, data) {
47
+ const tmp = tmpName(path);
48
+ try {
49
+ writeFileSync(tmp, data, "utf8");
50
+ renameSync(tmp, path);
51
+ } catch (e) {
52
+ try {
53
+ rmSync(tmp, { force: true });
54
+ } catch {
55
+ }
56
+ throw e;
57
+ }
58
+ }
59
+
30
60
  export {
31
61
  sessionBase,
32
62
  stateRoot,
33
63
  writableStateRoot,
34
- inLinkedWorktree
64
+ inLinkedWorktree,
65
+ writeAtomic,
66
+ writeAtomicSync
35
67
  };