@open-mercato/cezar 0.1.5-pr506.357

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 (264) hide show
  1. package/README.md +573 -0
  2. package/dist/config.d.ts +144 -0
  3. package/dist/config.js +106 -0
  4. package/dist/config.js.map +1 -0
  5. package/dist/core/agent-runner.d.ts +169 -0
  6. package/dist/core/agent-runner.js +23 -0
  7. package/dist/core/agent-runner.js.map +1 -0
  8. package/dist/core/backend-detect.d.ts +16 -0
  9. package/dist/core/backend-detect.js +118 -0
  10. package/dist/core/backend-detect.js.map +1 -0
  11. package/dist/core/claude-cli-runner.d.ts +56 -0
  12. package/dist/core/claude-cli-runner.js +416 -0
  13. package/dist/core/claude-cli-runner.js.map +1 -0
  14. package/dist/core/claude-ui-mapper.d.ts +71 -0
  15. package/dist/core/claude-ui-mapper.js +567 -0
  16. package/dist/core/claude-ui-mapper.js.map +1 -0
  17. package/dist/core/codex-app-server-runner.d.ts +29 -0
  18. package/dist/core/codex-app-server-runner.js +489 -0
  19. package/dist/core/codex-app-server-runner.js.map +1 -0
  20. package/dist/core/codex-ui-mapper.d.ts +63 -0
  21. package/dist/core/codex-ui-mapper.js +491 -0
  22. package/dist/core/codex-ui-mapper.js.map +1 -0
  23. package/dist/core/ndjson.d.ts +6 -0
  24. package/dist/core/ndjson.js +23 -0
  25. package/dist/core/ndjson.js.map +1 -0
  26. package/dist/core/opencode-server-runner.d.ts +30 -0
  27. package/dist/core/opencode-server-runner.js +488 -0
  28. package/dist/core/opencode-server-runner.js.map +1 -0
  29. package/dist/core/opencode-ui-mapper.d.ts +105 -0
  30. package/dist/core/opencode-ui-mapper.js +588 -0
  31. package/dist/core/opencode-ui-mapper.js.map +1 -0
  32. package/dist/core/process-usage.d.ts +63 -0
  33. package/dist/core/process-usage.js +181 -0
  34. package/dist/core/process-usage.js.map +1 -0
  35. package/dist/core/runner-factory.d.ts +8 -0
  36. package/dist/core/runner-factory.js +22 -0
  37. package/dist/core/runner-factory.js.map +1 -0
  38. package/dist/core/tool-display.d.ts +30 -0
  39. package/dist/core/tool-display.js +156 -0
  40. package/dist/core/tool-display.js.map +1 -0
  41. package/dist/core/ui-events.d.ts +308 -0
  42. package/dist/core/ui-events.js +25 -0
  43. package/dist/core/ui-events.js.map +1 -0
  44. package/dist/core/usage.d.ts +11 -0
  45. package/dist/core/usage.js +15 -0
  46. package/dist/core/usage.js.map +1 -0
  47. package/dist/git-worktree.d.ts +88 -0
  48. package/dist/git-worktree.js +297 -0
  49. package/dist/git-worktree.js.map +1 -0
  50. package/dist/handoff.d.ts +62 -0
  51. package/dist/handoff.js +147 -0
  52. package/dist/handoff.js.map +1 -0
  53. package/dist/index.d.ts +2 -0
  54. package/dist/index.js +466 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/install-as-command.d.ts +39 -0
  57. package/dist/install-as-command.js +51 -0
  58. package/dist/install-as-command.js.map +1 -0
  59. package/dist/pack-check.d.ts +17 -0
  60. package/dist/pack-check.js +27 -0
  61. package/dist/pack-check.js.map +1 -0
  62. package/dist/paths.d.ts +23 -0
  63. package/dist/paths.js +34 -0
  64. package/dist/paths.js.map +1 -0
  65. package/dist/planner.d.ts +17 -0
  66. package/dist/planner.js +248 -0
  67. package/dist/planner.js.map +1 -0
  68. package/dist/release/snapshot.d.ts +64 -0
  69. package/dist/release/snapshot.js +75 -0
  70. package/dist/release/snapshot.js.map +1 -0
  71. package/dist/release/stable.d.ts +46 -0
  72. package/dist/release/stable.js +57 -0
  73. package/dist/release/stable.js.map +1 -0
  74. package/dist/runs/auto-name.d.ts +75 -0
  75. package/dist/runs/auto-name.js +168 -0
  76. package/dist/runs/auto-name.js.map +1 -0
  77. package/dist/runs/retention.d.ts +60 -0
  78. package/dist/runs/retention.js +86 -0
  79. package/dist/runs/retention.js.map +1 -0
  80. package/dist/runs/review-gate.d.ts +18 -0
  81. package/dist/runs/review-gate.js +21 -0
  82. package/dist/runs/review-gate.js.map +1 -0
  83. package/dist/runs/store.d.ts +408 -0
  84. package/dist/runs/store.js +526 -0
  85. package/dist/runs/store.js.map +1 -0
  86. package/dist/runs/task-refs.d.ts +24 -0
  87. package/dist/runs/task-refs.js +74 -0
  88. package/dist/runs/task-refs.js.map +1 -0
  89. package/dist/runs/ui-event-sink.d.ts +81 -0
  90. package/dist/runs/ui-event-sink.js +210 -0
  91. package/dist/runs/ui-event-sink.js.map +1 -0
  92. package/dist/server/capabilities.d.ts +33 -0
  93. package/dist/server/capabilities.js +43 -0
  94. package/dist/server/capabilities.js.map +1 -0
  95. package/dist/server/forge/github.d.ts +70 -0
  96. package/dist/server/forge/github.js +375 -0
  97. package/dist/server/forge/github.js.map +1 -0
  98. package/dist/server/forge/index.d.ts +24 -0
  99. package/dist/server/forge/index.js +45 -0
  100. package/dist/server/forge/index.js.map +1 -0
  101. package/dist/server/forge/types.d.ts +80 -0
  102. package/dist/server/forge/types.js +2 -0
  103. package/dist/server/forge/types.js.map +1 -0
  104. package/dist/server/git-changes.d.ts +195 -0
  105. package/dist/server/git-changes.js +497 -0
  106. package/dist/server/git-changes.js.map +1 -0
  107. package/dist/server/git.d.ts +26 -0
  108. package/dist/server/git.js +103 -0
  109. package/dist/server/git.js.map +1 -0
  110. package/dist/server/github.d.ts +8 -0
  111. package/dist/server/github.js +8 -0
  112. package/dist/server/github.js.map +1 -0
  113. package/dist/server/launch-key.d.ts +7 -0
  114. package/dist/server/launch-key.js +33 -0
  115. package/dist/server/launch-key.js.map +1 -0
  116. package/dist/server/open-in-app.d.ts +51 -0
  117. package/dist/server/open-in-app.js +189 -0
  118. package/dist/server/open-in-app.js.map +1 -0
  119. package/dist/server/open-in-terminal.d.ts +25 -0
  120. package/dist/server/open-in-terminal.js +120 -0
  121. package/dist/server/open-in-terminal.js.map +1 -0
  122. package/dist/server/pr.d.ts +7 -0
  123. package/dist/server/pr.js +7 -0
  124. package/dist/server/pr.js.map +1 -0
  125. package/dist/server/server.d.ts +41 -0
  126. package/dist/server/server.js +1390 -0
  127. package/dist/server/server.js.map +1 -0
  128. package/dist/server/static-ui.d.ts +49 -0
  129. package/dist/server/static-ui.js +92 -0
  130. package/dist/server/static-ui.js.map +1 -0
  131. package/dist/server/wsl.d.ts +25 -0
  132. package/dist/server/wsl.js +92 -0
  133. package/dist/server/wsl.js.map +1 -0
  134. package/dist/server-install/engine.d.ts +33 -0
  135. package/dist/server-install/engine.js +314 -0
  136. package/dist/server-install/engine.js.map +1 -0
  137. package/dist/server-install/platforms/macosx-ngrok.d.ts +6 -0
  138. package/dist/server-install/platforms/macosx-ngrok.js +345 -0
  139. package/dist/server-install/platforms/macosx-ngrok.js.map +1 -0
  140. package/dist/server-install/platforms/ubuntu-vps.d.ts +39 -0
  141. package/dist/server-install/platforms/ubuntu-vps.js +746 -0
  142. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -0
  143. package/dist/server-install/state.d.ts +26 -0
  144. package/dist/server-install/state.js +125 -0
  145. package/dist/server-install/state.js.map +1 -0
  146. package/dist/server-install/steps.d.ts +109 -0
  147. package/dist/server-install/steps.js +330 -0
  148. package/dist/server-install/steps.js.map +1 -0
  149. package/dist/server-install/strategies.d.ts +4 -0
  150. package/dist/server-install/strategies.js +20 -0
  151. package/dist/server-install/strategies.js.map +1 -0
  152. package/dist/server-install/types.d.ts +597 -0
  153. package/dist/server-install/types.js +98 -0
  154. package/dist/server-install/types.js.map +1 -0
  155. package/dist/server-install/ui.d.ts +42 -0
  156. package/dist/server-install/ui.js +130 -0
  157. package/dist/server-install/ui.js.map +1 -0
  158. package/dist/skills-banner.d.ts +21 -0
  159. package/dist/skills-banner.js +40 -0
  160. package/dist/skills-banner.js.map +1 -0
  161. package/dist/skills-remote.d.ts +35 -0
  162. package/dist/skills-remote.js +266 -0
  163. package/dist/skills-remote.js.map +1 -0
  164. package/dist/skills.d.ts +45 -0
  165. package/dist/skills.js +182 -0
  166. package/dist/skills.js.map +1 -0
  167. package/dist/todos.d.ts +63 -0
  168. package/dist/todos.js +168 -0
  169. package/dist/todos.js.map +1 -0
  170. package/dist/ui-state.d.ts +12 -0
  171. package/dist/ui-state.js +25 -0
  172. package/dist/ui-state.js.map +1 -0
  173. package/dist/update-check.d.ts +12 -0
  174. package/dist/update-check.js +41 -0
  175. package/dist/update-check.js.map +1 -0
  176. package/dist/workflows/load.d.ts +15 -0
  177. package/dist/workflows/load.js +56 -0
  178. package/dist/workflows/load.js.map +1 -0
  179. package/dist/workflows/run.d.ts +281 -0
  180. package/dist/workflows/run.js +1511 -0
  181. package/dist/workflows/run.js.map +1 -0
  182. package/dist/workflows/types.d.ts +307 -0
  183. package/dist/workflows/types.js +171 -0
  184. package/dist/workflows/types.js.map +1 -0
  185. package/package.json +90 -0
  186. package/scripts/check-pack.mjs +46 -0
  187. package/scripts/dev.mjs +74 -0
  188. package/scripts/install-as-command.mjs +120 -0
  189. package/scripts/mock-claude.mjs +310 -0
  190. package/scripts/release-snapshot.mjs +130 -0
  191. package/scripts/release.mjs +119 -0
  192. package/scripts/test-process-usage.mjs +47 -0
  193. package/web/dist/assets/arrow-left-BE957rJs.js +1 -0
  194. package/web/dist/assets/bundle-mjs-DLPpRFyl.js +1 -0
  195. package/web/dist/assets/centered-state-BddhEEtO.js +43 -0
  196. package/web/dist/assets/chunk-BO2N2NFS-f5igTtpB.js +131 -0
  197. package/web/dist/assets/command-CjhFbABo.js +1 -0
  198. package/web/dist/assets/compare-variants-Cs52IAEG.js +1 -0
  199. package/web/dist/assets/core-BuMqAF_1.js +12 -0
  200. package/web/dist/assets/css-BsVw1vtW.js +1 -0
  201. package/web/dist/assets/dialog-DFvXTkFv.js +1 -0
  202. package/web/dist/assets/diff-view-C9b8AITq.js +4 -0
  203. package/web/dist/assets/diff-woXpYk--.js +1 -0
  204. package/web/dist/assets/dist-FBs4wmIY.js +1 -0
  205. package/web/dist/assets/dist-o_kVMXjg.js +1 -0
  206. package/web/dist/assets/engine-javascript-FQvzRocB.js +141 -0
  207. package/web/dist/assets/file-BVuztAOd.js +1 -0
  208. package/web/dist/assets/folder-0pJ1NZ_S.js +1 -0
  209. package/web/dist/assets/git-pull-request-DJkAMT0f.js +1 -0
  210. package/web/dist/assets/git-toolbar-CwhQdx3J.js +1 -0
  211. package/web/dist/assets/github-D0rAX4-r.js +1 -0
  212. package/web/dist/assets/go-rLFTqkRN.js +1 -0
  213. package/web/dist/assets/highlighted-body-OFNGDK62-DGHHie_q.js +1 -0
  214. package/web/dist/assets/highlighter-BKVEsACy.js +3 -0
  215. package/web/dist/assets/html-BY76lXLH.js +1 -0
  216. package/web/dist/assets/index-CEkI7QxN.css +2 -0
  217. package/web/dist/assets/index-CO2lH2et.js +11 -0
  218. package/web/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  219. package/web/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  220. package/web/dist/assets/javascript-BgS3c2Ky.js +1 -0
  221. package/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  222. package/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  223. package/web/dist/assets/json-qhed-kSA.js +1 -0
  224. package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
  225. package/web/dist/assets/jsx-Bz0zcwM4.js +1 -0
  226. package/web/dist/assets/lib-CNGa3Dig.js +1 -0
  227. package/web/dist/assets/loader-circle-BV3DO9mE.js +1 -0
  228. package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
  229. package/web/dist/assets/markdown-D4-ADgH9.js +1 -0
  230. package/web/dist/assets/mermaid-GHXKKRXX-DM2VsGBG.js +1 -0
  231. package/web/dist/assets/open-mercato-toBr6SOa.svg +11 -0
  232. package/web/dist/assets/prompt-templates-C7ptKvDd.js +15 -0
  233. package/web/dist/assets/python-gzcpVVnB.js +1 -0
  234. package/web/dist/assets/react-dom-Ddtik4qM.js +1 -0
  235. package/web/dist/assets/refresh-cw-DCa-Rlwz.js +1 -0
  236. package/web/dist/assets/repo-git-DIhryGDx.js +1 -0
  237. package/web/dist/assets/run-diff-Dyow8B1q.js +3 -0
  238. package/web/dist/assets/run-header-jx9-18b8.js +1 -0
  239. package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
  240. package/web/dist/assets/search-x-CoCyl7zT.js +1 -0
  241. package/web/dist/assets/shellscript-CLZ0U2zV.js +1 -0
  242. package/web/dist/assets/skill-detail-DB7x_FQp.js +1 -0
  243. package/web/dist/assets/skills-98vCroU8.js +1 -0
  244. package/web/dist/assets/skills-BKIoqD6K.js +1 -0
  245. package/web/dist/assets/sql-BsFa4tDR.js +1 -0
  246. package/web/dist/assets/square-terminal-B6PZX4Qp.js +1 -0
  247. package/web/dist/assets/tab-link-C5--YMQd.js +1 -0
  248. package/web/dist/assets/task-changes-ejxPGVJw.js +1 -0
  249. package/web/dist/assets/task-commits-C6GO5qT-.js +1 -0
  250. package/web/dist/assets/task-files-CatpCBXa.js +2 -0
  251. package/web/dist/assets/task-thread-BMbXDM3d.js +5 -0
  252. package/web/dist/assets/tasks-table-dgezlCcg.js +1 -0
  253. package/web/dist/assets/trash-2-CDtxmmc8.js +1 -0
  254. package/web/dist/assets/triangle-alert-6su4Js5O.js +1 -0
  255. package/web/dist/assets/tsx-udAQXfEw.js +1 -0
  256. package/web/dist/assets/typescript-bsJCZSQ-.js +1 -0
  257. package/web/dist/assets/upload-Bp7hQxll.js +1 -0
  258. package/web/dist/assets/use-desktop-CvTwojOJ.js +3 -0
  259. package/web/dist/assets/utils-rQGbOrwc.js +1 -0
  260. package/web/dist/assets/workflows-Dy2c6790.js +11 -0
  261. package/web/dist/assets/x-Br_jIDBw.js +1 -0
  262. package/web/dist/assets/yaml-rwi0_p6S.js +1 -0
  263. package/web/dist/index.html +70 -0
  264. package/web/open-mercato.svg +11 -0
