@buffcore/cli 0.8.43 → 0.8.44

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/commands/ui/chat/approval-folders.d.ts +20 -0
  3. package/dist/commands/ui/chat/approval-folders.js +134 -0
  4. package/dist/commands/ui/chat/approval-text.d.ts +11 -0
  5. package/dist/commands/ui/chat/approval-text.js +69 -0
  6. package/dist/commands/ui/chat/approval-writes.d.ts +32 -0
  7. package/dist/commands/ui/chat/approval-writes.js +179 -0
  8. package/dist/commands/ui/chat/claude-permissions.d.ts +4 -4
  9. package/dist/commands/ui/chat/claude-permissions.js +32 -4
  10. package/dist/commands/ui/chat/codex-idle.d.ts +1 -1
  11. package/dist/commands/ui/chat/commit-limits.d.ts +36 -0
  12. package/dist/commands/ui/chat/commit-limits.js +164 -0
  13. package/dist/commands/ui/chat/fresh-critique.js +3 -1
  14. package/dist/commands/ui/chat/fresh-launch.d.ts +5 -0
  15. package/dist/commands/ui/chat/fresh-launch.js +7 -4
  16. package/dist/commands/ui/chat/fresh.js +7 -1
  17. package/dist/commands/ui/chat/gh-api-limits.d.ts +14 -0
  18. package/dist/commands/ui/chat/gh-api-limits.js +74 -0
  19. package/dist/commands/ui/chat/git-words.d.ts +10 -0
  20. package/dist/commands/ui/chat/git-words.js +26 -0
  21. package/dist/commands/ui/chat/host-launched.d.ts +11 -0
  22. package/dist/commands/ui/chat/host-launched.js +35 -0
  23. package/dist/commands/ui/chat/limit-mentions.js +16 -2
  24. package/dist/commands/ui/chat/limit-text.d.ts +15 -0
  25. package/dist/commands/ui/chat/limit-text.js +36 -0
  26. package/dist/commands/ui/chat/limits-hook.js +2 -2
  27. package/dist/commands/ui/chat/limits.d.ts +7 -12
  28. package/dist/commands/ui/chat/limits.en.d.ts +2 -0
  29. package/dist/commands/ui/chat/limits.en.js +2 -0
  30. package/dist/commands/ui/chat/limits.es.js +2 -0
  31. package/dist/commands/ui/chat/limits.js +63 -59
  32. package/dist/commands/ui/chat/planning-limits.js +11 -0
  33. package/dist/commands/ui/chat/publish-limits.js +23 -7
  34. package/dist/commands/ui/chat/turn-guard.d.ts +8 -2
  35. package/dist/commands/ui/chat/turn-guard.js +8 -3
  36. package/dist/commands/ui/index.d.ts +42 -0
  37. package/dist/commands/ui/index.js +14 -2
  38. package/dist/commands/ui/routes.d.ts +2 -0
  39. package/dist/commands/ui/server-options.js +1 -0
  40. package/dist/commands/ui/server-request.js +5 -0
  41. package/dist/commands/ui/server.d.ts +7 -0
  42. package/dist/commands/ui/server.js +3 -0
  43. package/dist/commands/ui/studio-routes.d.ts +1 -0
  44. package/dist/commands/ui/studio-routes.js +3 -1
  45. package/dist/commands/ui/studio-state.d.ts +1 -0
  46. package/dist/ui/page.js +78 -69
  47. package/docs/PROTOTYPE.md +11 -0
  48. package/docs/WORKBENCH.md +11 -2
  49. package/package.json +11 -11
package/docs/PROTOTYPE.md CHANGED
@@ -101,6 +101,17 @@ window.name or sessionStorage; window heartbeat messages grant nothing. Every ne
101
101
  the old proof immediately. Old, future or missing nonces and repeated or decreasing counters never renew a lease.
102
102
  Hidden pauses heartbeats and the studio's deadlines; pagehide closes the port and clears the nonce, and unmount stops sending.
103
103
  An expired preview offers the app's own tab while waiting for a late answer. A new studio attempt waits eleven seconds for hello.
