@brokkai/brokk-town-linux-x64 0.1.2 → 0.3.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.
package/BUILD.json CHANGED
@@ -1 +1 @@
1
- {"commit": "8222b017b527bd9879b1261370f64c12e297f8b4", "tag": "v0.1.2", "target": "linux-amd64"}
1
+ {"commit": "6f8a3c0c9273db0df7046f6db2246ac60f9f25fb", "tag": "v0.3.0", "target": "linux-amd64"}
package/README.md CHANGED
@@ -25,13 +25,15 @@ Build with the Go version in `go.mod`:
25
25
 
26
26
  ```sh
27
27
  make build
28
- ./bin/bt serve --demo
28
+ ./bin/bt tui --demo
29
29
  ```
30
30
 
31
- Open the browser address printed by the service. In another terminal:
31
+ Any `bt` command starts the town service in the background when it is not
32
+ running. Press `q` to leave the terminal panel; the town keeps going. Print the
33
+ browser address with:
32
34
 
33
35
  ```sh
34
- ./bin/bt tui --demo
36
+ ./bin/bt web --demo
35
37
  ```
36
38
 
37
39
  Demo mode uses an isolated state directory and simulated activity in two towns.
@@ -42,9 +44,42 @@ fixtures, with active worker profiles available to inspect. Paper-trail illustra
42
44
  a neighboring repository with a failed watchtower. Pause a house to hold its next step.
43
45
 
44
46
  The browser and TUI attach to the same service. Closing either leaves workers
45
- running. Stop the foreground service with Ctrl+C; it cancels and waits for workers
46
- before releasing the state lock. `bt` without a command opens the TUI of an
47
- already-running service. Use `bt web` to print its browser address again.
47
+ running. `bt` without a command opens the TUI. Use `bt web` to print the browser
48
+ address again; the local access key is persistent, so bookmarks and open tabs
49
+ survive restarts.
50
+
51
+ ### The service keeps itself running
52
+
53
+ There is nothing to install or remember. The first `bt` command that starts a
54
+ real town also registers the service with your login session: a launchd agent
55
+ on macOS (`~/Library/LaunchAgents/ai.brokk.town.plist`) or a systemd user unit
56
+ on Linux (`~/.config/systemd/user/brokk-town.service`). From then on the town
57
+ restarts after a crash and returns after a reboot without any command, and the
58
+ browser page reloads itself when a new version comes up. The demo town is never
59
+ registered; it starts on demand and stays until stopped.
60
+
61
+ - `bt service status` shows the service, its registration, and log locations
62
+ (`logs/serve.log` and `logs/serve.err.log` under the state directory).
63
+ - `bt service stop` stops it until the next `bt` command. `bt service restart`
64
+ restarts it in place.
65
+ - `bt service off` keeps the service out of your login session; `bt` still
66
+ starts it on demand, but it will not return by itself after logout or reboot.
67
+ `bt service on` registers it again.
68
+ - `bt serve` still runs the service in the foreground for development. It
69
+ refuses to start while another service holds the state directory and names
70
+ that process.
71
+
72
+ The registration captures the `PATH` of the shell that created it, so `gh`,
73
+ `git`, `npx`, and your chosen agent are found without a login shell. A
74
+ `--listen` address given to any command is remembered for that town, so a later
75
+ command's default never moves a registered service to another port. On Linux,
76
+ `bt` enables lingering for your user so the town survives logout; if that needs
77
+ administrator approval, it says so. Over SSH on a Mac without a logged-in
78
+ session there is no launchd user domain, so the service runs unregistered.
79
+
80
+ When you rebuild or upgrade `bt`, the next `bt` command notices that the running
81
+ service is older and restarts it on the new binary. An older `bt` never
82
+ downgrades a running service.
48
83
 
49
84
  The browser header switches among **Town**, **Board**, and **Compact** without
50
85
  restarting. Town keeps the animated houses first-class; Board groups durable work
@@ -80,8 +115,11 @@ npm install -g @brokkai/brokk-town
80
115
  While the service is running, Town checks npm outside its input and render loops.
81
116
  When a newer stable release is available, the browser offers an **Upgrade Town**