@@ -0,0 +1,195 @@
1
+ export interface ChangedFile {
2
+ path: string;
3
+ /** Rename/copy source — present only when `status` is renamed/copied. */
4
+ oldPath?: string;
5
+ status: 'added' | 'modified' | 'deleted' | 'renamed' | 'copied';
6
+ adds: number;
7
+ dels: number;
8
+ binary: boolean;
9
+ patch: string;
10
+ }
11
+ export interface ChangesPayload {
12
+ files: ChangedFile[];
13
+ stat: {
14
+ adds: number;
15
+ dels: number;
16
+ files: number;
17
+ };
18
+ }
19
+ export type ChangesResult = {
20
+ ok: true;
21
+ changes: ChangesPayload;
22
+ } | {
23
+ ok: false;
24
+ error: string;
25
+ };
26
+ interface NumstatEntry {
27
+ adds: number;
28
+ dels: number;
29
+ binary: boolean;
30
+ path: string;
31
+ oldPath?: string;
32
+ }
33
+ /** Parse `git diff --numstat -z -M`: `adds TAB dels TAB path NUL`, or for a
34
+ * rename/copy `adds TAB dels TAB NUL old NUL new NUL`. Binary files report
35
+ * `-` for both counters. Exported for tests. */
36
+ export declare function parseNumstatZ(out: string): NumstatEntry[];
37
+ interface NameStatusEntry {
38
+ status: string;
39
+ path: string;
40
+ oldPath?: string;
41
+ }
42
+ /** Parse `git diff --name-status -z -M`: `X NUL path NUL`, renames/copies
43
+ * `Rnnn NUL old NUL new NUL`. Exported for tests. */
44
+ export declare function parseNameStatusZ(out: string): NameStatusEntry[];
45
+ /** Split one `git diff --patch` blob into per-file sections, in git's file
46
+ * order (the same order `--numstat`/`--name-status` use). Exported for tests. */
47
+ export declare function splitPatch(patch: string): string[];
48
+ /** Map each `git diff --patch` section to the file path it describes, so a file's
49
+ * patch is looked up by path rather than by position. This is robust to the two
50
+ * listings (`--name-status` and `--patch`) disagreeing on file count — the case
51
+ * where positional matching used to blank *every* file's patch. Exported for tests. */
52
+ export declare function patchByPath(sections: string[]): Map<string, string>;
53
+ /**
54
+ * Structured "what changed here" for a directory vs its base branch:
55
+ * committed + uncommitted + untracked (via `add -N`), anchored at the
56
+ * merge-base so the diff stays *this task's* changes even after the base
57
+ * moves on — the exact resolution `worktreeDiff` (src/git-worktree.ts) uses
58
+ * for the text-blob `/diff` endpoint, which stays untouched.
59
+ */
60
+ export declare function collectChanges(dir: string, baseBranch: string, opts?: {
61
+ patchCap?: number;
62
+ intentToAdd?: boolean;
63
+ }): Promise<ChangesResult>;
64
+ /** The three raw `git diff` listings (name-status, numstat, patch) → the `{files, stat}`
65
+ * payload. Shared by the working-tree diff above and the commit diff below. Each file's
66
+ * patch is matched by path (`patchByPath`), so a mismatch between the name-status and
67
+ * patch file counts — a typechange, submodule, or any entry that emits no `diff --git`
68
+ * block — drops at most that one file's patch instead of blanking every file's. Positional
69
+ * matching remains the fallback for a section whose path can't be parsed, but only when the
70
+ * counts agree (the same condition the old all-or-nothing guard required). Exported for tests. */
71
+ export declare function assemblePayload(nameStatusOut: string, numstatOut: string, patchOut: string, patchCap: number): ChangesPayload;
72
+ export interface RunCommit {
73
+ sha: string;
74
+ subject: string;
75
+ author: string;
76
+ /** Relative time ("3 hours ago"), git's `%cr`. */
77
+ when: string;
78
+ }
79
+ export type RunCommitsResult = {
80
+ ok: true;
81
+ commits: RunCommit[];
82
+ } | {
83
+ ok: false;
84
+ error: string;
85
+ };
86
+ /**
87
+ * The commits a run made on its worktree branch: `<merge-base>..HEAD`, newest first — the same
88
+ * range `collectChanges` diffs, so the commit list and the aggregate Changes tab always agree on
89
+ * what "this task's work" means. Empty (not an error) when the branch has no commits past base.
90
+ */
91
+ export declare function collectRunCommits(dir: string, baseBranch: string): Promise<RunCommitsResult>;
92
+ /** `GET /api/repo/commit/:sha?structured=1` — one commit's metadata plus the same
93
+ * structured `{files, stat}` shape the working-tree routes serve (R5 Step 1.7). The
94
+ * legacy text-blob answer of that route is a protected surface and stays untouched. */
95
+ export interface CommitPayload {
96
+ sha: string;
97
+ subject: string;
98
+ author: string;
99
+ /** Relative time ("3 hours ago") — same `%cr` format the /api/repo log uses. */
100
+ when: string;
101
+ files: ChangedFile[];
102
+ stat: {
103
+ adds: number;
104
+ dels: number;
105
+ files: number;
106
+ };
107
+ }
108
+ export type CommitChangesResult = {
109
+ ok: true;
110
+ commit: CommitPayload;
111
+ } | {
112
+ ok: false;
113
+ error: string;
114
+ };
115
+ /**
116
+ * Structured diff of ONE commit vs its first parent (`--root` covers the initial commit).
117
+ * A merge commit honestly answers zero files — `git diff-tree` shows no diff for merges
118
+ * without `-m`/`-c`, and inventing one side's diff would misattribute the changes.
119
+ * Unknown/invalid shas degrade to `{ ok:false, error }` for the route's 409.
120
+ */
121
+ export declare function collectCommitChanges(dir: string, sha: string, patchCap?: number): Promise<CommitChangesResult>;
122
+ /** Max file content served to the Files tab — past this the GUI shows an
123
+ * honest "too large" state instead of the bytes. */
124
+ export declare const FILE_CONTENT_CAP = 512000;
125
+ export interface DirEntry {
126
+ name: string;
127
+ type: 'dir' | 'file';
128
+ size?: number;
129
+ }
130
+ export type FilesResult = {
131
+ kind: 'dir';
132
+ path: string;
133
+ entries: DirEntry[];
134
+ } | {
135
+ kind: 'file';
136
+ path: string;
137
+ size: number;
138
+ binary: boolean;
139
+ tooLarge: boolean;
140
+ content?: string;
141
+ } | {
142
+ kind: 'invalid';
143
+ error: string;
144
+ } | {
145
+ kind: 'missing';
146
+ error: string;
147
+ };
148
+ /** The image MIME type for a path, or null when it is not an image we serve raw. */
149
+ export declare function imageMimeType(path: string): string | null;
150
+ /**
151
+ * Directory listing or file content from inside `root`, traversal-safe:
152
+ * anything resolving outside the root (dot-segments, absolute paths, NUL) is
153
+ * rejected — same "not a file we serve" stance as `isSafeAssetFilename` in
154
+ * src/server/static-ui.ts. `.git` and symlinks are off-limits too.
155
+ */
156
+ export declare function readWorktreePath(root: string, relPath: string, contentCap?: number): Promise<FilesResult>;
157
+ export type BranchResult = {
158
+ ok: true;
159
+ branch: string;
160
+ created: boolean;
161
+ } | {
162
+ ok: false;
163
+ error: string;
164
+ };
165
+ /**
166
+ * Repo-view branch action (`POST /api/repo/branch`): switch to `name` when it
167
+ * already exists locally, otherwise create it from `from` (or HEAD) and switch.
168
+ * Name validation is delegated to `git check-ref-format --branch` — git's own
169
+ * rules, not a reimplementation. Predictable failures (invalid name, unknown
170
+ * `from`, dirty-tree checkout conflict) come back as `{ ok:false, error }`.
171
+ */
172
+ export declare function createOrSwitchBranch(dir: string, name: string, from?: string): Promise<BranchResult>;
173
+ export type CommitResult = {
174
+ ok: true;
175
+ sha: string;
176
+ } | {
177
+ ok: false;
178
+ error: string;
179
+ };
180
+ /** `git add -A && git commit -m <message>` in `dir`. A clean tree, a failing
181
+ * hook or missing identity all come back as `{ ok:false, error }`. */
182
+ export declare function commitAll(dir: string, message: string): Promise<CommitResult>;
183
+ export type PushResult = {
184
+ ok: true;
185
+ branch: string;
186
+ remote: string;
187
+ upstreamSet: boolean;
188
+ } | {
189
+ ok: false;
190
+ error: string;
191
+ };
192
+ /** Push the current branch, setting upstream when it has none. No remote,
193
+ * detached HEAD and rejected pushes all degrade to `{ ok:false, error }`. */
194
+ export declare function pushCurrentBranch(dir: string): Promise<PushResult>;
195
+ export {};