lobstah 0.8.8 → 0.8.9

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/dist/runner.js CHANGED
@@ -1077,6 +1077,7 @@ var ANSWER_TYPES = {
1077
1077
  ".zip": "application/zip"
1078
1078
  };
1079
1079
  var ANSWER_EXTENSIONS = Object.keys(ANSWER_TYPES);
1080
+ var RUN_DONE_GRACE_MS = 2 * 6e4;
1080
1081
 
1081
1082
  // packages/core/dist/roster.js
1082
1083
  import * as fs6 from "node:fs";
@@ -3457,6 +3458,11 @@ function parseHeavy(raw) {
3457
3458
  heavy.repos = repos;
3458
3459
  return heavy;
3459
3460
  }
3461
+ function parseMergeMethod(value, key) {
3462
+ if (value === "merge" || value === "squash" || value === "rebase")
3463
+ return value;
3464
+ throw new Error(`repos.${key}.mergeMethod must be "merge", "squash" or "rebase"`);
3465
+ }
3460
3466
  var DEFAULT_SOAK = {
3461
3467
  codexStartSecs: 600,
3462
3468
  acceptWharfStarts: false,
@@ -3507,6 +3513,7 @@ var DEFAULT_LIMITS = {
3507
3513
  backgroundWaitSecs: 1800,
3508
3514
  exitGraceSecs: 30,
3509
3515
  choreRetentionDays: 7,
3516
+ runRetentionDays: 14,
3510
3517
  attachmentMaxBytes: 25 * 1024 * 1024,
3511
3518
  retentionDays: 0,
3512
3519
  minFreeGB: 0,
@@ -3598,6 +3605,7 @@ function loadConfig() {
3598
3605
  pushEarly: r.pushEarly === void 0 ? void 0 : Boolean(r.pushEarly),
3599
3606
  draftPr: r.draftPr === void 0 ? void 0 : Boolean(r.draftPr),
3600
3607
  checkpointOnStop: r.checkpointOnStop === void 0 ? void 0 : Boolean(r.checkpointOnStop),
3608
+ ...r.mergeMethod !== void 0 ? { mergeMethod: parseMergeMethod(r.mergeMethod, key) } : {},
3601
3609
  humanGateChecks: Array.isArray(r.humanGateChecks) ? r.humanGateChecks.map(String).filter(Boolean) : void 0,
3602
3610
  ...parseBriefHooks(r.hooks?.brief) ? { hooks: { brief: parseBriefHooks(r.hooks.brief) } } : {},
3603
3611
  poolKeep: Array.isArray(r.poolKeep) ? r.poolKeep.map(String).filter(Boolean) : void 0
@@ -3817,6 +3825,9 @@ function parseBackendLocation(raw) {
3817
3825
  // packages/core/dist/todos.js
3818
3826
  var CLOSED_KEEP_MS = 30 * 24 * 3600 * 1e3;
3819
3827
 
3828
+ // packages/core/dist/terminal-render.js
3829
+ var PLAIN = Object.freeze({});
3830
+
3820
3831
  // packages/core/dist/grants.js
3821
3832
  var ONCE_TTL_MS = 60 * 60 * 1e3;
3822
3833
 
@@ -65,6 +65,7 @@ The descriptor's `repo` field resolves here; the key is what dispatchers name.
65
65
  | `path` | yes | The git clone worktrees are allocated from (`~/` expands). |
66
66
  | `trunk` | yes (default `main`) | Branch dispatches start from (`origin/<trunk>`). |
67
67
  | `origin` | no | Enables clone-on-first-use when `path` doesn't exist. |
68
+ | `mergeMethod` | no (`[pickup.github.merge].method`, else `squash`) | How the glass's Merge when green merges this repo's PRs: `merge`, `squash` or `rebase`. A request keeps the method it was asked with. |
68
69
  | `reviewTool` | no (`"github"`) | Destination for PR links in the glass and PR pet clicks, independent of `[pet].open`: `github`, `graphite`, `linear` (browser: `https://linear.review/{owner}/{repo}/pull/{number}`), `linear-app` (Linear desktop app: `linear://review/{owner}/{repo}/pull/{number}`), or an HTTPS template containing `{owner}`, `{repo}`, and `{number}`. Example: `"https://review.example/{owner}/{repo}/{number}"`. The configured `origin` (else the checkout's git origin) identifies the repo; canonical GitHub URLs remain the watch identity. Linear reviews require its GitHub integration; `linear-app` also requires the installed app. Custom templates remain HTTPS-only. |
69
70
  | `setup` | no | Commands run in each fresh worktree, in order (e.g. `["pnpm install"]`). A follow-up that reuses its origin's worktree does not run them again unless a lockfile at the worktree root (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `Cargo.lock`, `go.sum`, and others) or the commands changed since they last ran there. |
70
71
  | `cacheDirs` | no | Disposable cache-directory globs relative to trap worktrees, e.g. `["apps/*/.next/cache", ".temp/*DerivedData*"]`. No absolute paths or `..`; symlinks, Git metadata and matches containing tracked files are preserved. Cleared on sign-off or terminal dispatch reports, and in idle traps under disk pressure. Omit to disable. |
@@ -203,6 +204,7 @@ send a continuation.
203
204
  | `backgroundWaitSecs` | `1800` | A turn that ends without a report is held open this long while background work the worker started is still running (a push behind a slow pre-push gate); the harness wakes the worker when it settles. Heartbeats keep the wedge detector off the wait. Keep it below `wallClockSecs`, which still ends the run. |
204
205
  | `exitGraceSecs` | `30` | After the worker reports `done` or `failed` at the end of a turn, the runner ends the session and waits this long for the harness to close its event stream. If the stream is still open, the runner kills the harness, then stops every process the runner started (its process group on Linux and macOS, its process tree on Windows), and finishes. The report stands: the status stays `done` or `failed`, and evidence records `harnessStopped` with how many seconds after the report the harness was stopped. When the stream closes in time, the runner stops any background processes the harness left running on its way out. |
205
206
  | `choreRetentionDays` | `7` | Completed chores age out of `chores/done/`. |
207
+ | `runRetentionDays` | `14` | How long a run card's history stays on disk: each run's output and state, and a run card that left the glass. The daemon prunes older ones hourly. `0` keeps them. |
206
208
  | `attachmentMaxBytes` | `26214400` (25 MiB) | Maximum size of each file supplied with repeatable `dispatch --attach`, `send --attach`, or a decision answer. Picked files and images pasted into a glass answer box use this limit. |
207
209
  | `retentionDays` | `0` (off) | The daemon culls finished dispatches (done and failed) older than this many days: their `done/` entries, worktrees, state files, and stale PR records and acks. Branches are kept. A dispatch whose PR is still open is kept. Queued and active dispatches are never culled. The pass runs at most once per hour and culls at most 10 dispatches per pass, so it cannot stall the claim loop. Suggested: `14`, the same window as `lobstah cull`. |
208
210
  | `releaseOnMerge` | `false` (off) | When a PR watch records `merged` for a PR, the daemon's next cull pass removes the worktree of the dispatch that owns the PR, and of every dispatch in its follow-up chain that ran on that PR (its own worktree or a shared one). It uses the retention cull's removal path, its hourly throttle, and its limit of 10 per pass, and runs even when `retentionDays` is `0`. It releases a worktree only when every dispatch in the chain is finished (done or failed) and none is queued or active, `git status --porcelain` is empty, and after a fetch `git branch -r --contains HEAD` is not empty. Otherwise it keeps the worktree, records why, and `lobstah doctor`'s `disk` row shows `kept: unpushed work`; the next pass checks again. Uncommitted changes and unpushed commits are never deleted. A PR closed without merge releases nothing. A trap's worktree is never released. Branches (local and remote), `done/` entries, state, and evidence are kept; `lobstah catch` prints `worktree: released on merge (<time>)`. One `worktree-released` notice per pass lists what was released. |
package/docs/man.md CHANGED
@@ -489,6 +489,28 @@ stack. When two PRs share a head branch, the parent is the one first seen
489
489
  last. The attention list is in standing order: the time each condition
490
490
  started. `observedAt` is shown as the time of the last check.
491
491
 
492
+ **Merge when green.** On the glass PRs tab, each open PR of yours has Merge
493
+ when green. A second tap names the merge (`Merge #12 into main as one
494
+ squashed commit`) and stores the request on the PR record. The boat refuses
495
+ a PR it has no record of (404), one that isn't open (409), and one that is
496
+ neither authored by the login `gh` signs in as nor opened by a dispatch
497
+ (403). Each PR-watch tick, the daemon takes each request in turn:
498
+
499
+ - A green PR that GitHub calls clean, with no open PR below it in its stack,
500
+ merges with `gh pr merge --<method> --match-head-commit <head>`. A refused
501
+ merge is tried again on the next tick.
502
+ - A conflicting PR, or one with failing checks, is repaired first. A
503
+ dispatch's PR already has its PR repair. For a PR no dispatch opened, the
504
+ daemon queues one repair dispatch per head, which pushes to that PR's
505
+ branch; once it reports the PR, the repair chain takes later rounds.
506
+ - When a PR's repair stops at a head, the helm gets one `repair-stopped`
507
+ notice for that head.
508
+ - Drafts and running checks wait. A merged or closed PR drops its request.
509
+
510
+ Cancel withdraws the request. The method is the repo's
511
+ [`mergeMethod`](configuration.md#reposkey--workspace-definitions), else
512
+ `[pickup.github.merge].method`, else squash.
513
+
492
514
  An observed PR joins tend's attention list by kind. `pr:ready` needs a
493
515
  mergeable, non-draft PR with no failed, pending, or unknown current checks.
494
516
  `pr:conflict` and `pr:checks` appear for an owned PR only when repair is off,
@@ -803,7 +825,10 @@ Use `--input NAME:secret` for secrets (values via stdin, never in the script),
803
825
  `--timeout` for the time limit, and `--output scrubbed|exit` for the result.
804
826
  The person reviews and runs the script from the glass. Scripts read declared
805
827
  inputs from stdin, one line each in `--input` order. `scrubbed` returns
806
- scrubbed output to the helm. `exit` returns only the exit code.
828
+ scrubbed output to the helm. `exit` returns only the exit code. The output
829
+ reads as a terminal showed it: redrawn lines, spinners and answered prompts
830
+ collapse to their final text, and no escape code remains. The card in the
831
+ glass keeps the colors, and the run's `output.log` keeps the raw stream.
807
832
 
808
833
  From the phone: a Mac that mirrors to a hosted glass runs its cards from
809
834
  there too. Run `lobstah run passkey add --hosted` on the Mac, open the link it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lobstah",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "Harness-agnostic, token-efficient supervision framework for coding agents",
5
5
  "license": "MIT",
6
6
  "author": "aequitas labs LLC",