82
117
  button and the TUI offers `u`. After confirmation, the service installs that exact
83
- version and asks for a restart. A failed or offline check never interrupts local
84
- operation.
118
+ version through the channel it was installed from (npm for the npm package,
119
+ otherwise the checksum-verified release archive over the current binary) and
120
+ restarts itself in place; the browser page reloads when the new version is up.
121
+ Bots that were mid-run keep working through the restart and are reconnected.
122
+ A failed or offline check never interrupts local operation.
85
123
 
86
124
  You can also build from source as above or install the current branch:
87
125
 
@@ -117,10 +155,22 @@ npm's stable tag, and **Use VERSION** stages that exact version for the Mayor to
117
155
  save. The pin changes only for that town and takes effect on the bot's next run;
118
156
  capability and reported-version checks still run before any repository work.
119
157
 
158
+ Town also checks npm's stable tags on its own, at start and every six hours.
159
+ When a bot has a newer stable release than a town's pin, the town receives a
160
+ Mayoral decision at Town Hall: **Upgrade now** pins the new version for the
161
+ bot's next run, **Delay a day** asks again after 24 hours, and **Decline** keeps
162
+ the current pin until an even newer release is published. The **Update bots
163
+ automatically** town setting (off by default) pins new stable releases as they
164
+ appear instead, including any offer already waiting. A registry outage never
165
+ changes a pin or stops a town.
166
+
120
167
  The worker uses
121
168
  standard-library HTTP/JSON, negotiates protocol and capabilities before work,
122
169
  streams contiguous progress events, and returns explicit typed results. It never
123
- requires Town to parse bot-private state. See
170
+ requires Town to parse bot-private state. Until the worker protocol carries job
171
+ outcomes, Town uses the same pinned issue-bot release's validated public state
172
+ API to import blocked/submitted scheduling metadata and perform explicit retries.
173
+ See
124
174
  [docs/WORKER_PROTOCOL.md](docs/WORKER_PROTOCOL.md) for the contract.
125
175
 
126
176
  Town defaults to the official ACP registry’s `codex-acp` npm distribution, which
@@ -140,9 +190,14 @@ GitHub reconciliation.
140
190
  ./bin/bt tui