104
+ In the studio's preview the studio drives the player over the same port. Before its reply the
105
+ home says it plays (`ape:prototype:player`); choosing a journey, Back, Next and a sample-data choice
106
+ then each send one `ape:prototype:show` message (the current navigation and nonce, and a journey
107
+ key with a step, or a data state; at most 512 characters, read strictly) to the document whose
108
+ hello passed, and the app replays its own journey or seed at once, with no reload. The app answers
109
+ with a fresh reply, from which the studio takes only the step caption. The studio keeps the latest
110
+ choice: when the app says hello again on the same frame (it reloaded itself after an edit), or a
111
+ choice was made while its port had gone stale, the new document gets that choice once it is alive.
112
+ An app that does not say it plays (an older app-shell) is reloaded at each choice instead. The
113
+ frame reloads only for a new address, language or mode, or a retry, and then opens at the
114
+ current choice.
104
115
  No records, actions or credentials cross this connection; readiness grants no recording or approval right.
105
116
  The iframe uses `allow-scripts allow-same-origin`, with no forms, popups, downloads or top navigation;
106
117
  the app must have a different origin and authority (a scheme-only address change is refused, since
package/docs/WORKBENCH.md CHANGED
@@ -547,7 +547,7 @@ deny `Edit(plan/agents.md)`, `Edit(plan/**/.claude/**)`,
547
547
  Edit rules cover Write too and deny wins; `dontAsk` refuses anything that would need approval.
548
548
  Before each turn the studio also refuses any `.claude` folder beneath `plan/`, naming
549
549
  the folder, so skills planted by a different kind of turn cannot load.
550
- With every hook off, the limits hook included, these turns' deny rules hold the limits below: `Bash(…)` and `PowerShell(…)` prefix denies for `git push`, `curl`, `wget`, `iwr`, `irm`, `Invoke-WebRequest`, `Invoke-RestMethod`, `Start-BitsTransfer`, `ape deploy`/`ape server deploy` (bare, `pnpm` and `npx`), `npm publish` (and npm's shortened `npm pu` to `npm publis`), `pnpm publish`, `yarn publish`, `yarn npm publish` and `gh release create`/`new`/`upload`/`edit`/`delete`, `Read` and `Edit` denies for `.env.prod*` and `.env.staging*`, `WebFetch`, and the secret folders' `Read` denies (`planning-limits.ts`). `dontAsk` already refuses every command outside the two; the denies also hold against the person's own allow rules (prefix forms only: `git -C x push` is refused by `dontAsk` alone). On Autopilot, planning and loop run like any other step (next section): `auto`, or `bypassPermissions` with Never ask, with the limits hook, the card, no command list and the same edit denies; the turn's settings set `disableAllHooks: false`, so the product's own hooks run too. Their instructions say to change only files under `plan/`, and the studio's save still takes only what planning owns (`Edit(plan/**)` less the denies above), so an edit elsewhere stays unsaved.
550
+ With every hook off, the limits hook included, these turns' deny rules hold the limits below: `Bash(…)` and `PowerShell(…)` prefix denies for `git push`, `curl`, `wget`, `iwr`, `irm`, `Invoke-WebRequest`, `Invoke-RestMethod`, `Start-BitsTransfer`, `ape deploy`/`ape server deploy` (bare, `pnpm` and `npx`), `npm publish` (and npm's shortened `npm pu` to `npm publis`), `pnpm publish`, `yarn publish`, `yarn npm publish`, `bun publish`, `lerna publish`, `changeset publish` (bare, `npx`, `pnpm`, `pnpm exec` and `yarn`) and `gh release create`/`new`/`upload`/`edit`/`delete`, `Read` and `Edit` denies for `.env.prod*` and `.env.staging*`, `WebFetch`, and the secret folders' `Read` denies (`planning-limits.ts`). `dontAsk` already refuses every command outside the two; the denies also hold against the person's own allow rules (prefix forms only: `git -C x push` is refused by `dontAsk` alone). On Autopilot, planning and loop run like any other step (next section): `auto`, or `bypassPermissions` with Never ask, with the limits hook, the card, no command list and the same edit denies; the turn's settings set `disableAllHooks: false`, so the product's own hooks run too. Their instructions say to change only files under `plan/`, and the studio's save still takes only what planning owns (`Edit(plan/**)` less the denies above), so an edit elsewhere stays unsaved.
551
551
 
552
552
  #### Permissions follow the level
