bitfolk 0.1.6 → 0.1.8

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 (3) hide show
  1. package/README.md +54 -1
  2. package/dist/cli.js +72 -69
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -46,8 +46,10 @@ release rather than reuse one it cached. Installed, it also answers to the short
46
46
  | `bitfolk agents` | The workspace's agents: tool, builder or not, health, what each is doing |
47
47
  | `bitfolk approvals` | What agents wait on you for; `bitfolk approve <id>` and `bitfolk deny <id>` answer one |
48
48
  | `bitfolk tools` | The coding tools found here, on or off |
49
+ | `bitfolk repos` | The git repos builders may work in; `repos add <path> [--name <n>]`, `repos rm <name>`, `repos default <name>` |
50
+ | `bitfolk set --primary <tool>` | The tool sessions use while it has usage left (`none` clears it) |
49
51
  | `bitfolk add <tool>` / `rm <tool>` | Turn a tool on or off, or add your own with `--command` or `--acp` |
50
- | `bitfolk set --repo <path>` | Give sessions a git repo; `--max-usd`, `--max-runs`, `--timeout`, `--permission` change limits |
52
+ | `bitfolk set --repo <path>` | Give sessions a git repo; `--pull-requests on` opens pull requests that merge once you approve; `--max-usd`, `--max-runs`, `--timeout`, `--permission` change limits |
51
53
  | `bitfolk share <port>` | Share an app running here at a link |
52
54
  | `bitfolk check` | Check sign-in, tools and repo (also `bitfolk doctor`) |
53
55
  | `bitfolk bug "<what>"` | Report a bug |
@@ -212,6 +214,57 @@ On a Mac, `bitfolk up` keeps the computer awake while it runs (`caffeinate -i`,
212
214
  the runner does). The screen can still sleep. Closing the lid on battery still sleeps the Mac and pauses sessions.
213
215
  `bitfolk up --let-sleep` turns this off.
214
216
 
217
+ ## Repos and the primary tool
218
+
219
+ A computer can offer builders several git repos, each with a short name. Your workspace, its agents and the Run picker
220
+ see the names and GitHub repos, never the paths:
221
+
222
+ ```
223
+ bitfolk repos add ~/code/web # named web; the first repo is the default
224
+ bitfolk repos add ~/code/api
225
+ bitfolk repos add ~/code/site --name marketing
226
+ bitfolk repos default api
227
+ bitfolk run --in web "fix the signup form"
228
+ ```
229
+
230
+ A session works in the default repo unless it names another: `bitfolk run --in <name>`, the Run picker, an agent's
231
+ `use_computer` request (`params.repo`), or a message asking for builders that names the repo. Only git repos: every
232
+ session gets its own worktree and branch, so your checkouts stay as they are.
233
+
234
+ Sessions go to the coding tool with usage left. `bitfolk set --primary codex` makes Codex the one to use while it has
235
+ room; when it is out of usage or over 80% of its window, sessions go to the tool with the most left. The runner tells
236
+ your workspace each tool's usage when `bitfolk up` starts, every 10 minutes and after each session:
237
+
238
+ - Codex: the percent of each window used and when it resets, from its own session logs (`~/.codex/sessions`).
239
+ - Claude Code: what its last run said: a warning near the limit, or "limit reached" with the reset time. It reports
240
+ nothing while it has room, so it counts as having room until then.
241
+
242
+ A tool named on purpose always wins: `bitfolk run --runtime claude-code`, a tool picked on the Run picker, an agent's
243
+ `params.tool`, or a message asking for builders that names the tool ("builders, use Codex on api"). Builders and agents
244
+ see each tool's usage left and the repos (`GET /v1/computers`, and a "This computer" section in a builder's packet), so
245
+ they can pass on what someone in the chat asked for.
246
+
247
+ ## Pull requests
248
+
249
+ With a GitHub repo, builders' work can go up for review and merge into your main branch once you approve it:
250
+
251
+ ```
252
+ bitfolk set --repo ~/code/app --pull-requests on
253
+ ```
254
+
255
+ 1. Connect GitHub in Bitfolk under Tools → Connected apps.
256
+ 2. When a session succeeds with commits, the runner pushes its `bitfolk/builder-<id>` branch to the repo's GitHub
257
+ `origin`, with your own git credentials (no prompts, no hooks). Only a GitHub origin is pushed to.
258
+ 3. Bitfolk opens a pull request into the branch from `--base` (or origin's default branch, else `main`) through your
259
+ GitHub connection, and asks you to approve "Merge pull request #N into main" on your phone, the web, Slack or with
260
+ `bitfolk approve <id>`.
261
+ 4. Once a person approves it, Bitfolk merges the pull request within a minute, at the exact commit you were shown. A
262
+ rule, an approval habit, the Coordinator or an agent's say-so never merges one. If a fix pushes new commits, the
263
+ earlier approval is retired and you're asked again.
264
+
265
+ `bitfolk logs <id>` shows the pull request and whether it merged. `--pull-requests off` keeps branches on this
266
+ computer again.
267
+
215
268
  ## Long-lived agents
216
269
 
217
270
  `bitfolk add bfa_...` still adds a permanent agent with a token copied from its page on your workspace, and `bitfolk up`