141
191
  ```
142
192
 
143
- New towns start with the five automation workers **paused**. Repo-bot starts its
144
- read-only inventory. Inspect the town, then start individual workers or choose
145
- **Wake the town**. Starting workers authorizes their real work: filing issues,
193
+ Town starts and manages the bot libraries internally; the standalone bot CLIs are
194
+ not companion processes. New towns start with Bug Bot, Feature Bot, Issue Bot,
195
+ Review Bot, and Release Bot **paused**. Repo Bot starts its read-only inventory.
196
+ The town header shows whether the town is paused, awake,
197
+ or partly awake, and its button offers the action that changes that state.
198
+ Inspect the town, then start individual workers or choose **Wake the town**, which
199
+ enables all five automation workers (except Release Bot under manual merge policy).
200
+ Starting workers authorizes their real work: filing issues,
146
201
  creating and repairing PRs, posting reviews, merging under the configured policy,
147
202
  and publishing releases. Agents and verification commands run with your local
148
203
  permissions. Use an isolated account or machine for repositories you don't trust.
@@ -161,6 +216,15 @@ Pause finishes active work and stops scheduling more. Stop also cancels active
161
216
  work. Enabled/paused settings survive restarts. A restart resumes enabled workers;
162
217
  uncertain external writes retain their saved intent and are reconciled first.
163
218
 
219
+ Stopping or restarting the service (Ctrl+C, SIGTERM, `bt service restart`, or
220
+ an in-app upgrade) does not stop the external bots. Each bot process runs detached, and Town commits its handle (PID,
221
+ socket, and exact task) before requesting work. The next `bt serve` reconnects to
222
+ those processes before scheduling anything new. Bots that advertise the `detach`
223
+ capability replay the events Town missed and their results are applied normally.
224
+ Older bots finish on their own, and Town records that attempt as uncertain rather
225
+ than guessing; repo-bot then reconciles whatever landed on GitHub. Only an explicit
226
+ Stop, a town deletion, or the two-hour dispatch deadline ends a bot process.
227
+
164
228
  Capacity is a persisted service setting shared by every town. It reserves only
165
229
  non-reporter bot runs; repo-bot, issue publishing, and prompt-free model choice
166
230
  discovery stay outside the pool. Lowering the limit lets current work finish and
@@ -298,8 +362,11 @@ New external issues and PRs first wait at Town Hall for a durable Mayoral
298
362
  decision. **Admit** sends the work to Issue Bot or Review Bot; **Decline** keeps
299
363
  Town from acting on it without changing GitHub. Feature Bot proposals follow the
300
364
  same route by default and can be exempted in **Town Settings → External
301
- contributions**. The browser provides the primary decision UX; scripts may use
302
- `bt admit --repo OWNER/REPO --task issue:123` or `bt decline ...`.
365
+ contributions**. A proposal is the town's own work, so declining one also closes
366
+ its issue as not planned; outside issues and PRs are only ignored. The browser provides the primary decision UX; scripts may use
367
+ `bt admit --repo OWNER/REPO --task issue:123` or `bt decline ...`. Offered bot
368
+ upgrades use the same commands with `--task upgrade:feature` (or another bot
369
+ role), plus `bt delay ...` to be asked again in a day.
303
370
 
304
371
  A review is bound to the exact base, head, PR description, and discussion snapshot. A suppressed
305
372
  duplicate comment is still a finding to check. Complete coverage, explicit
@@ -308,7 +375,10 @@ result. New commits invalidate review readiness. Uncertain reviews and exhausted
308
375
  repair cycles become visible tasks needing attention.
309
376
 
310
377
  The default merge policy is `bot`: auto-merge eligible Town-created PRs. `manual`
311
- leaves merging to the operator; `all` also permits eligible external PRs. Town-managed merges require current clean Town evidence, GitHub mergeability, required checks
378
+ leaves every merge to the operator; because the current Release Bot protocol cannot
379
+ limit its authority to publish while forbidding its release-preparation PR merges,
380
+ Town pauses Release Bot and rejects attempts to start or retry it under this policy.
381
+ `all` also permits eligible external PRs. Town-managed merges require current clean Town evidence, GitHub mergeability, required checks
312
382
  and approvals. Town uses an expected-head squash merge, without admin bypass.
313
383
  Change this at any time under **Town Settings → External contributions**.
314
384
  Repositories that require a merge queue or prohibit squash merging need manual
@@ -361,11 +431,22 @@ uncertain proposals before filing. Its verifier receives `FEATURE_COMMIT` and
361
431
  `FEATURE_FINDING`; shared verification commands must support the selected bot's
362
432
  environment. New and upgraded towns keep feature discovery paused until started.
363
433
 
434
+ Town Hall's **Automation outcomes** report separates worker attempts, filed
435
+ findings, submitted implementation PRs, repository-confirmed merges, repair
436
+ rounds, blocked or abandoned work, and verified releases for a selectable
437
+ period. A submitted PR is an artifact rather than an accepted fix. Operators
438
+ can mark each filed finding useful or a false positive only by adding an
439
+ explanation. Records retain task and revision provenance and show elapsed time,
440
+ token usage, and cost as unknown when the worker does not provide them. The CSV
441
+ export includes the repository on every row for comparisons across runs and
442
+ towns.
443
+
364
444
  Private state defaults to `$XDG_STATE_HOME/brokk-town` or
365
445
  `~/.local/state/brokk-town`. `--state-dir` selects another directory; `--demo`
366
446
  appends `demo`. A single writer lock, atomic snapshots, per-role bot state, and
367
- private worktrees keep towns separate. Events, logs, and reports have bounded
368
- recent histories; task/intent history persists. Browser access uses a per-service
447
+ private worktrees keep towns separate. Events, logs, and repo-bot reports have
448
+ bounded recent histories; task, intent, and automation outcome history persists.
449
+ Browser access uses a per-service
369
450
  local key in a URL fragment. `connection.json` and state snapshots are mode 0600.
370
451
  Private agent commands, environment, and authentication configuration are omitted
371
452
  from public configuration snapshots for both town defaults and bot profiles;
@@ -422,6 +503,18 @@ Retry explicitly permits another attempt after fresh checks. For an uncertain
422
503
  repair push, it reuses and verifies the saved commit; it does not rerun the agent.
423
504
  If the PR moved, the saved worktree is retained for inspection. A retry also resets
424
505
  an exhausted repair budget. Never delete an uncertain intent to force progress.
506
+
507
+ When the release house reports that Release Bot's retry budget is exhausted, fix
508
+ the reported failure and ask Town to lift the budget:
509
+
510
+ ```sh
511
+ ./bin/bt retry --repo BrokkAi/my-project --role release
512
+ ```
513
+
514
+ The next release run first calls the bot's `POST /v1/retry` worker API, which
515
+ resets the pending release's attempt budget in its own workspace, then resumes
516
+ the same release. Town never edits the bot's private state. The pinned Release
517
+ Bot must advertise the `retry` capability; older pins report that plainly.
425
518
  Use `bt status` to inspect saved details and GitHub to resolve conflicts.
426
519
 
427
520
  The HTTP listener accepts loopback IPs only (default `127.0.0.1:8099`). Host,
package/bin/bt CHANGED
Binary file
@@ -221,6 +221,230 @@ Source: https://github.com/BrokkAi/acp-go/tree/v0.1.0
221
221
 
222
222
  ==============================================================================
223
223
 
224
+ github.com/BrokkAi/issue-bot v0.5.2
225
+ License: Apache-2.0
226
+ Source: https://github.com/BrokkAi/issue-bot/tree/v0.5.2
227
+
228
+ ==============================================================================
229
+
230
+ --- github.com/BrokkAi/issue-bot/LICENSE ---
231
+
232
+
233
+ Apache License
234
+ Version 2.0, January 2004
235
+ http://www.apache.org/licenses/
236
+
237
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
238
+
239
+ 1. Definitions.
240
+
241
+ "License" shall mean the terms and conditions for use, reproduction,
242
+ and distribution as defined by Sections 1 through 9 of this document.
243
+
244
+ "Licensor" shall mean the copyright owner or entity authorized by
245
+ the copyright owner that is granting the License.
246
+
247
+ "Legal Entity" shall mean the union of the acting entity and all
248
+ other entities that control, are controlled by, or are under common
249
+ control with that entity. For the purposes of this definition,
250
+ "control" means (i) the power, direct or indirect, to cause the
251
+ direction or management of such entity, whether by contract or
252
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
253
+ outstanding shares, or (iii) beneficial ownership of such entity.
254
+
255
+ "You" (or "Your") shall mean an individual or Legal Entity
256
+ exercising permissions granted by this License.
257
+
258
+ "Source" form shall mean the preferred form for making modifications,
259
+ including but not limited to software source code, documentation
260
+ source, and configuration files.
261
+
262
+ "Object" form shall mean any form resulting from mechanical
263
+ transformation or translation of a Source form, including but
264
+ not limited to compiled object code, generated documentation,
265
+ and conversions to other media types.
266
+
267
+ "Work" shall mean the work of authorship, whether in Source or
268
+ Object form, made available under the License, as indicated by a
269
+ copyright notice that is included in or attached to the work
270
+ (an example is provided in the Appendix below).
271
+
272
+ "Derivative Works" shall mean any work, whether in Source or Object
273
+ form, that is based on (or derived from) the Work and for which the
274
+ editorial revisions, annotations, elaborations, or other modifications
275
+ represent, as a whole, an original work of authorship. For the purposes
276
+ of this License, Derivative Works shall not include works that remain
277
+ separable from, or merely link (or bind by name) to the interfaces of,
278
+ the Work and Derivative Works thereof.
279
+
280
+ "Contribution" shall mean any work of authorship, including
281
+ the original version of the Work and any modifications or additions
282
+ to that Work or Derivative Works thereof, that is intentionally
283
+ submitted to Licensor for inclusion in the Work by the copyright owner
284
+ or by an individual or Legal Entity authorized to submit on behalf of
285
+ the copyright owner. For the purposes of this definition, "submitted"
286
+ means any form of electronic, verbal, or written communication sent
287
+ to the Licensor or its representatives, including but not limited to
288
+ communication on electronic mailing lists, source code control systems,
289
+ and issue tracking systems that are managed by, or on behalf of, the
290
+ Licensor for the purpose of discussing and improving the Work, but
291
+ excluding communication that is conspicuously marked or otherwise
292
+ designated in writing by the copyright owner as "Not a Contribution."
293
+
294
+ "Contributor" shall mean Licensor and any individual or Legal Entity
295
+ on behalf of whom a Contribution has been received by Licensor and
296
+ subsequently incorporated within the Work.
297
+
298
+ 2. Grant of Copyright License. Subject to the terms and conditions of
299
+ this License, each Contributor hereby grants to You a perpetual,
300
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
301
+ copyright license to reproduce, prepare Derivative Works of,
302
+ publicly display, publicly perform, sublicense, and distribute the
303
+ Work and such Derivative Works in Source or Object form.
304
+
305
+ 3. Grant of Patent License. Subject to the terms and conditions of
306
+ this License, each Contributor hereby grants to You a perpetual,
307
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
308
+ (except as stated in this section) patent license to make, have made,
309
+ use, offer to sell, sell, import, and otherwise transfer the Work,
310
+ where such license applies only to those patent claims licensable
311
+ by such Contributor that are necessarily infringed by their
312
+ Contribution(s) alone or by combination of their Contribution(s)
313
+ with the Work to which such Contribution(s) was submitted. If You
314
+ institute patent litigation against any entity (including a
315
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
316
+ or a Contribution incorporated within the Work constitutes direct
317
+ or contributory patent infringement, then any patent licenses
318
+ granted to You under this License for that Work shall terminate
319
+ as of the date such litigation is filed.
320
+
321
+ 4. Redistribution. You may reproduce and distribute copies of the
322
+ Work or Derivative Works thereof in any medium, with or without
323
+ modifications, and in Source or Object form, provided that You
324
+ meet the following conditions:
325
+
326
+ (a) You must give any other recipients of the Work or
327
+ Derivative Works a copy of this License; and
328
+
329
+ (b) You must cause any modified files to carry prominent notices
330
+ stating that You changed the files; and
331
+
332
+ (c) You must retain, in the Source form of any Derivative Works
333
+ that You distribute, all copyright, patent, trademark, and
334
+ attribution notices from the Source form of the Work,
335
+ excluding those notices that do not pertain to any part of
336
+ the Derivative Works; and
337
+
338
+ (d) If the Work includes a "NOTICE" text file as part of its
339
+ distribution, then any Derivative Works that You distribute must
340
+ include a readable copy of the attribution notices contained
341
+ within such NOTICE file, excluding those notices that do not
342
+ pertain to any part of the Derivative Works, in at least one
343
+ of the following places: within a NOTICE text file distributed
344
+ as part of the Derivative Works; within the Source form or
345
+ documentation, if provided along with the Derivative Works; or,
346
+ within a display generated by the Derivative Works, if and
347
+ wherever such third-party notices normally appear. The contents
348
+ of the NOTICE file are for informational purposes only and
349
+ do not modify the License. You may add Your own attribution
350
+ notices within Derivative Works that You distribute, alongside
351
+ or as an addendum to the NOTICE text from the Work, provided
352
+ that such additional attribution notices cannot be construed
353
+ as modifying the License.
354
+
355
+ You may add Your own copyright statement to Your modifications and
356
+ may provide additional or different license terms and conditions
357
+ for use, reproduction, or distribution of Your modifications, or
358
+ for any such Derivative Works as a whole, provided Your use,
359
+ reproduction, and distribution of the Work otherwise complies with
360
+ the conditions stated in this License.
361
+
362
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
363
+ any Contribution intentionally submitted for inclusion in the Work
364
+ by You to the Licensor shall be under the terms and conditions of
365
+ this License, without any additional terms or conditions.
366
+ Notwithstanding the above, nothing herein shall supersede or modify
367
+ the terms of any separate license agreement you may have executed
368
+ with Licensor regarding such Contributions.
369
+
370
+ 6. Trademarks. This License does not grant permission to use the trade
371
+ names, trademarks, service marks, or product names of the Licensor,
372
+ except as required for reasonable and customary use in describing the
373
+ origin of the Work and reproducing the content of the NOTICE file.
374
+
375
+ 7. Disclaimer of Warranty. Unless required by applicable law or
376
+ agreed to in writing, Licensor provides the Work (and each
377
+ Contributor provides its Contributions) on an "AS IS" BASIS,
378
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
379
+ implied, including, without limitation, any warranties or conditions
380
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
381
+ PARTICULAR PURPOSE. You are solely responsible for determining the
382
+ appropriateness of using or redistributing the Work and assume any
383
+ risks associated with Your exercise of permissions under this License.
384
+
385
+ 8. Limitation of Liability. In no event and under no legal theory,
386
+ whether in tort (including negligence), contract, or otherwise,
387
+ unless required by applicable law (such as deliberate and grossly
388
+ negligent acts) or agreed to in writing, shall any Contributor be
389
+ liable to You for damages, including any direct, indirect, special,
390
+ incidental, or consequential damages of any character arising as a
391
+ result of this License or out of the use or inability to use the
392
+ Work (including but not limited to damages for loss of goodwill,
393
+ work stoppage, computer failure or malfunction, or any and all
394
+ other commercial damages or losses), even if such Contributor
395
+ has been advised of the possibility of such damages.
396
+
397
+ 9. Accepting Warranty or Additional Liability. While redistributing
398
+ the Work or Derivative Works thereof, You may choose to offer,
399
+ and charge a fee for, acceptance of support, warranty, indemnity,
400
+ or other liability obligations and/or rights consistent with this
401
+ License. However, in accepting such obligations, You may act only
402
+ on Your own behalf and on Your sole responsibility, not on behalf
403
+ of any other Contributor, and only if You agree to indemnify,
404
+ defend, and hold each Contributor harmless for any liability
405
+ incurred by, or claims asserted against, such Contributor by reason
406
+ of your accepting any such warranty or additional liability.
407
+
408
+ END OF TERMS AND CONDITIONS
409
+
410
+ APPENDIX: How to apply the Apache License to your work.
411
+
412
+ To apply the Apache License to your work, attach the following
413
+ boilerplate notice, with the fields enclosed by brackets "[]"
414
+ replaced with your own identifying information. (Don't include
415
+ the brackets!) The text should be enclosed in the appropriate
416
+ comment syntax for the file format. We also recommend that a
417
+ file or class name and description of purpose be included on the
418
+ same "printed page" as the copyright notice for easier
419
+ identification within third-party archives.
420
+
421
+ Copyright [yyyy] [name of copyright owner]
422
+
423
+ Licensed under the Apache License, Version 2.0 (the "License");
424
+ you may not use this file except in compliance with the License.
425
+ You may obtain a copy of the License at
426
+
427
+ http://www.apache.org/licenses/LICENSE-2.0
428
+
429
+ Unless required by applicable law or agreed to in writing, software
430
+ distributed under the License is distributed on an "AS IS" BASIS,
431
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
432
+ See the License for the specific language governing permissions and
433
+ limitations under the License.
434
+
435
+ ==============================================================================
436
+
437
+ --- github.com/BrokkAi/issue-bot/NOTICE ---
438
+
439
+ Brokk Issue Bot
440
+ Copyright 2026 Brokk.ai and contributors
441
+
442
+ This project is licensed under the Apache License, Version 2.0.
443
+ See LICENSE for the full terms. Third-party terms and attribution are
444
+ provided in licenses/THIRD_PARTY_NOTICES.txt.
445
+
446
+ ==============================================================================
447
+
224
448
  github.com/rivo/uniseg v0.4.7
225
449
  License: MIT AND Unicode-3.0
226
450
  Source: https://github.com/rivo/uniseg/tree/v0.4.7
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.2",
2
+ "version": "0.3.0",
3
3
  "license": "Apache-2.0",
4
4
  "repository": {
5
5
  "type": "git",