@brokkai/brokk-town 0.6.2 → 0.6.4
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.
- package/README.md +118 -23
- package/licenses/THIRD_PARTY_NOTICES.txt +21 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,6 +4,13 @@ Brokk Town is a local service that coordinates independent repository bots throu
|
|
|
4
4
|
private worker processes. Use the browser to watch and control work, or the CLI
|
|
5
5
|
for scripts. Everything runs on your machine.
|
|
6
6
|
|
|
7
|
+
The browser has two themes. The default is the town; Frontline draws every
|
|
8
|
+
repository as a base flying one of three armies — humans, humanoid aliens or a
|
|
9
|
+
swarm — and every committed delivery as a strike between its installations. The
|
|
10
|
+
theme is a look, not a lever: it reads the same snapshot, keeps the theme and
|
|
11
|
+
any race chosen for a base in that browser, and never changes what Town does or writes
|
|
12
|
+
to GitHub.
|
|
13
|
+
|
|
7
14
|
## Build and run
|
|
8
15
|
|
|
9
16
|
```sh
|
|
@@ -13,21 +20,24 @@ make build
|
|
|
13
20
|
./bin/bt web --demo
|
|
14
21
|
```
|
|
15
22
|
|
|
16
|
-
Bare `bt` runs in the foreground and prints its browser URL.
|
|
23
|
+
Bare `bt` runs in the foreground and prints its browser URL. The URL carries the
|
|
24
|
+
access key, so it is printed only to a terminal; redirected output and the
|
|
25
|
+
background service's log point to `bt web` instead. Ctrl+C, SIGTERM or
|
|
17
26
|
SIGHUP stops Town, its bots and their agent processes. Closing the browser does
|
|
18
27
|
not stop the service. Demo mode is isolated and never invokes bots, agents or GitHub.
|
|
19
28
|
|
|
20
29
|
```sh
|
|
21
|
-
bt -d #
|
|
22
|
-
bt
|
|
30
|
+
bt -d # start in the background instead
|
|
31
|
+
bt status # running or stopped, and which towns it serves
|
|
23
32
|
bt web # print the running service's browser URL
|
|
24
|
-
bt
|
|
33
|
+
bt shutdown # stop Town and its bots
|
|
25
34
|
```
|
|
26
35
|
|
|
27
|
-
Client commands require a running
|
|
36
|
+
Client commands require a running Town and never start one; `bt status` and
|
|
37
|
+
`bt harnesses` also work while it is stopped. There is no login registration,
|
|
28
38
|
automatic service replacement, terminal UI, version polling or in-app installer.
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
Use `--state-dir` for an independent installation and `--listen` for a loopback
|
|
40
|
+
address. Each command accepts only its own flags: `bt COMMAND --help` lists them.
|
|
31
41
|
|
|
32
42
|
## Independent bot projects
|
|
33
43
|
|
|
@@ -81,7 +91,7 @@ bt
|
|
|
81
91
|
# In another terminal:
|
|
82
92
|
bt add --repo OWNER/REPO
|
|
83
93
|
bt start --repo OWNER/REPO --role issue
|
|
84
|
-
bt
|
|
94
|
+
bt settings --max-workers 4
|
|
85
95
|
```
|
|
86
96
|
|
|
87
97
|
Each configured town starts all eight bot processes immediately, including paused
|
|
@@ -177,6 +187,51 @@ what it enforces. Where usage or cost is missing, Town Hall prints "not
|
|
|
177
187
|
reported"; it never shows absent telemetry as zero. Attempts whose elapsed time
|
|
178
188
|
never arrived are counted and reported separately rather than billed as free.
|
|
179
189
|
|
|
190
|
+
### Quiet hours
|
|
191
|
+
|
|
192
|
+
Quiet hours are weekly windows in which Town starts no new agent work and
|
|
193
|
+
makes none of its own GitHub writes: no filing, repairing, reviewing, merging
|
|
194
|
+
or releasing. Set a default for every town, give one town its own windows, or
|
|
195
|
+
opt one town out:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
# Service default: weeknights and weekends.
|
|
199
|
+
./bin/bt settings --quiet-hours "mon-fri 19:00-07:00; weekends 00:00-24:00"
|
|
200
|
+
./bin/bt settings --quiet-hours none # remove the service default
|
|
201
|
+
# One town's own windows, none at all, or back to the service default.
|
|
202
|
+
./bin/bt settings --repo BrokkAi/my-project --quiet-hours "daily 12:00-13:00"
|
|
203
|
+
./bin/bt settings --repo BrokkAi/my-project --quiet-hours none
|
|
204
|
+
./bin/bt settings --repo BrokkAi/my-project --quiet-hours default
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Each window is `DAYS HH:MM-HH:MM`, joined with `;`. Days are `mon` through
|
|
208
|
+
`sun`, ranges such as `mon-fri` or `fri-mon`, or `daily`, `weekdays` and
|
|
209
|
+
`weekends`, and name the day a window starts. An end at or before the start runs
|
|
210
|
+
past midnight into the next day, and `24:00` ends a window at midnight.
|
|
211
|
+
Overlapping windows count as one. A window with no day, an unknown day, a time
|
|
212
|
+
that is not `HH:MM`, or the same start and end is refused with the reason. The
|
|
213
|
+
browser edits the same schedules: the service default under Capacity, and a
|
|
214
|
+
town's own in Town settings. Config files take `"quiet_hours": [{"days":
|
|
215
|
+
["mon"], "start": "19:00", "end": "07:00"}]` at the top level for the default
|
|
216
|
+
and in a town entry for its own, where `[]` opts the town out.
|
|
217
|
+
|
|
218
|
+
Windows are read on the local clock of the machine running Town, by the clock
|
|
219
|
+
on the wall: a window holds through a daylight-saving change, an hour the clock
|
|
220
|
+
skips is never quiet, and an hour it repeats is quiet both times.
|
|
221
|
+
|
|
222
|
+
Inside a window, work already running finishes as it would after Pause, and
|
|
223
|
+
the repository inventory keeps running so uncertain writes are still
|
|
224
|
+
reconciled. Town leaves closing declined issues and retired pull requests and
|
|
225
|
+
filing review follow-ups for the first inventory after the window. Issues you
|
|
226
|
+
submit yourself are still posted. Houses stay awake: the browser shows them as
|
|
227
|
+
*quiet* rather than paused, the town header reads "Quiet hours · until …",
|
|
228
|
+
Town Hall explains the hold, and `bt status --json` carries the same `quiet_hours`
|
|
229
|
+
state for each town. When the window ends, scheduling resumes on its own with
|
|
230
|
+
each house's usual cadence; nothing missed is replayed. Pause and quiet hours
|
|
231
|
+
are independent and both survive a restart: a paused house stays paused after
|
|
232
|
+
the window, and a woken one resumes. Release Bot's own release quiet period
|
|
233
|
+
(`--release-quiet-seconds`) is unrelated and keeps working as before.
|
|
234
|
+
|
|
180
235
|
For each profile, select any agent from the
|
|
181
236
|
[official ACP registry](https://agentclientprotocol.com/get-started/registry),
|
|
182
237
|
plus **Anvil**, **Muse ACP**, **Draupnir**, or a custom ACP command. The full
|
|
@@ -254,7 +309,7 @@ the confirmation status and a link to the issue. Demo submissions stay local.
|
|
|
254
309
|
```sh
|
|
255
310
|
./bin/bt request --repo BrokkAi/my-project --kind feature --title 'Add keyboard navigation' --body-file request.md
|
|
256
311
|
# Use --kind bug for a bug report; --body-file - reads stdin.
|
|
257
|
-
./bin/bt
|
|
312
|
+
./bin/bt request --repo BrokkAi/my-project --check --request-id SAVED_ID
|
|
258
313
|
```
|
|
259
314
|
|
|
260
315
|
Requests have durable IDs, and the CLI prints the ID before sending. If the
|
|
@@ -273,8 +328,13 @@ To remove a town, choose **Settings → Delete town** and confirm, or run:
|
|
|
273
328
|
Deletion cancels its workers, cancels queued issue submissions, and removes it
|
|
274
329
|
from the browser and terminal. GitHub repositories, issues, and PRs are preserved.
|
|
275
330
|
Local history, uncertain writes, and private worktrees remain as recovery records.
|
|
276
|
-
Adding the same repository again restores that history and its previous
|
|
277
|
-
with automation paused and the reporter enabled.
|
|
331
|
+
Adding the same repository again restores that history and its previous
|
|
332
|
+
settings, with automation paused and the reporter enabled. A merge policy or
|
|
333
|
+
harness/agent choice given with the add replaces the previous one; budgets, work
|
|
334
|
+
policies, bot profiles, funnels and the branch are kept. A deleted town listed in
|
|
335
|
+
`bt --config` is restored with the file's settings, and Town prints a notice. A town
|
|
336
|
+
that already worked on one branch cannot be restored onto another. Deleting a
|
|
337
|
+
town that is already deleted reports `unknown town`. Wait for stopping workers to
|
|
278
338
|
finish before restoring a town.
|
|
279
339
|
|
|
280
340
|
## How work moves
|
|
@@ -303,7 +363,9 @@ default **suggest** mode, its bounded assessment is attached to the resulting
|
|
|
303
363
|
durable Mayoral decision: **Admit** sends the work to Issue Bot or Review Bot;
|
|
304
364
|
**Decline** keeps Town from acting on it. In **auto** mode, Simplifier Bot can
|
|
305
365
|
admit routine work and decline low-value complex work itself; a declined issue is
|
|
306
|
-
closed through Repo-bot, while a declined PR is ignored rather than
|
|
366
|
+
closed through Repo-bot, while a contributor's declined PR is ignored rather than
|
|
367
|
+
closed. Town's own declined implementation PR, by either the Mayor or Simplifier
|
|
368
|
+
Bot, is closed like one that failed its second review, and its issue starts over.
|
|
307
369
|
Simplifier Bot's own marked proposals do not recursively pass through intake.
|
|
308
370
|
|
|
309
371
|
**Mayor Bot** lives in Town Hall. Start it like any other house and it judges
|
|
@@ -343,7 +405,8 @@ limit its authority to publish while forbidding its release-preparation PR merge
|
|
|
343
405
|
Town pauses Release Bot and rejects attempts to start or retry it under this policy.
|
|
344
406
|
`all` also permits eligible external PRs. Town-managed merges require current clean Town evidence, GitHub mergeability, required checks
|
|
345
407
|
and approvals. Town uses an expected-head squash merge, without admin bypass.
|
|
346
|
-
Change this at any time under **Town Settings → External contributions
|
|
408
|
+
Change this at any time under **Town Settings → External contributions**, or
|
|
409
|
+
with `./bin/bt settings --repo BrokkAi/my-project --merge-policy manual`.
|
|
347
410
|
Repositories that require a merge queue or prohibit squash merging need manual
|
|
348
411
|
merges for now. GitHub is the final authority at write time.
|
|
349
412
|
|
|
@@ -353,19 +416,21 @@ Copy [docs/config.example.json](docs/config.example.json), edit the repository,
|
|
|
353
416
|
bot profiles, verification command, and policy, then run:
|
|
354
417
|
|
|
355
418
|
```sh
|
|
356
|
-
./bin/bt
|
|
419
|
+
./bin/bt --config /path/to/towns.json
|
|
357
420
|
```
|
|
358
421
|
|
|
359
|
-
Configuration is
|
|
422
|
+
Configuration is one JSON object: optional `max_workers` and `quiet_hours` for
|
|
423
|
+
the whole service, and a `towns` array. Each town supplies `repo`, optional `branch` and
|
|
360
424
|
`harness`, `agent`, optional `bot_agents`, optional `verify` argument vector,
|
|
361
425
|
`merge_policy`, `simplifier_mode`, optional `review_close_severity` (`P1`, `P2`
|
|
362
426
|
or `P3`, default `P2`), optional `budget`, optional `bot_policies`,
|
|
363
427
|
`poll_seconds`, `report_seconds`, and `max_cycles`. The example
|
|
364
|
-
lists all required values.
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
428
|
+
lists all required values. A config-file entry gets no defaults for
|
|
429
|
+
`merge_policy`, `poll_seconds`, `report_seconds`, or `max_cycles`: omitting any
|
|
430
|
+
of them rejects the file. The defaults quoted below apply to towns added with
|
|
431
|
+
`bt add` or the browser. When `--config` includes `max_workers`, that value
|
|
432
|
+
overrides the persisted service setting in the same atomic state update; a
|
|
433
|
+
config without it preserves the saved limit. Town
|
|
369
434
|
uses the repository's default branch when omitted, and keeps following it: the
|
|
370
435
|
observed default is recorded as repository state, so renaming it moves the town
|
|
371
436
|
with it and never overwrites a branch you chose. An initialized town's branch
|
|
@@ -390,7 +455,9 @@ Repo-bot and issue/review scheduling use `poll_seconds` (default 60). Quiet repo
|
|
|
390
455
|
use `report_seconds` (1800). Bug-bot, feature-bot, and simplifier-bot run at most every 30 minutes; mayor-bot
|
|
391
456
|
writes a bulletin at most every `bulletin_seconds` (21600) and only after something merged; release-bot
|
|
392
457
|
checks every five minutes and retains its own quiet window, minimum gap, and
|
|
393
|
-
batching decisions. Each worker attempt
|
|
458
|
+
batching decisions. Each worker attempt, including the repo inventory, has a
|
|
459
|
+
two-hour deadline, and each GitHub call Town makes itself, such as the merge
|
|
460
|
+
gate's read, gives up after one minute. A pull request
|
|
394
461
|
gets one fix round and two attempts per revision at any step; `max_cycles` is
|
|
395
462
|
accepted for compatibility but no longer extends that.
|
|
396
463
|
|
|
@@ -500,9 +567,37 @@ the reported failure and ask Town to lift the budget:
|
|
|
500
567
|
|
|
501
568
|
The next release run first calls the bot's `POST /v1/retry` worker API, which
|
|
502
569
|
resets the pending release's attempt budget in its own workspace, then resumes
|
|
503
|
-
the same release.
|
|
570
|
+
the same release. Unlike a task retry, a release retry also starts the release
|
|
571
|
+
house if it was paused. Town never edits the bot's private state. The pinned Release
|
|
504
572
|
Bot must advertise the `retry` capability; older pins report that plainly.
|
|
505
|
-
Use `bt status` to inspect saved details and GitHub to resolve conflicts.
|
|
573
|
+
Use `bt status --json` to inspect saved details and GitHub to resolve conflicts.
|
|
574
|
+
|
|
575
|
+
### Snoozing one task
|
|
576
|
+
|
|
577
|
+
To set one issue or pull request aside without pausing its house, snooze it
|
|
578
|
+
until a chosen time. Open the task in the browser and choose **Snooze…**, or:
|
|
579
|
+
|
|
580
|
+
```sh
|
|
581
|
+
./bin/bt defer --repo BrokkAi/my-project --task pr:123 --until 2d --reason "waiting on the vendor fix"
|
|
582
|
+
./bin/bt defer --repo BrokkAi/my-project --task issue:45 --until 2026-10-01T09:00:00Z
|
|
583
|
+
./bin/bt undefer --repo BrokkAi/my-project --task pr:123
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
`--until` takes an RFC 3339 time or a delay from now (`90m`, `4h`, `2d`); the
|
|
587
|
+
resume time must be in the future and within 366 days, and the reason is one
|
|
588
|
+
line of at most 200 characters. The house keeps working the rest of its queue.
|
|
589
|
+
Until the resume time, no agent starts for the snoozed task: Issue, Review and
|
|
590
|
+
Simplifier Bots skip it, Mayor Bot does not judge it, and Town does not merge
|
|
591
|
+
it. A run already under way when you snooze finishes. The Mayor can still decide
|
|
592
|
+
a snoozed arrival by hand.
|
|
593
|
+
|
|
594
|
+
The task shows as **Snoozed** with its reason and resume time in the browser
|
|
595
|
+
and in `bt status --json` (`deferred_until`, `defer_reason`). Snoozed is distinct from
|
|
596
|
+
blocked and failed, so a snoozed task does not appear in the inbox. At the
|
|
597
|
+
resume time Town clears the snooze, wakes the house and records the event; the
|
|
598
|
+
snooze is saved state, so it survives a restart and repository reconciliation.
|
|
599
|
+
Resume now (`bt undefer`) makes the task eligible immediately. Finished work
|
|
600
|
+
(merged, closed, declined, or an implemented issue) cannot be snoozed.
|
|
506
601
|
|
|
507
602
|
The HTTP listener accepts loopback IPs only (default `127.0.0.1:8099`). Host,
|
|
508
603
|
origin, and bearer key checks protect the local API. A browser supporting WebMCP
|
|
@@ -8,9 +8,9 @@ Node.js and Python interpreters are installed separately and are not bundled.
|
|
|
8
8
|
|
|
9
9
|
==============================================================================
|
|
10
10
|
|
|
11
|
-
github.com/BrokkAi/acp-go v0.1
|
|
11
|
+
github.com/BrokkAi/acp-go v0.8.1
|
|
12
12
|
License: Apache-2.0
|
|
13
|
-
Source: https://github.com/BrokkAi/acp-go/tree/v0.1
|
|
13
|
+
Source: https://github.com/BrokkAi/acp-go/tree/v0.8.1
|
|
14
14
|
|
|
15
15
|
==============================================================================
|
|
16
16
|
|
|
@@ -221,6 +221,25 @@ Source: https://github.com/BrokkAi/acp-go/tree/v0.1.0
|
|
|
221
221
|
|
|
222
222
|
==============================================================================
|
|
223
223
|
|
|
224
|
+
--- github.com/BrokkAi/acp-go/NOTICE ---
|
|
225
|
+
|
|
226
|
+
acp-go
|
|
227
|
+
Copyright 2026 Brokk.ai and contributors
|
|
228
|
+
|
|
229
|
+
This project is licensed under the Apache License, Version 2.0.
|
|
230
|
+
See LICENSE for the full terms. Third-party terms and attribution are
|
|
231
|
+
provided in licenses/THIRD_PARTY_NOTICES.txt.
|
|
232
|
+
|
|
233
|
+
Originally developed as part of BrokkAi/release-bot.
|
|
234
|
+
|
|
235
|
+
The pinned Agent Client Protocol JSON Schema artifacts in schema/
|
|
236
|
+
(schema.json, meta.json, VERSION) are distributed by the ACP project
|
|
237
|
+
(https://github.com/agentclientprotocol/agent-client-protocol) under the
|
|
238
|
+
Apache License 2.0. The generated code in schema/*_gen.go derives from
|
|
239
|
+
those artifacts.
|
|
240
|
+
|
|
241
|
+
==============================================================================
|
|
242
|
+
|
|
224
243
|
Go runtime and standard library (BSD-3-Clause)
|
|
225
244
|
Source: https://go.googlesource.com/go/+/refs/tags/go1.27.1/LICENSE
|
|
226
245
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.
|
|
2
|
+
"version": "0.6.4",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"arm64"
|
|
26
26
|
],
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@brokkai/brokk-town-linux-x64": "0.6.
|
|
29
|
-
"@brokkai/brokk-town-linux-arm64": "0.6.
|
|
30
|
-
"@brokkai/brokk-town-darwin-x64": "0.6.
|
|
31
|
-
"@brokkai/brokk-town-darwin-arm64": "0.6.
|
|
28
|
+
"@brokkai/brokk-town-linux-x64": "0.6.4",
|
|
29
|
+
"@brokkai/brokk-town-linux-arm64": "0.6.4",
|
|
30
|
+
"@brokkai/brokk-town-darwin-x64": "0.6.4",
|
|
31
|
+
"@brokkai/brokk-town-darwin-arm64": "0.6.4"
|
|
32
32
|
}
|
|
33
33
|
}
|