lobstah 0.1.0 → 0.1.2
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 +58 -39
- package/dist/main.js +901 -176
- package/dist/runner.js +2 -1
- package/docs/configuration.md +122 -0
- package/docs/design.md +669 -0
- package/docs/lobsterman.md +201 -0
- package/docs/openclaw.md +76 -0
- package/docs/pickup.md +319 -0
- package/docs/vocabulary.md +118 -0
- package/package.json +3 -2
package/dist/runner.js
CHANGED
|
@@ -793,7 +793,8 @@ function loadConfig() {
|
|
|
793
793
|
trunk: String(r.trunk ?? "main"),
|
|
794
794
|
setup: Array.isArray(r.setup) ? r.setup.map(String) : void 0,
|
|
795
795
|
env: r.env ?? void 0,
|
|
796
|
-
harness: r.harness ?? void 0
|
|
796
|
+
harness: r.harness ?? void 0,
|
|
797
|
+
pickup: r.pickup === void 0 ? void 0 : Boolean(r.pickup)
|
|
797
798
|
};
|
|
798
799
|
}
|
|
799
800
|
return {
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Configuration reference
|
|
2
|
+
|
|
3
|
+
One file: `$LOBSTAH_HOME/config.toml` (default `~/.lobstah/config.toml`),
|
|
4
|
+
created with commented examples by `lobstah init`. Pickup reads its own
|
|
5
|
+
`[pickup.*]` sections from the same file.
|
|
6
|
+
|
|
7
|
+
**The one TOML gotcha:** top-level keys (`notifyCommand`, `remindSecs`, …)
|
|
8
|
+
must appear **before** the first `[section]` header, or they silently become
|
|
9
|
+
keys of that section.
|
|
10
|
+
|
|
11
|
+
## Top level
|
|
12
|
+
|
|
13
|
+
| Key | Default | Meaning |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `notifyCommand` | — | Exec'd by the daemon on wake-worthy status transitions with `LOBSTAH_ID`, `LOBSTAH_LANE`, `LOBSTAH_VERB`, `LOBSTAH_NOTE`, `LOBSTAH_AT` in the environment. Fire-and-forget; point it at ntfy, a Slack helper, anything. |
|
|
16
|
+
| `notifyVerbs` | `["needs-decision", "blocked", "done", "failed"]` | Which verbs fire `notifyCommand`. |
|
|
17
|
+
| `remindSecs` | `900` | An unanswered `needs-decision`/`blocked` re-fires to `man wait`/`man haul` on this interval until answered. `0` = report once only. |
|
|
18
|
+
|
|
19
|
+
## `[repos.<key>]` — workspace definitions
|
|
20
|
+
|
|
21
|
+
The descriptor's `repo` field resolves here; the key is what dispatchers name.
|
|
22
|
+
|
|
23
|
+
| Key | Required | Meaning |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `path` | yes | The git clone worktrees are allocated from (`~/` expands). |
|
|
26
|
+
| `trunk` | yes (default `main`) | Branch dispatches start from (`origin/<trunk>`). |
|
|
27
|
+
| `origin` | no | Enables clone-on-first-use when `path` doesn't exist. |
|
|
28
|
+
| `setup` | no | Commands run in each fresh worktree, in order (e.g. `["pnpm install"]`). |
|
|
29
|
+
| `env` | no | Environment merged into every dispatch for this repo. |
|
|
30
|
+
| `pickup` | no (`false`) | Opt this repo into `[pickup.github]` multi-repo mode. Explicit per repo — nothing becomes pickable by being configured. |
|
|
31
|
+
|
|
32
|
+
`[repos.<key>.harness]` — per-repo harness defaults: `default` (`claude` \|
|
|
33
|
+
`codex`), `model`, `effort`.
|
|
34
|
+
|
|
35
|
+
`lobstah repos add <path> [--pickup]` detects and appends a block (origin,
|
|
36
|
+
default branch from `origin/HEAD`, setup from the lockfile); `lobstah init
|
|
37
|
+
--scan <dir>...` does the same for every git repo found under the given
|
|
38
|
+
roots. Both append text — hand-written comments survive.
|
|
39
|
+
|
|
40
|
+
## `[harness]` — global harness defaults
|
|
41
|
+
|
|
42
|
+
Same three keys as the per-repo block. Precedence for every harness setting:
|
|
43
|
+
**descriptor > repo > global > adapter default.**
|
|
44
|
+
|
|
45
|
+
## `[limits]`
|
|
46
|
+
|
|
47
|
+
| Key | Default | Meaning |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `maxConcurrent` | `2` | Work-lane dispatches running at once. |
|
|
50
|
+
| `choreConcurrent` | `1` | Chore-lane ceiling (rebases and other machine-originated runs). |
|
|
51
|
+
| `wedgeThresholdSecs` | `600` | No tool activity for this long while alive = wedged → killed and forked with a nudge. |
|
|
52
|
+
| `maxRestartAttempts` | `2` | Bounded restart ladder for dead and wedged runners. |
|
|
53
|
+
| `wallClockSecs` | `3600` | Hard per-dispatch ceiling, enforced by the runner. |
|
|
54
|
+
| `choreRetentionDays` | `7` | Completed chores age out of `chores/done/`. |
|
|
55
|
+
|
|
56
|
+
## `[pickup]` — tracker loops (`lobstah pick`)
|
|
57
|
+
|
|
58
|
+
| Key | Default | Meaning |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `pollSecs` | `45` | Poll cadence. Outbound only — no webhooks, ever. |
|
|
61
|
+
| `notifyCommand` | — | Pickup's own hook, fired on tracker-report transitions with `LOBSTAH_KEY`, `LOBSTAH_UUID`, `LOBSTAH_VERB`, `LOBSTAH_NOTE`, `LOBSTAH_PR_URL`. |
|
|
62
|
+
|
|
63
|
+
### Token sources (both trackers)
|
|
64
|
+
|
|
65
|
+
Exactly one of, in precedence order — the config carries a reference, never a
|
|
66
|
+
secret:
|
|
67
|
+
|
|
68
|
+
| Key | Behavior |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `tokenCommand` | Exec'd, output cached ~5 min. The fit for hourly-expiring GitHub App installation tokens (`gh-app-token.sh`-style minting scripts). |
|
|
71
|
+
| `tokenFile` | Read per call — rotation just works. |
|
|
72
|
+
| `tokenEnv` | Read per call, so a wrapper can refresh it. Defaults: `GITHUB_TOKEN` / `LINEAR_TOKEN`. |
|
|
73
|
+
|
|
74
|
+
### `[pickup.linear]`
|
|
75
|
+
|
|
76
|
+
| Key | Default | Meaning |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `assignField` | `assignee` | Which Linear field marks work as ours: `assignee` for a user token, `delegate` for an agent token (Linear's UI assigns agents through the delegate field). |
|
|
79
|
+
| `startState` | `Todo` | Assigned + this state → dispatch. Claiming moves the issue to `claimedState` — the cross-machine mutex. Also the reset target for `failed` and orphans. |
|
|
80
|
+
| `startStateTypes` | — | Optional: poll by state *type* instead of the `startState` name, e.g. `["backlog", "unstarted"]` — a delegated issue is meant to be done even while it sits in Backlog. |
|
|
81
|
+
| `claimedState` | `In Progress` | |
|
|
82
|
+
| `doneState` | `In Review` | Where `done` reports land. `failed` returns to `startState`. |
|
|
83
|
+
| `route` | — | Team key → repo key, e.g. `{ ENG = "myapp" }`. |
|
|
84
|
+
|
|
85
|
+
### `[pickup.github]`
|
|
86
|
+
|
|
87
|
+
Two modes. **Single-repo**: name the forge repo explicitly. **Multi-repo**:
|
|
88
|
+
omit `repo`/`key` and the `[repos.*]` table becomes the source of truth —
|
|
89
|
+
every repo with `pickup = true` and a GitHub `origin` is polled, its lobstah
|
|
90
|
+
key reused as the routing key. Opt-in is per repo, never implied.
|
|
91
|
+
|
|
92
|
+
| Key | Default | Meaning |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| `identity` | required | The bot login work is assigned to / authored by. |
|
|
95
|
+
| `repo` | single-repo mode | `owner/name`. Omit for multi-repo mode. |
|
|
96
|
+
| `key` | single-repo mode | Lobstah repo key for dispatches and rebase chores. |
|
|
97
|
+
| `startLabel` | `lobstah` | Label + assignee + open = pickup. |
|
|
98
|
+
| `claimedLabel` | `lobstah:claimed` | Applied on claim. |
|
|
99
|
+
|
|
100
|
+
`[pickup.github.overrides.<key>]` — multi-repo per-repo overrides:
|
|
101
|
+
`startLabel`, `claimedLabel`, and a nested `merge` table layered over
|
|
102
|
+
`[pickup.github.merge]`.
|
|
103
|
+
|
|
104
|
+
### `[pickup.github.merge]` — off by default
|
|
105
|
+
|
|
106
|
+
| Key | Default | Meaning |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| `enabled` | `false` | |
|
|
109
|
+
| `method` | `squash` | |
|
|
110
|
+
| `approvers` | `[]` | The floor — always qualify, on every PR. |
|
|
111
|
+
| `assigneeApproves` | `true` | PR assignees also qualify… |
|
|
112
|
+
| `restrictedLabels` | `[]` | …except on PRs carrying any of these — the set collapses to the floor. Labels revoke, never grant. |
|
|
113
|
+
| `scope` | `own` | Merge only PRs authored by `identity`. |
|
|
114
|
+
|
|
115
|
+
See [pickup.md](pickup.md) for the loop semantics these keys drive.
|
|
116
|
+
|
|
117
|
+
## Environment
|
|
118
|
+
|
|
119
|
+
| Variable | Meaning |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `LOBSTAH_HOME` | The instance root (default `~/.lobstah`). Multiple instances = multiple homes; one daemon per home, enforced. |
|
|
122
|
+
| `LOBSTAH_MAN` | `=1` designates a session as the lobsterman for the `man haul` Stop hook. |
|