lobstah 0.7.10 → 0.7.11

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.
@@ -405,6 +405,67 @@ as that identity, with its token. Any key except `enabled`, `repos` and
405
405
  The `review` attention kind is not in the default `attentionKinds`; add it to
406
406
  let review items walk in `man tend`, the glass, and the pet.
407
407
 
408
+ ## `[permissions]` — the Claude Code auto-mode profile
409
+
410
+ Traps and the helm run Claude Code in auto mode. `lobstah permissions apply`
411
+ merges lobstah's profile into your Claude Code user settings
412
+ (`$CLAUDE_CONFIG_DIR/settings.json`, else `~/.claude/settings.json`). That is
413
+ the only file Claude Code reads `autoMode.environment` from, apart from managed
414
+ settings and `--settings`.
415
+
416
+ The base profile adds context for Claude Code's classifier:
417
+ - lobstah's worktrees are your development checkouts;
418
+ - the helm doing what you asked in its chat is not a bypass;
419
+ - merges to trunk, production deploys, secrets, accounts and lobstah's own
420
+ permission controls stay yours.
421
+
422
+ It also allows `Read` and `Edit` on `<lobstah home>/worktrees/**`.
423
+ `[permissions]` adds to it:
424
+
425
+ ```toml
426
+ [permissions]
427
+ environment = ["**Trusted GitHub orgs**: acme and acme-labs are the user's own orgs."]
428
+ allow = ["Bash(wrangler dev *)"]
429
+ deny = ["Bash(vercel env pull *)"]
430
+
431
+ [permissions.codex]
432
+ forbidden = [["vercel", "env", "pull"]]
433
+ allow = [["wrangler", "dev"]]
434
+ ```
435
+
436
+ | Key | Meaning |
437
+ |---|---|
438
+ | `environment` | Prose entries added to `autoMode.environment`, e.g. trusted orgs, cloud accounts, or env-pull policy. |
439
+ | `allow`, `deny` | Claude Code permission rules (`Tool` or `Tool(specifier)`) added to `permissions.allow` / `permissions.deny`. These are resolved before the classifier. |
440
+ | `codex.forbidden`, `codex.prompt`, `codex.allow` | Codex command rules, each an argv prefix (`["gh", "pr", "merge"]`). A Codex `allow` runs the command outside Codex's sandbox, so these are never translated from the Claude rules. |
441
+
442
+ **Codex.** Codex has its own home: `$CODEX_HOME`, else `~/.codex`. When it exists, the same verbs also change two things there:
443
+ - **The auto reviewer's added policy.** This is `[auto_review].extra_policy` in `config.toml`, which Codex's reviewer reads alongside its own policy. lobstah writes a block between `<!-- lobstah:begin … -->` and `<!-- lobstah:end -->` holding the same three facts and `environment`.
444
+ - Text outside the markers is yours and stays.
445
+ - lobstah edits only the key's own lines, keeping comments, key order and the string's quoting. It parses the file before and after; anything else changing refuses the write.
446
+ - **`rules/lobstah.rules`.** This file is wholly lobstah's. It holds the base rules plus `[permissions.codex]`:
447
+ - forbidden: `lobstah grant`, `lobstah trap grant|bypass` and `lobstah permissions apply|remove`;
448
+ - prompt: `gh pr merge`.
449
+ - `codex execpolicy check` loads every rule before the file is put in place.
450
+
451
+ `remove` deletes `rules/lobstah.rules` and lobstah's block. Neither verb sets `approvals_reviewer` or `approval_policy`: `man throw` already starts Codex traps with `--approve-for-me`.
452
+
453
+ **What each form does:**
454
+ - Bare `lobstah permissions` shows the diff and writes nothing.
455
+ - `apply` merges, keeping every existing key and rule. A new
456
+ `autoMode.environment` starts with `"$defaults"`, so Claude Code's built-in
457
+ context stays.
458
+ - `remove` takes lobstah's entries out.
459
+ - Both `apply` and `remove` back up the previous file to
460
+ `<lobstah home>/backups/`, ask before writing (`--yes` skips the question),
461
+ and refuse inside an agent's shell.
462
+
463
+ lobstah records the entries it added in `<lobstah home>/claude-permissions.json`,
464
+ so a re-run after editing `[permissions]` removes only lobstah's own stale
465
+ entries. `lobstah doctor` reports whether the profile is applied and current.
466
+ There is one Claude Code user settings file, so there is one `[permissions]`
467
+ table rather than one per grounds.
468
+
408
469
  ## Environment
409
470
 
410
471
  | Variable | Meaning |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lobstah",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "description": "Harness-agnostic, token-efficient supervision framework for coding agents",
5
5
  "license": "MIT",
6
6
  "author": "aequitas labs LLC",