553
553
 
@@ -561,7 +561,7 @@ Every Claude turn takes its mode from the level in effect (`claude-permissions.t
561
561
 
562
562
  - **Never ask** is a setting under Autopilot only, off by default, kept as `neverAsk: true` in `plan/agents.md` beside `level: auto`. It holds only when main's commit and the working copy both say so; choosing any other level clears it, and a generic save may not change it where a host controls the level. The level chip reads "Autopilot · Never ask" while it is on. A model Claude Code can't run in `auto` starts in `default` without a word, so its calls reach the card; the CLI's init event names the mode it really runs, and the chat then says "Auto mode isn't available for this model; the agent will ask instead."
563
563
  - **The card.** Each launch passes `--permission-prompt-tool mcp__ape_permission__ask` and an `--mcp-config` file naming the one MCP server it adds (`permission-tool.ts`, plain Node); `--disallowedTools` hides that tool from the model. The tool hands each call to the studio over the launch's own local channel (a named pipe, or a socket only its owner opens, at a random name only that launch's arguments carry; not an HTTP route), which closes with the launch. The chat ends with "Your agent wants to run", the exact command and **Allow once**, **Always allow in this step** and **Refuse** (while it waits, the page's own primary button draws as secondary; an answer folds the card to one line while the turn goes on); `POST /api/chats/:id/permission` (`{ id, answer }`, the settings right and the studio Origin, like Allow this folder) answers only the card the running launch shows now. Refused, the agent hears which part and what to run alone ("`grep` is not allowed here; run `pnpm ape prototype snapshot --scene x` alone."); unanswered for 30 minutes, or when the turn ends, it hears that nothing ran. Always allow keeps the exact parts outside the list, as `Bash(<part>)` rules, in `.claude/settings.local.json` under `apeStepAllow.<work>` (Claude Code ignores that key); the studio adds them to that step's `--allowedTools` only, and the running launch reads that list again for each later call, so a command just kept does not ask twice. "This step" is the kind of work, not the rail step: Brand and Prototype both run design turns and share one list. A download, a command the limits could not vouch for (below), a file tool's call, a here-document, a command longer than the card shows, and a command with `%`, `!`, `"` or `*` (Claude Code's wildcard, as in `Bash(node *)` or `Bash(ls:*)`) are allowed once only. The card's text is cut to the chat's limits (2,000 characters for the command, 300 for each program it names, with an ellipsis); a stored card that does not fit them is dropped when the chat is read, and the chat stays.
564
- - **The limits**, at every level, Never ask included: the studio's PreToolUse hook (`limits-hook.ts`, plain Node) is installed for each turn through a `--settings` file that also sets `disableAllHooks: false`, so a product's own settings can't switch it off. It refuses reading a folder of sign-ins or keys (Allow this folder's list), `ape deploy` and `ape server deploy`, `.env.production`, `.env.staging` and `.env.prod` files, `git push` (and its plumbing, `git send-pack`), publishing a package (`npm publish` and every shortened name npm resolves to it, `npm pu` and up; `pnpm publish`, `yarn publish`, `yarn npm publish`: any of those package managers named in the part, `npx npm@10 publish` included, with the value of an option each tool takes one for skipped, `npm --registry x publish`, `pnpm -C dir publish`, while `pnpm --filter publish build` runs) and publishing a release (`gh release create`, `new`, `upload`, `edit`, `delete` and `delete-asset`, `gh -R owner/repo release create` included); a subcommand followed only by `--help` or `-h` runs (`publish-limits.ts`), and sends a network download (`curl`, `wget`, `wget2`, `aria2c`, `certutil -urlcache`, `Invoke-WebRequest`, `iwr`, `irm`, `Invoke-RestMethod`, `Start-BitsTransfer`, `WebFetch`) to the card for Allow once. Each part of a piped or chained command is checked, with continued lines joined first (a trailing `\` in Bash, a backtick in PowerShell) and escaped letters read as letters, and so is what a part hands to another shell (`sh -c`, `bash -lc`, `cmd /c`, `powershell -Command` or `-EncodedCommand`, `pwsh -c`, `eval`), anywhere in the part (`pnpm exec sh -c …`, `env X=1 git push`, `xargs git push`), up to four shells deep, `iex`/`Invoke-Expression` included; a `git commit` or `git tag` message after `-m` and a here-document's body are words, not commands (unless an unquoted here-document runs `$(…)`; its end word is read as Bash reads it, `E"OF"` being `EOF`), git's valued options (`--git-dir x`, `--work-tree x`, `-c a=b`) are skipped to find the subcommand, and a redirection such as `2>&1` stays with its command. The refusal names the part and its limit ("publishing a package"). On a Claude turn, when the hook's own sentence comes back as a command's result (`refusalLimit`, in either language), the chat shows that call as the limit's card, **This can't be allowed here**, with the limit's name, the command and **Copy the command**, and no Allow (recorded on the call's line as `tool.limit`; a command the chat shortened or scrubbed is not offered for copying); the permission card refuses a limit too, should one ever reach it. **The fallback** (`limit-mentions.ts`, `stdin-shells.ts`): when that check refuses and asks nothing, the hook still sends the call to the card, for Allow once only and never kept, at every level Never ask included, when the command's whole text (case ignored, continued lines joined, and read again with its quotes and escapes taken out) mentions a limit: `git` and `push` or `send-pack` anywhere in it (`git stash push` aside, so `git -c alias.p=push p` and `p=push; git $p` ask), `ape` and `deploy`, `npm`, `pnpm` or `yarn` and `publish` (or npm's shortened names) as a word of its own (not `src/publish.ts` or `publish-docs`, a known option's value, or a request for help), `gh` and `release` with `create`, `new`, `upload`, `edit` or `delete`, a secret folder's name (the turn's own folder taken out first), a production settings file, or a download program (the list above, plus `bitsadmin`, `Net.WebClient`, `DownloadString`, `DownloadFile`); and also when a shell or interpreter in a part's program place (`bash`, `sh`, `zsh`, `pwsh`, `powershell`, `cmd`, `node`, `python`, `perl`, `ruby` and the like, after `sudo`, `env`, `xargs` and other leaders) reads its script from standard input (no script or `-c`, `-s`, `-`, a here-document, a here-string or `<`: `echo … | sh`, `bash <<'EOF'`, `sh <<< '…'`), a shell pattern in a path could reach a secret folder or a production settings file (`limit-patterns.ts`: each word with `*`, `?`, `[…]` or `{a,b}` has its braces expanded, up to 256 words, and each path segment is tried as a pattern against those names, so `cat .env.*`, `cat ~/.ss*/id_rsa`, `cat ~/.[s]sh/id_rsa` and `cat .env.produc{t,}ion` ask, while a segment of wildcards only, `dist/*`, `src/**/*.ts`, `*.md` and a literal `.env.example` stay free; the card says "This command uses a pattern that could reach `.env.production`; the studio couldn't tell."), a here-document never reaches its end line, a part runs `iex`/`Invoke-Expression`, or the reading passes its budget (a command over 20,000 characters, 200,000 characters parsed in all, 50 ms, or more than 32 scripts handed on from one part; a script handed on twice is read once). The card says why ("This command mentions `git push`; the studio couldn't tell if it runs it.", from the chat's `asking.unsure`), and a refusal tells the agent the same. A commit message that mentions a limit therefore costs one Allow once click; the check answers in well under a second for any input, so the hook's 30-second timeout, which would let the call run, is never reached. Planning below Autopilot has no hook and keeps its deny rules only. A call the hook can't read, or any error in it, is refused (exit 2, with a plain reason). Deny rules for the secret folders (`Read(//**/.aws/**)` and the rest) back it up in every mode, planning included; for a folder name the product itself is kept under (a product in `~/secrets/…` or `…/.docker/…`), they cover that name inside the product (`Read(./**/secrets/**)`) and in the home folder only, as the hook counts it, so the product stays readable. Planning on Autopilot keeps the same edit denies as design turns (`.claude/**`, `.githooks/**`, `package.json` and the rest of the commands' files, and the chats). **Gaps:** the hook reads command text, so a determined agent can still get past it: under Never ask nothing stops it rewriting the hook script itself; a command name built at runtime from pieces (`g=gi; ${g}t push`, `git $'\x70ush'`, `$(printf gi)t push`, a name read from a file) is neither parsed nor mentioned; a recursive read names no limit in its text (`grep -rn KEY .`, `find ~ -name id_rsa -exec cat {} \;`), so text matching can't catch it; an encoded payload other than `-EncodedCommand` handed to something other than a shell's standard input (`node -e` decoding base64, a script file) is not read; and downloads through other programs (`node` with `fetch`, `git clone`, `pnpm add`, a script) are not caught.
564
+ - **The limits**, at every level, Never ask included: the studio's PreToolUse hook (`limits-hook.ts`, plain Node) is installed for each turn through a `--settings` file that also sets `disableAllHooks: false`, so a product's own settings can't switch it off. It refuses reading a folder of sign-ins or keys (Allow this folder's list), `ape deploy` and `ape server deploy`, `.env.production`, `.env.staging` and `.env.prod` files, `git push` (and its plumbing, `git send-pack`), publishing a package (`npm publish` and every shortened name npm resolves to it, `npm pu` and up; `pnpm publish`, `yarn publish`, `yarn npm publish`, `bun publish`, `lerna publish`, `changeset publish` (`npx @changesets/cli publish` too): any of those tools named in the part, `npx npm@10 publish` included, with the value of an option each tool takes one for skipped, `npm --registry x publish`, `pnpm -C dir publish`, while `pnpm --filter publish build` runs) and publishing a release (`gh release create`, `new`, `upload`, `edit`, `delete` and `delete-asset`, `gh -R owner/repo release create` included, and a `gh api` call that creates or changes one: a method other than GET or HEAD on `repos/{owner}/{repo}/releases…`, or fields or a body with no method named, as gh then posts, `gh-api-limits.ts`); a subcommand followed only by `--help` or `-h` runs (`publish-limits.ts`), a shell write into the approval records, `prototype/versions/` (a redirect into the folder, or any program that names a path in it other than a read such as `cat`, `ls`, `grep`, `find` without `-delete` or `-exec`, `git log`/`show`/`diff`, `Get-Content`; the path read against the shell's folder, `..`, case, patterns, brace lists and `$(…)` counted; on design and validation turns, and planning and loop turns on Autopilot, a program that writes the paths it names aimed at `.` or any folder above, at `prototype` unless a single file is copied in, a patch or archive (`git apply`, `git am`, `patch`, `Expand-Archive`), and a pipe from such a folder into one (`approval-folders.ts`); and, as a text fallback, a command naming both folders that looks like a write, refused when a part is more than a read and carded otherwise, `approval-writes.ts`, `approval-text.ts`), and, on a design, validation, planning or loop turn at the Autopilot level or with no level given (the hook's command line carries the work and the level), a commit or a branch moved (`git commit`, `commit-tree`, `update-ref`, `merge`, `cherry-pick`, `revert`, `rebase`, `am`, `pull`, `hash-object`, `fast-import`, `stash` but `list`/`show`, `reset` to a commit, `branch -f`/`-M`/`-C`, `checkout -B`, `switch -C`, `fetch` into a branch, `git subtree add`/`merge`/`pull`/`split --rejoin`, configuration set anywhere in the command (refused); a subcommand that is not git's own goes to the card; text naming git and one of them, when the parse could not read every git in it, goes to the card; `commit-limits.ts`), and sends a network download (`curl`, `wget`, `wget2`, `aria2c`, `certutil -urlcache`, `Invoke-WebRequest`, `iwr`, `irm`, `Invoke-RestMethod`, `Start-BitsTransfer`, `WebFetch`) to the card for Allow once. Each part of a piped or chained command is checked, with continued lines joined first (a trailing `\` in Bash, a backtick in PowerShell) and escaped letters read as letters, and so is what a part hands to another shell (`sh -c`, `bash -lc`, `cmd /c`, `powershell -Command` or `-EncodedCommand`, `pwsh -c`, `eval`), anywhere in the part (`pnpm exec sh -c …`, `env X=1 git push`, `xargs git push`), up to four shells deep, `iex`/`Invoke-Expression` included; a `git commit` or `git tag` message after `-m` and a here-document's body are words, not commands (unless an unquoted here-document runs `$(…)`; its end word is read as Bash reads it, `E"OF"` being `EOF`), git's valued options (`--git-dir x`, `--work-tree x`, `-c a=b`) are skipped to find the subcommand, and a redirection such as `2>&1` stays with its command. The refusal names the part and its limit ("publishing a package"). On a Claude turn, when the hook's own sentence comes back as a command's result (`refusalLimit`, in either language), the chat shows that call as the limit's card, **This can't be allowed here**, with the limit's name, the command and **Copy the command**, and no Allow (recorded on the call's line as `tool.limit`; a command the chat shortened or scrubbed is not offered for copying); the permission card refuses a limit too, should one ever reach it. **The fallback** (`limit-mentions.ts`, `stdin-shells.ts`): when that check refuses and asks nothing, the hook still sends the call to the card, for Allow once only and never kept, at every level Never ask included, when the command's whole text (case ignored, continued lines joined, and read again with its quotes and escapes taken out) mentions a limit: `git` and `push` or `send-pack` anywhere in it (`git stash push` aside, so `git -c alias.p=push p` and `p=push; git $p` ask), `ape` and `deploy`, `npm`, `pnpm` or `yarn` and `publish` (or npm's shortened names) as a word of its own (not `src/publish.ts` or `publish-docs`, a known option's value, or a request for help), `gh` and `release` with `create`, `new`, `upload`, `edit` or `delete`, a secret folder's name (the turn's own folder taken out first), a production settings file, or a download program (the list above, plus `bitsadmin`, `Net.WebClient`, `DownloadString`, `DownloadFile`); and also when a shell or interpreter in a part's program place (`bash`, `sh`, `zsh`, `pwsh`, `powershell`, `cmd`, `node`, `python`, `perl`, `ruby` and the like, after `sudo`, `env`, `xargs` and other leaders) reads its script from standard input (no script or `-c`, `-s`, `-`, a here-document, a here-string or `<`: `echo … | sh`, `bash <<'EOF'`, `sh <<< '…'`), a shell pattern in a path could reach a secret folder or a production settings file (`limit-patterns.ts`: each word with `*`, `?`, `[…]` or `{a,b}` has its braces expanded, up to 256 words, and each path segment is tried as a pattern against those names, so `cat .env.*`, `cat ~/.ss*/id_rsa`, `cat ~/.[s]sh/id_rsa` and `cat .env.produc{t,}ion` ask, while a segment of wildcards only, `dist/*`, `src/**/*.ts`, `*.md` and a literal `.env.example` stay free; the card says "This command uses a pattern that could reach `.env.production`; the studio couldn't tell."), a here-document never reaches its end line, a part runs `iex`/`Invoke-Expression`, or the reading passes its budget (a command over 20,000 characters, 200,000 characters parsed in all, 50 ms, or more than 32 scripts handed on from one part; a script handed on twice is read once). The card says why ("This command mentions `git push`; the studio couldn't tell if it runs it.", from the chat's `asking.unsure`), and a refusal tells the agent the same. A commit message that mentions a limit therefore costs one Allow once click; the check answers in well under a second for any input, so the hook's 30-second timeout, which would let the call run, is never reached. Planning below Autopilot has no hook and keeps its deny rules only. A call the hook can't read, or any error in it, is refused (exit 2, with a plain reason). Deny rules for the secret folders (`Read(//**/.aws/**)` and the rest) back it up in every mode, planning included; for a folder name the product itself is kept under (a product in `~/secrets/…` or `…/.docker/…`), they cover that name inside the product (`Read(./**/secrets/**)`) and in the home folder only, as the hook counts it, so the product stays readable. Planning on Autopilot keeps the same edit denies as design turns (`.claude/**`, `.githooks/**`, `package.json` and the rest of the commands' files, and the chats). **Gaps:** the hook reads command text, so a determined agent can still get past it: under Never ask nothing stops it rewriting the hook script itself; a command name built at runtime from pieces (`g=gi; ${g}t push`, `git $'\x70ush'`, `$(printf gi)t push`, a name read from a file) is neither parsed nor mentioned; a recursive read names no limit in its text (`grep -rn KEY .`, `find ~ -name id_rsa -exec cat {} \;`), so text matching can't catch it; an encoded payload other than `-EncodedCommand` handed to something other than a shell's standard input (`node -e` decoding base64, a script file) is not read; and downloads through other programs (`node` with `fetch`, `git clone`, `pnpm add`, a script) are not caught.
565
565
  - Below Autopilot, these turns' instructions say a command outside the list pauses for the person, and to run each command alone, without pipes, `&&`, `;` or redirects; at every level they name the limits.
566
566
  - Design turns may run exact `pnpm format`, and delete files below `design/` or `prototype/` without asking (one delete command, alone, every path two levels down or more, never `prototype/versions`).
567
567
  - **Codex** gets the same arguments at every level, Never ask included: `codex exec` with `approval_policy="never"` (it never asks; a call its sandbox refuses fails and the agent hears why) inside the product's `default_permissions = "ape"` profile (`:workspace` writes, deny-read rules, network off). That is already its full-auto form; the studio passes no `--sandbox`, `--full-auto`, `--approve-for-me` or bypass flag, since a sandbox flag would discard the deny-read profile and a bypass removes the sandbox. The studio installs no hook in Codex, so its limits are its sandbox's: network off stops downloads, deploys and a push to a network remote; the profile denies `.env*` and key files inside the product. **Gaps:** a folder of sign-ins outside the product (`~/.aws`, `~/.gnupg`) is readable, and `git push` to a remote on a local path is not stopped.
@@ -845,6 +845,15 @@ The host chooses how to listen or proxy the returned Node server. It fills `plan
845
845
  and compare runs answer 400), and polls `stack.check()` for the dev server's state.
846
846
  Without this adapter, the loopback, Host and run-token guards above still apply.
847
847
 
848
+ A host whose own trusted launcher starts the agent's turns passes `hostLaunched: true` to
849
+ `createUiServer` (a host that starts `ape ui` sets `APE_HOST_LAUNCHED=1`). Turns then launch
850
+ exactly as in 0.8.41: `acceptEdits`, or `dontAsk` with hooks off for planning, at every level,
851
+ with 0.8.41's allow and deny lists and no per-turn settings file, MCP config, permission prompt
852
+ tool or socket; fresh turns keep hooks off through the inline `--settings` JSON and load no
853
+ settings file of their own. The host applies the limits (the upgrade notes list them), and
854
+ Settings says so. The mode belongs to
855
+ `runner.cwd`'s product folder while the server runs (`chat/host-launched.ts`).
856
+
848
857
  A host can pass `level: { source: 'host', where: 'Project console' }` to `createUiServer`.
849
858
  The Level chooser then shows main's committed level and the commit it was read from, read-only,
850
859
  with a fixed English or Spanish sentence naming `where`. `POST /api/level` returns HTTP 409
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buffcore/cli",
3
- "version": "0.8.43",
3
+ "version": "0.8.44",
4
4
  "description": "The `ape` command: create, dev, migrate, seed, prototype, deploy and a local MCP server for coding agents.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "BuffApe",
@@ -45,20 +45,20 @@
45
45
  "playwright-core": "1.63.0",
46
46
  "yaml": "2.9.1",
47
47
  "zod": "4.6.5",
48
- "@buffcore/build-agent": "0.8.43",
49
- "@buffcore/config": "0.8.43",
50
- "@buffcore/modules": "0.8.43",
51
- "@buffcore/storage": "0.8.43",
52
- "@buffcore/tokens": "0.8.43",
53
- "@buffcore/contracts": "0.8.43",
54
- "@buffcore/i18n": "0.8.43",
55
- "@buffcore/db": "0.8.43",
56
- "@buffcore/server": "0.8.43"
48
+ "@buffcore/contracts": "0.8.44",
49
+ "@buffcore/config": "0.8.44",
50
+ "@buffcore/modules": "0.8.44",
51
+ "@buffcore/storage": "0.8.44",
52
+ "@buffcore/db": "0.8.44",
53
+ "@buffcore/server": "0.8.44",
54
+ "@buffcore/i18n": "0.8.44",
55
+ "@buffcore/tokens": "0.8.44",
56
+ "@buffcore/build-agent": "0.8.44"
57
57
  },
58
58
  "devDependencies": {
59
59
  "marked": "18.1.3",
60
60
  "tsx": "4.23.15",
61
- "@buffcore/admin-shell": "0.8.43"
61
+ "@buffcore/admin-shell": "0.8.44"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "node ../../scripts/build-package.mjs && node scripts/bundle.mjs",