@sema-agent/core 7.68.5 → 7.68.7
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/CHANGELOG.md +55 -0
- package/dist/core/allow-entry.d.ts +2 -2
- package/dist/core/allow-entry.js +6 -5
- package/dist/core/ask-headline.d.ts +2 -2
- package/dist/core/ask-origin.d.ts +31 -31
- package/dist/core/ask-origin.js +20 -13
- package/dist/core/permission-rule-model.js +3 -2
- package/dist/core/shell-read-silence.d.ts +2 -1
- package/dist/core/tool-policy.d.ts +4 -1
- package/dist/core/tool-policy.js +2 -2
- package/dist/shell/lex.d.ts +27 -4
- package/dist/shell/lex.js +128 -56
- package/dist/tools/fs/bash-readonly-classifier.js +7 -3
- package/dist/tools/fs/fs-bash.js +4 -4
- package/dist/tools/fs/removal-targets.d.ts +5 -4
- package/dist/tools/fs/removal-targets.js +14 -14
- package/dist/tools/fs/safety.d.ts +23 -4
- package/dist/tools/fs/safety.js +38 -1
- package/dist/tools/fs/shell-read-plan.d.ts +8 -2
- package/dist/tools/fs/shell-read-plan.js +16 -6
- package/dist/tools/fs/shell-read-sourced.js +3 -2
- package/package.json +2 -2
- package/wire-changes/core-stores-sql@7.68.6.json +39 -0
- package/wire-changes/core-stores-sql@7.68.7.json +39 -0
- package/wire-changes/core@7.68.6.json +125 -0
- package/wire-changes/core@7.68.7.json +140 -0
- package/wire-changes/mods-kernel@7.68.6.json +39 -0
- package/wire-changes/mods-kernel@7.68.7.json +39 -0
- package/wire-changes/primitives@7.68.6.json +39 -0
- package/wire-changes/primitives@7.68.7.json +39 -0
- package/wire-changes/wiki-gate@7.68.6.json +39 -0
- package/wire-changes/wiki-gate@7.68.7.json +39 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
## 7.68.7 — 2026-11-18
|
|
2
|
+
|
|
3
|
+
### On a Windows tree the shell read station reads Git Bash's drive spelling (`/c/…`) as the drive path it names — reads, writes, `cd` targets and the removal guard (#4854; a narrowing on Windows hosts; widening: one, below — reads the engine places inside the root, open to veto; no API change)
|
|
4
|
+
|
|
5
|
+
- **Who.** Hosts whose execution environment is a Windows tree (a drive or UNC root) running the win32 adapter's shell, Git for Windows / MSYS2 bash, which names drive X's root `/x`. A POSIX tree is unchanged: `/c/x` there is an ordinary path.
|
|
6
|
+
- **Before (measured on a win-family environment double over a real Runner; the evaluation repo reported measuring the read row on a Windows host, engine 7.68.5; no real-host record here).** The station read the listed drive-spelled operands on a Windows tree as "cannot be placed", so `/c/Users/<u>/…` met no home-anchored or rooted deny row: `cat /c/Users/<u>/<deny-listed file>` — also `/C/…`, a pattern, `/c/../c/…`, double- or single-quoted — ran unasked under `bypassPermissions` and elsewhere were asked or refused as "where this command reads could not be established". `rm -rf /c/proj` (the task root), `rm -rf /c` (the drive root) and `rm -rf /c/Users/<u>` (the home) ran under `bypassPermissions` with no removal question (the target was not placed, so the removal guard had nothing to judge); a redirection or copy onto a protected or deny-listed file, and `cd /c/… && <relative read>`, likewise. A person's rule `Read(//c/…)` and the built-in rows matched anywhere (`.ssh`, …) already refused.
|
|
7
|
+
- **Now.** On a Windows tree a `/`-rooted operand is folded as that shell folds it (`..` at `/x` climbs to the emulation's own root) and a single-letter first segment is that drive: `/c/rest` and `/C/rest` ⇒ `C:\rest`, `/c` ⇒ `C:\`; three or more leading slashes read as one (`///c/rest` ⇒ `C:\rest`, refused as its twin where it was unplaced before), two are a UNC as before. Read at the one operand resolver, so every shell station — reads, writes, redirections, `cd` targets, the removal guard — judges it as its `C:/…` twin, on every mode and every deny-row source (built-in, the deployment's home-anchored and rooted rows, a person's rule). The tracked working directory reads the shell's `/c/…` pwd through the same reading (its spelling is now `C:\…`, measured; it was `c:/…`, by reading the code).
|
|
8
|
+
- **The widening — open to veto.** A read the engine places inside the root, written in the drive spelling, is now that in-root read, as its `C:/…` twin already was. Measured against 7.68.6 on the win-family double, default read face, root `C:\work\repo`, with four such reads (`cat /c/work/repo/src/a.txt`, the same upper-cased, `cat /c/work/repo/../repo/sub/b.txt`, `ls /c/work/repo`): under `default`, `acceptEdits` and `plan` with a person they were asked and now run unasked; under `default` with nobody to ask, `auto` and `dontAsk` they were refused (`read_unestablished`; `dontAsk` by its mode) and now run; under `bypassPermissions` they ran and still run. Two consequences of that one reading are not right, each its own known limit: a host whose shell is not of the MSYS line interprets the same text outside the root by those tools' documented conventions (Cygwin: `c` under its installation root; cmd / PowerShell / busybox-w32: `\c\…` on the current drive; not measured here) — KL-4854-b; and a read that passes a link inside the root and then climbs with `..` past the drive's root back into the root is judged as the in-root file while the review double models Git Bash resolving the link first and opening a path under the drive's root, outside the root (the real-shell destination was not measured here) — it was asked or refused as above and now runs unasked on every seat — KL-4854-d. Nothing else got looser: over 102 drive-spelled reads, writes, redirections, removals and link forms × 8 seats (the review measurement against 7.68.6), no write, no removal and no read the engine places outside the root lost a question or a refusal on any seat; the open read face was not measured.
|
|
9
|
+
- **Unchanged.** A `cd` to the drive spelling mints no directory rule and no stored directory rule covers it (refusal-only; the same on 7.68.6, measured). The following `/`-rooted spellings stay unplaced as before — the emulation's own tree (`/etc`, `/usr`, `/bin`, `/opt`, `/home`, `/tmp`, `/proc`, `/dev`), another layer's drive form (`/cygdrive/x/…`, `/mnt/x/…`), a fold out of the drive (`/c/../etc/…`), a multi-letter head (`/cc/…`), the rule grammar's `/C:/…`, Win32's backslash root (`\c\…`), a bare `//c`; a full UNC spelling (`//c/Users/x/f`) keeps its UNC anchor as before, placed as a UNC path, not as drive `c` — KL-4854-a. A directory link inside the root that names the drive's root is modeled in the review double as letting Git Bash climb past that root with `..`, which the station folds as text (the real-shell destination was not measured here): such a read or removal runs under `bypassPermissions` on 7.68.6 and on this release alike, and is asked or refused elsewhere on both — not fixed here, KL-4854-d. Not measured on this release, and untouched by its diff: the structured file tools (by Node on Windows' documented convention, `/c/x` is the current drive's `\c\x` (not measured here), and they read it so).
|
|
10
|
+
- **Not in range.** A path built inside another interpreter's text (`powershell -Command "…"`, `python -c "…"`) — KL-4854-c.
|
|
11
|
+
- **Pins.** `test/backlog4854-win-drive-prefix.test.ts` — the one resolver's readings on a win tree and on a POSIX tree; reads (the reported spellings × six modes × four deny-row sources, through a link inside the root, after a `cd`), the in-root read, the removal guard (the drive root, the task root and the home in every mode; five more spellings of the task root), writes (a redirection, a copy target, the write-protection table), the tracked working directory, the `cd` member, what stays unplaced, the in-root read judged by the shell double for a shell outside the MSYS line (its actual path follows documented convention, not measured here; KL-4854-b), and a POSIX tree (`/c/…` an ordinary path, its `cd` member as before). One earlier cell re-pinned: `test/path-identity-family-matrix.test.ts` (`/d/private.txt` under a win root resolves to `D:\private.txt` now; it was unresolved).
|
|
12
|
+
- **Consumers.** A probe that pinned the "could not be established" card for a drive-spelled operand on a Windows host now meets the `C:/…` spelling's verdict (`read_path_denied`, the removal question, the write-protection question): re-pin to it. A probe that pinned an in-root drive-spelled read as asked or refused now sees it run.
|
|
13
|
+
|
|
14
|
+
### What the engine can read of a command is judged as itself; what it cannot read is the ordinary question beside it, never instead of it — a removal or deny-listed read written plainly before text the engine cannot parse is stopped again, and a command written in a parameter expansion's operand is read (#4862; a narrowing of 7.68.6, and of a gap older than it; hard-breaking: none; open to veto @server @cli @test for the one stricter-than-the-shell cell below)
|
|
15
|
+
|
|
16
|
+
- **What 7.68.6 let through.** 7.68.6 made a shell text the engine cannot read an ordinary question (`bypassPermissions` releases it; auto's classifier, a stored rule, a pre-approval, a class table and a host's blanket `onAsk: "allow"` can answer it, subject to the read-face distinctions below). Where a command's text could not be parsed to its end, the engine read none of it, so a removal or read written plainly BEFORE the unparseable part became that question too: `rm -rf ~; cat <<EOF⏎x` (a here-document never closed), `rm -rf /usr⏎echo 'x` (the next line never closes its quote), `rm -rf ~; echo $(case x in x) y;; esac)`, `rm -rf /; cat <<EOF⏎x`, a workspace removal before `⏎echo "x`, and `cat .env` / `cat ~/.npmrc` before such a tail ran under `bypassPermissions` and the blanket answer on both read faces; on the open face they also ran under auto's classifier, a stored rule / pre-approval / class table in `default`, `acceptEdits` or `plan`, and a stored rule / pre-approval in `dontAsk` (25/50 arms per text in the review leg's raw cells; its “hole arms 44/50” also counts ordinary questions). On the narrowed face, `default`, `acceptEdits`, `plan` and `auto` still asked with `probe`, even with a stored rule, pre-approval or class table; `dontAsk` refused (7.68.5: a person, with the real-approval bit, or refused). Bash 3.2 / 5.2 runs the measured complete line before the one it cannot parse, and bash 3.2 / 5.2, dash, zsh and ksh run the measured unterminated here-documents with their bodies taken to the end of the text (`DESIGN-4862.md` §2 S02, S01/S05/S06/S34; `local-shells.out`, same rows). The 7.68.6 notes' sentence "the same removal or read written plainly (`rm -rf /usr`, `rm -rf ~`, `cat .env`) is still stopped in every mode" did not hold for these texts. From this release it holds for a removal or read written before the point where the lexer stops; it still does not hold for one written after a construct the lexer itself cannot read past although bash 5.2 can in the review leg's measured forms (KL-4862-e).
|
|
17
|
+
- **And a gap older than 7.68.6.** A command written in a parameter expansion's operand — `echo "${X:-$(cat .env)}"`, `${X-…}`, `${X:=…}`, `${X:+…}`, `${X:?…}`, `${X#…}`, `${X%…}`, `${X/…/…}`, a backquote or (outside double quotes) a `<(…)` there — was never read: the engine saw one word it could not read, an ordinary question, so the read or the removal inside ran wherever that question was answered (the review leg measured the `${X:-$(cat .env)}`, `${X:-$(rm -rf ~)}` and `${X#$(rm -rf /usr)}` operand forms running under `bypassPermissions` on both read faces on 7.68.5 and 7.68.6: `table-a.txt`).
|
|
18
|
+
- **Now.** The segments the lexer read in full before it stopped go through every judge — a protected-location removal is a person's (`dangerous_delete`, the bit) in every mode, or refused without a question (`dontAsk` and the blanket-answer arm), a deny-listed read is refused, a write-protected target and the read roots are judged — and the text from where it stopped stays the one ordinary question beside them. An unterminated here-document is read as the measured shells read it (`DESIGN-4862.md` §2 S01/S05/S06/S34; `local-shells.out`), so a shell or `xargs` fed one (`bash <<EOF⏎rm -rf ~`) is judged on that body. The substitutions written in an operand are planned as any substitution is; the operand is read as the shell quotes it — outside double quotes a single-quoted part (`${X:-'$(cmd)'}`) runs nothing and is not read as running, inside them (`"${X:-'$(cmd)'}"`) it runs and is read (`DESIGN-4862.md` §2 S23/S24; `local-shells.out`); the inner-double-quote variant (`${X:-"'$(cmd)'"}`) is also read (pinned; shell execution not measured here); a substitution that cannot be delimited there keeps the ones read before it, and the expansion itself stays the ordinary question. A literal written to a file and then sourced splices what the lexer read of it. Each of the nine forms first measured reads, in every mode × answerer × read face, as the same sentence without its tail (pinned); kin whose statement alone is an ordinary question are pinned only as “not looser”, and the wider gate matrix excepts the rule lane's length bound (KL-4862-c: a person's deny rule becomes a question with the real-approval bit, refused where nobody may be asked).
|
|
19
|
+
- **Net, for a reader coming from 7.68.5.** 7.68.6's widening stays: a text the engine cannot read, and a delete whose target is hidden from it — a stream (`echo /usr | xargs rm -rf`), a substitution's output (`rm -rf "$(printf /usr)"`), a script put together when the command runs (`printf 'rm -rf /usr\n' | bash`, `bash -c "$(echo rm -rf ~)"`, `printf 'cat .env\n' | bash`) — is an ordinary question (cell for cell as 7.68.6, pinned). What is written plainly before the point where the lexer stops, and what is written in an operand, is judged at least as strictly as the same statement written alone (pinned, except KL-4862-c: past the rule lane's length bound, a person's deny rule becomes a question with the real-approval bit instead of the refusal; kin whose statement alone is an ordinary question require only “not looser”); the text from that point on is the unread part, the ordinary question as on 7.68.6, and a statement written there runs wherever that question is answered (KL-4862-d, KL-4862-e).
|
|
20
|
+
- **Stricter than the shell — open to veto.** Every statement read in full before the stop is judged as one that MAY run. A quote left open on the SAME line stops bash before any of that line runs, so `cat .env; echo "x` is now refused although bash would have refused the whole line (7.68.6: released; nothing was read). The same holds for the measured `&&`-and-newline and unclosed `for` body in bash 3.2 / 5.2 and dash (`DESIGN-4862.md` §2 S07/S08; `local-shells.out`; KL-4862-a). A person's deny / ask rule now also reaches the command of a segment that owns an unterminated here-document and a command written in an operand (it answered "the call could not be read" there before: a question with the bit, not the rule's own answer).
|
|
21
|
+
- **Not changed.** Class words, class order, which classes carry `requiresRealApproval`, the ordinary question's row; the exports and the closed sets (one optional member is added to the exported type `ShellReadPlan`: `unreadTail`). A text with no readable part (`echo 'x`, `cat <<EOF⏎x`), a removal whose own segment never closes its quote (`rm -rf ~ 'x`: bash runs none of it), and the hidden forms above read cell for cell as on 7.68.6.
|
|
22
|
+
- **Who needs it / who it harms / the compensation.** Needed by runs under `bypassPermissions` or the blanket answer on either face, and on the open face under auto's classifier, a stored rule / pre-approval / class table in `default`, `acceptEdits` or `plan`, or a stored rule / pre-approval in `dontAsk`: the measured typo'd quote or unclosed here-document after `rm -rf ~` or `cat .env` let the statement run; on the narrowed face the other answerers still met `probe` (a question, or refusal in `dontAsk`). Harmed: a model that writes a deny-listed read before a same-line syntax error now gets a refusal instead of a shell error; the corrected text is refused as well (pinned for the gate matrix's statements), so none of those measured statements that could run is lost there. Compensation: none needed for those measured statements.
|
|
23
|
+
- **Pins.** `test/backlog4862-readable-part.test.ts` — the shell facts (bash), the lexer's and the planner's reading, a gate matrix (7 statements a readable command has refused or forcibly asked × 14 tails × 11 arms: never looser than the statement alone except KL-4862-c, the rule lane's length bound, where a person's deny rule is a question with the real-approval bit instead of the refusal), the nine forms and six of their kin × 50 arms (equal to the statement alone for the nine and kin whose statement alone is refused or a person's; only “not looser” for kin whose statement alone is an ordinary question), 20 operand spellings × 3 statements × 11 arms (the operand's own quoting among them), 18 forms that must not move × 11 arms (equal, cell for cell, to their reading measured before this change).
|
|
24
|
+
- **Consumers.** @server @cli: a black-box cell that pinned 7.68.6's release of `rm -rf ~; cat <<EOF` / `cat .env⏎echo 'x` reads the 7.68.5 answer again (a person with the bit / refused); `echo "${X:-$(cat .env)}"` is newly refused, stricter than 7.68.5 as well as 7.68.6 (it ran under `bypassPermissions` on both); the hidden forms (`… | xargs rm -rf`, `printf … | bash`, `rm "$(printf …)"`, `bash -c "$(echo rm ~)"`) do not move. @test: the forms, expected readings and error codes are in this release's receipt.
|
|
25
|
+
- **Known limits.** KL-4862-a (statements the shell does not reach, judged as runs), KL-4862-b (a host shell that is zsh or ksh), KL-4862-c (the rule lane's length bound), KL-4862-d (where the lexer itself stops early inside a loop or an operand), KL-4862-e (a statement written after a construct the lexer cannot read past but the shell can — not judged, as on 7.68.6: under `bypassPermissions` or a blanket allow it runs unasked on both faces; auto's classifier and a stored rule / pre-approval / class table clear it on the open face (the latter three in `default`, `acceptEdits` and `plan`; only a stored rule / pre-approval in `dontAsk`); on the narrowed face those other answerers still meet `probe`, and `default` with no answerer still asks).
|
|
26
|
+
|
|
27
|
+
## 7.68.6 — 2026-11-17
|
|
28
|
+
|
|
29
|
+
### What the engine cannot read or verify is an ordinary question, in every mode: a shell text it cannot read and a recursive delete whose target it cannot verify no longer stop `bypassPermissions`; their own class no longer keeps them from the auto-mode classifier or an allow rule; `echo $(( $(date -u +%s) + 3000 ))` runs under `bypassPermissions` with no card on either read face (#4784; the owner's direct ruling — a widening; what it lets run without a question is listed below, open to veto @cli @server @test; narrowing: one, below, open to veto @server — an approver's edit on resume, KL-4784-f; hard-breaking: none)
|
|
30
|
+
|
|
31
|
+
- **Before.** Since 7.49.0 the removal guard's two "could not check" questions — `unverifiable_shell_text` (a shell handed text the engine cannot read: `eval` over a built text, `… | sh`, `bash <(…)`, an expanding here-document fed to a shell, a text the lexer could not read, an arithmetic expansion whose evaluator reads back what a command substitution prints) and `unverifiable_delete` (`rm -rf` whose target the command does not settle: `rm -rf "$X"`, `… | xargs rm -rf`, an operand under a launcher-moved directory) — read the dangerous-removal breaker's row: `bypassPermissions` did not release them, the auto-mode classifier was not asked, no allow rule or "don't ask again" cleared them, and each carried `requiresRealApproval` (a blanket `onAsk: "allow"` and a class table could not answer it; a terminal reads that bit as "only a person"). So `echo $(( $(date -u +%s) + 3000 ))` stopped a `bypassPermissions` run and an `auto` run alike.
|
|
32
|
+
- **Now.** The two classes read the ordinary question's row (one frozen object with `ordinary`): `bypassPermissions` releases them (disclosed on `tool_end.gate.disposition.released`, as any release); their class no longer withholds the auto-mode classifier or an allow rule; `dontAsk` refuses them unless an allow covers the call; a class table (`declareClassAnswers`) may list them. The removal guard mints `requiresRealApproval` for neither any more (the bit is minted where the guard's class explains it — `RRA_EXPLAINERS` — and these two left that set); the read station's check that did not finish keeps it (below).
|
|
33
|
+
- **Read face (what the widening reaches).** On the open read face (`readFace: "open"`) `auto` hands these questions to the classifier, and a stored rule, a pre-approval or a class table clears them under `default`. On the narrowed face (`roots`, the engine's default) most of these commands also carry the read station's `probe` for the same unreadable text — one card, two classes — and the `probe` row there gives no classifier and no rule: such a call is still put to a person under `auto` and is not cleared by a rule, a pre-approval or a class table under `default` (`echo /usr | xargs rm -rf`, which raises no `probe`, is). A blanket `onAsk: "allow"` answers them on either face, and `bypassPermissions` releases both on either face. The `probe` half is #4789 (7.69.1).
|
|
34
|
+
- **What this lets run without a question — open to veto (@cli @server @test).** The two classes are ordinary questions now, so what clears an ordinary question clears them: a person's stored `Bash` allow (a whole-tool allow measured; a prefix allow read from the rows, not measured), a pre-approval, a host's blanket `onAsk: "allow"`, a class table, the auto-mode classifier and `bypassPermissions` — except that on the narrowed read face the read station's `probe` riding on the same card still holds most of these commands for a person (above). A command the engine cannot read then runs without being asked about, and the engine does not know what it reads, writes or removes. Measured on this release, one real run per cell, in `default` mode unless the column says `auto`; each cell reads narrowed read face (the default) / open read face; "asked" = put to a person (who said no); every removal ran under an inert shell, never a real one:
|
|
35
|
+
|
|
36
|
+
| Command | blanket `onAsk: "allow"` | stored whole-tool `Bash` allow | pre-approval (`allowedTools: ["Bash"]`) | class table (the classes a rule may clear) | `auto` (the classifier says yes) |
|
|
37
|
+
|---|---|---|---|---|---|
|
|
38
|
+
| `printf 'cat .env\n' \| bash` (`.env` deny-listed) | runs, reads it / runs, reads it | asked / runs, reads it | asked / runs, reads it | asked / runs, reads it | asked / runs, reads it |
|
|
39
|
+
| `printf 'cp f.txt .bashrc\n' \| bash` (`.bashrc` write-protected) | runs, writes it / runs, writes it | asked / runs, writes it | asked / runs, writes it | asked / runs, writes it | asked / runs, writes it |
|
|
40
|
+
| `rm -rf "$(printf /usr)"` | runs / runs | asked / runs | asked / runs | asked / runs | asked / runs |
|
|
41
|
+
| `printf 'rm -rf /usr\n' \| bash` | runs / runs | asked / runs | asked / runs | asked / runs | asked / runs |
|
|
42
|
+
| `bash -c "$(echo rm -rf ~)"` | runs / runs | asked / runs | asked / runs | asked / runs | asked / runs |
|
|
43
|
+
| `echo /usr \| xargs rm -rf` | runs / runs | runs / runs | runs / runs | runs / runs | runs / runs |
|
|
44
|
+
|
|
45
|
+
- On 7.68.5 every cell of that table was put to a person, and under the blanket allow refused without a question. Under `bypassPermissions` (a separate measurement) the four removals and the `.env` read run on both read faces and the `.bashrc` write runs on the narrowed face (its open face not measured). Beside a deployment policy's own bare real-approval bit, `ls junk | xargs rm -rf` now goes to the classifier under `auto` on both read faces (7.68.5: a person; measured): the bit's own row (`policy_rra`) admits the classifier, and the delete's class no longer withholds it (read from the rows). The same removal or read written plainly (`rm -rf /usr`, `rm -rf ~`, `cat .env`) is still stopped in every mode (KL-4784-b, KL-4784-e). Who notices: a host that answers every question with a blanket `onAsk: "allow"` (unattended runs) — these commands were refused and now run, on either read face; a person who stored a whole-tool `Bash` allow, a run with a pre-approval or a class table, and an `auto` run — on the open read face they used to stop for one question and now run, on the narrowed face they still ask, except the `xargs` form, which now runs; and every `bypassPermissions` run.
|
|
46
|
+
- **Not widened: a read check that did not finish — as in 7.68.5.** The read station's own state — the environment did not answer a lookup of the command's reads (a symlink it would not resolve, a home-anchored deny row such as `~/.npmrc` on an environment that declares no home), a deny floor whose spellings passed the station's bound (sixty-five values that may not have run), or a judge that hung past the gate's bound or threw — is in practice "the read-deny table was not judged", and the built-in credential rows are always there; releasing it would let an environment fault or a long spelling step past the read-deny table. So in every mode and on both read faces it reads as in 7.68.5: the question carries `requiresRealApproval`; `bypassPermissions` does not release it; the auto-mode classifier is not asked; a stored rule, a pre-approval, a blanket `onAsk: "allow"`, a class table and the read-only command arm do not answer it; `dontAsk` refuses it; a person answers it. Its class set is `unverifiable_shell_text` beside `policy_rra` (the bit no class explains, now that the shell-text class left the explainers); the class fold reads that pair as the removal breaker's row (no classifier, a hook's ask beside it floored). Known limitation KL-4784-d: such a card's class word is usually `policy_rra` (its headline reads "This deployment's policy asks for your approval here.", and beside a stored allow rule the reason the rule does not clear it reads "the deployment's policy requires a real approval for this call"), while the actual reason is that the read-deny table was not judged; the card's own sentence is 7.68.5's.
|
|
47
|
+
- **Not changed — and what that covers.** `dangerous_delete` — a removal the engine READS as targeting the filesystem root, a top-level directory, a home, a workspace directory or an ancestor of one — keeps the breaker's row and `requiresRealApproval`: a person under every mode, whether written plainly, through a variable the command sets, after a `cd`, or inside an arithmetic body (`$(( $(rm -rf ~; echo 1) + 1 ))`). It does not cover the same removal delivered through text the engine cannot read (a substitution, a pipe into a shell, `xargs`): that is the widened question above (KL-4784-e). Every other class's row. The class words stay in the closed set (no word added or removed). The default mode still asks one plain question about an arithmetic expansion over a command substitution (`echo $(( $(date -u +%s) + 3000 ))`): its evaluator re-reads the substitution's output, and an array subscript there runs a command — as the reference asks it. A shell text the engine cannot read beside a deployment policy's own bare real-approval bit is put to a person under `auto`, not to the classifier, on both read faces — as in 7.68.5, not a change in this release (measured); the same bit beside a delete whose target the engine cannot verify goes to the classifier (above), so the two classes differ there.
|
|
48
|
+
- **Wire changes (each a widening unless said).** ① `MODE_ARBITRATION.unverifiable_shell_text` and `.unverifiable_delete`: `bypassImmune` true→false, `classifierEligible` false→true, `sandboxAdmission` false→true, `ruleMayClear` false→true, `hookAskFloor` true→false. ② `ASK_CLASSES` order: the two words move from after `dangerous_delete` to after `mode` (just before `unstated`, `ordinary`): the classes a rule may clear stay the tail, so the disclosed word of a set that also holds a class no rule clears is now that class (the headline's "a saved rule would stop this" stays true); a park row written by 7.68.5 whose class set holds one of the two beside another class shows no class word or headline after the upgrade (inferred from the code, not measured: display only; the gate re-judges on resume). An approver's edit on a parked row whose class set is one of the two alone (parked by 7.68.5 or by this release) is refused on resume when the deployment's re-check of the edited input raises a bare real-approval bit, the stored class no longer explaining that bit; 7.68.5 accepted it (measured at the function level, not end to end; KL-4784-f). ③ `RRA_EXPLAINERS` loses the two. ④ `ORIGIN_IMPLIES_REAL_APPROVAL.integrity_guard`: `"at_mint"` → `false` (a guard's question carries the bit exactly when its class explains it). ⑤ On the removal guard's asks of the two classes: `AskRequest.requiresRealApproval` and the parked row's `tool_approval.requiresRealApproval` are absent (were `true`); `mandated` false and `ruleOffersAbsence` no longer `mandated` unless another member says so; the gate kind of a park is the ordinary one. ⑥ The read station's check that did not finish keeps the bit (unchanged); its class set is `["policy_rra", "unverifiable_shell_text"]` (was `["unverifiable_shell_text"]`), so its disclosed `askClass` — on `AskRequest`, the parked row, `tool_end.gate.disposition` (`denied_by_mode` under `dontAsk`), the shadow-reason and headless-remedy sentences — is usually `policy_rra` (was `unverifiable_shell_text`); when a class that sorts before it rides on the same question, that class is the word (measured: `target_unresolved`, `org_rule`, `ask_rule`, `hook`, `operator_forced`, `shell_floor`, `dangerous_delete`), so a reader that routes on the class word should not assume this form shows one word; `foldArbitrationRow` over that pair returns the removal breaker's row (`dangerous_delete`'s). ⑦ `SHADOW_REASON.unverifiable_delete` / `.unverifiable_shell_text`: the "arrived already marked" sentence `ordinary` has. ⑧ Card sentences: "Unverifiable recursive delete (fail-closed unless cleared): …" → "This delete could not be checked first: …"; "Unverifiable shell text (fail-closed unless cleared): …" → "This command could not be checked first: …"; the rows say what could not be checked in plain words and no longer say how the question is cleared.
|
|
49
|
+
- **Who needs it / who it harms / the compensation.** Needed by anyone running `bypassPermissions` or `auto` long tasks: arithmetic over a substitution, `eval`, pipes into a shell and `xargs rm` stopped them. Harmed: a run whose shell text or delete target hides a dangerous removal, a deny-listed read or a write-protected write the engine cannot see now runs it under `bypassPermissions` or a blanket `onAsk: "allow"` on either read face, and — where no `probe` rides beside it (the open read face, or the `xargs` form) — beside a stored whole-tool `Bash` allow, a pre-approval or a class table, and on the classifier's yes under `auto` — the risk the person chose with the mode or the standing allow. Compensation: the protected-location removal and the deny-listed read the engine does read are still stopped in every mode, including inside an arithmetic body; a read check that did not finish is a person's in every mode.
|
|
50
|
+
- **Rules.** −1 row (the breaker row now `dangerous_delete`'s alone; the two hold `ordinary`'s object), −2 explainer members; the removal guard's real-approval bit reads the explainer set (`explainsRealApprovalBit`) instead of a literal; +1 reading in the class fold — the unfinished check's pair (`unverifiable_shell_text` beside `policy_rra`) withholds the classifier and floors a hook, standing in for a class of its own (a closed-set change, not a patch's: 7.70.0 retires the reading with the word).
|
|
51
|
+
- **Pins.** `test/backlog4784-unverifiable-relax.test.ts` — M1 the owner's command, M1/M3/M4 the owner's command, its arithmetic neighbours, the unreadable texts and the deletes × bypass / auto / default / acceptEdits / dontAsk / a pre-approval / a stored rule, on both read faces, M2 arithmetic with no substitution and the stored rule's control, M5 the protected locations under bypass / auto / a pre-approval, M6 a removal in an arithmetic body, M7 ssh / scp under bypass, P1 the parked row's bits (and nothing parked under bypass), R1 the rows; `test/backlog4784-fix1-unfinished-check.test.ts` — U1 the read check that did not finish (a symlink the environment does not resolve, no home declared, sixty-five values past the deny floor's bound under a person's `Read(…)` deny rule) × bypass / auto on both read faces, default, acceptEdits, dontAsk, a blanket `onAsk: "allow"`, a class table, a pre-approval, a stored rule: refused before the program runs, the classifier never asked, no protected byte in the tool text; U2 the pair's row and the hook floor; U3 the same beside the session-transcript guard and an organization rule (the silence's bit stays bare), and the removal guard's shell-text ask still ordinary; `test/backlog1694-failing-resolver-is-not-no-face.test.ts` E5–E5d (default, acceptEdits, auto, bypass: a person asked, the deny-listed bytes never read); earlier pins of the breaker row (#1534, #1505) re-pinned to the new row, and #1672 ③ and #1329b W4 to the widened delete (the ordinary row); the read-check cells of #1693, #1672, #955 (two files), #1092 and #1329b W7 read as in 7.68.5 but for the disclosed word (`policy_rra`, or `target_unresolved` where the written target was not resolved either); 34 earlier pin files change against 7.68.5 in all. The read-check pins #1653, #1686, #1293b, #3536, #4060, #4067, #4077, #3562, #1709 and #3203 pass unchanged (their files are 7.68.5's).
|
|
52
|
+
- **Consumers.** @cli @server: the read check that did not finish still carries `requiresRealApproval` ("only a person"); its class word is `policy_rra` now (KL-4784-d). @cli: the "safety-class ask (blanket-allow refused)" line and the "only a person" arm read `requiresRealApproval`, which the removal guard's two asks no longer carry; a card that keys "no rule clears this" off the class word reads `MODE_ARBITRATION`'s new row. @server: an exit table that writes these two classes as "only a person / only a terminal" should treat them like `ordinary`. @client-core: a projection pinning `ASK_CLASSES` order or the five bits of these two rows. @test: bypass / auto regressions for `echo $(( $(date -u +%s) + 3000 ))`, `eval "echo $(date +%s)"` (no card under bypass on either read face; the classifier asked under auto on the open read face, a person on the narrowed one while #4789 is open), `ls x | xargs rm -rf` (no `probe`: no card under bypass, the classifier asked under auto, on either read face), the four removals and the read of KL-4784-e / -b, and the three protected-location removals (still a person under bypass); a read check that did not finish (`cat` of a symlink to a deny-listed file the environment does not resolve, a recursive read on an environment that declares no home) is put to a person under bypass and auto, the protected bytes never read.
|
|
53
|
+
|
|
54
|
+
no-notes: #1694(pins only: `test/backlog1694-failing-resolver-is-not-no-face.test.ts` gains E5b–E5d for the read check that did not finish, listed under Pins above; no change of its own)
|
|
55
|
+
|
|
1
56
|
## 7.68.5 — 2026-11-16
|
|
2
57
|
|
|
3
58
|
### A finished run lets go of what it handed its session's process-level seats: a long-lived host with a mailbox store no longer keeps each session's last leg for the life of the process (#4672; fix; behavior change: one, below, open to veto; narrowing: none; widening: none; hard-breaking: none; closed sets: none; exports: none; wire: none)
|
|
@@ -367,8 +367,6 @@ export declare const SHADOW_REASON: Readonly<{
|
|
|
367
367
|
readonly hook: "an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person";
|
|
368
368
|
readonly ancestor: "the task that delegated this one owns this question";
|
|
369
369
|
readonly dangerous_delete: "this removal targets a protected location (the filesystem root, a top-level directory, a home directory, or a workspace directory or one of its ancestors) — it is cleared by confirming this call, never by an allow rule";
|
|
370
|
-
readonly unverifiable_delete: "this removal could not be verified safe — it is cleared by confirming this call, never by an allow rule";
|
|
371
|
-
readonly unverifiable_shell_text: "the text this shell will run cannot be read by the engine — it is cleared by confirming this call, never by an allow rule";
|
|
372
370
|
readonly transcript_write: "this write targets the session transcript — it is cleared by confirming this call, never by an allow rule";
|
|
373
371
|
readonly org_rule: "an organization policy rule requires approval for this call";
|
|
374
372
|
readonly rule_unreadable: "a rule that may govern this call cannot currently be read (this deployment's organization policy, a partition of the person's standing rules, or this call against a deny or ask rule), so whether one forbids it is unknown";
|
|
@@ -387,6 +385,8 @@ export declare const SHADOW_REASON: Readonly<{
|
|
|
387
385
|
readonly policy_rra: "the deployment's policy requires a real approval for this call";
|
|
388
386
|
readonly artifact_shared_read: "this read targets another task's shared artifact — it is cleared by confirming this call";
|
|
389
387
|
readonly mode: "the permission mode puts this question to a person";
|
|
388
|
+
readonly unverifiable_delete: "this call arrived already marked as requiring confirmation (an earlier layer of this run, or the task that delegated it, judged it so) — it is cleared by confirming this call, never by a standing allow rule";
|
|
389
|
+
readonly unverifiable_shell_text: "this call arrived already marked as requiring confirmation (an earlier layer of this run, or the task that delegated it, judged it so) — it is cleared by confirming this call, never by a standing allow rule";
|
|
390
390
|
readonly unstated: "this call arrived already marked as requiring confirmation (an earlier layer of this run, or the task that delegated it, judged it so) — it is cleared by confirming this call, never by a standing allow rule";
|
|
391
391
|
readonly ordinary: "this call arrived already marked as requiring confirmation (an earlier layer of this run, or the task that delegated it, judged it so) — it is cleared by confirming this call, never by a standing allow rule";
|
|
392
392
|
}>;
|
package/dist/core/allow-entry.js
CHANGED
|
@@ -450,13 +450,12 @@ export function readAllowRuleShadows(value) {
|
|
|
450
450
|
return undefined;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
+
const ARRIVED_MARKED = "this call arrived already marked as requiring confirmation (an earlier layer of this run, or the task that delegated it, judged it so) — it is cleared by confirming this call, never by a standing allow rule";
|
|
453
454
|
export const SHADOW_REASON = Object.freeze({
|
|
454
455
|
content_question: "the call is the engine's own question to a person",
|
|
455
456
|
hook: "an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person",
|
|
456
457
|
ancestor: "the task that delegated this one owns this question",
|
|
457
458
|
dangerous_delete: "this removal targets a protected location (the filesystem root, a top-level directory, a home directory, or a workspace directory or one of its ancestors) — it is cleared by confirming this call, never by an allow rule",
|
|
458
|
-
unverifiable_delete: "this removal could not be verified safe — it is cleared by confirming this call, never by an allow rule",
|
|
459
|
-
unverifiable_shell_text: "the text this shell will run cannot be read by the engine — it is cleared by confirming this call, never by an allow rule",
|
|
460
459
|
transcript_write: "this write targets the session transcript — it is cleared by confirming this call, never by an allow rule",
|
|
461
460
|
org_rule: "an organization policy rule requires approval for this call",
|
|
462
461
|
rule_unreadable: "a rule that may govern this call cannot currently be read (this deployment's organization policy, a partition of the person's standing rules, or this call against a deny or ask rule), so whether one forbids it is unknown",
|
|
@@ -465,7 +464,7 @@ export const SHADOW_REASON = Object.freeze({
|
|
|
465
464
|
classifier_no_ruling: "the auto-mode classifier could not judge this call, so a person decides",
|
|
466
465
|
requires_user_interaction: "this tool's server declares that a call must be put to a person",
|
|
467
466
|
cross_boundary: MANDATE_DISCLOSURE.cross_boundary_taint,
|
|
468
|
-
operator_forced:
|
|
467
|
+
operator_forced: ARRIVED_MARKED,
|
|
469
468
|
shell_floor: MANDATE_DISCLOSURE.operator_always,
|
|
470
469
|
target_unresolved: MANDATE_DISCLOSURE.target_unresolved,
|
|
471
470
|
write_protection_on_disk: MANDATE_DISCLOSURE.write_protection,
|
|
@@ -475,8 +474,10 @@ export const SHADOW_REASON = Object.freeze({
|
|
|
475
474
|
policy_rra: "the deployment's policy requires a real approval for this call",
|
|
476
475
|
artifact_shared_read: "this read targets another task's shared artifact — it is cleared by confirming this call",
|
|
477
476
|
mode: "the permission mode puts this question to a person",
|
|
478
|
-
|
|
479
|
-
|
|
477
|
+
unverifiable_delete: ARRIVED_MARKED,
|
|
478
|
+
unverifiable_shell_text: ARRIVED_MARKED,
|
|
479
|
+
unstated: ARRIVED_MARKED,
|
|
480
|
+
ordinary: ARRIVED_MARKED,
|
|
480
481
|
});
|
|
481
482
|
function memberPhrase(s) {
|
|
482
483
|
const listed = `${s.entries.join(", ")}${s.omitted !== undefined ? ` and ${s.omitted} more` : ""}`;
|
|
@@ -32,8 +32,6 @@ export declare const ASK_HEADLINE_WHY: Readonly<{
|
|
|
32
32
|
readonly write_protection: "core/engine.ask-headline.write_protection";
|
|
33
33
|
readonly ancestor: "core/engine.ask-headline.ancestor";
|
|
34
34
|
readonly dangerous_delete: "core/engine.ask-headline.dangerous_delete";
|
|
35
|
-
readonly unverifiable_delete: "core/engine.ask-headline.unverifiable_delete";
|
|
36
|
-
readonly unverifiable_shell_text: "core/engine.ask-headline.unverifiable_shell_text";
|
|
37
35
|
readonly transcript_write: "core/engine.ask-headline.transcript_write";
|
|
38
36
|
readonly rule_unreadable: "core/engine.ask-headline.rule_unreadable";
|
|
39
37
|
readonly ask_rule: "core/engine.ask-headline.ask_rule";
|
|
@@ -50,6 +48,8 @@ export declare const ASK_HEADLINE_WHY: Readonly<{
|
|
|
50
48
|
readonly tool_marks_a2a: "core/engine.ask-headline.tool_marks_a2a";
|
|
51
49
|
readonly policy_rra: "core/engine.ask-headline.policy_rra";
|
|
52
50
|
readonly artifact_shared_read: "core/engine.ask-headline.artifact_shared_read";
|
|
51
|
+
readonly unverifiable_delete: "core/engine.ask-headline.unverifiable_delete";
|
|
52
|
+
readonly unverifiable_shell_text: "core/engine.ask-headline.unverifiable_shell_text";
|
|
53
53
|
readonly unstated: "core/engine.ask-headline.unstated";
|
|
54
54
|
readonly ordinary: "core/engine.ask-headline.ordinary";
|
|
55
55
|
}>;
|
|
@@ -403,12 +403,11 @@ export declare function ownedClearanceFacts(d: Extract<PermissionResult, {
|
|
|
403
403
|
* (`denialLimitFallback`: a self-declared one opts the policy's own ask out of automatic
|
|
404
404
|
* resolution, the safe direction, not a defect), so the invariant is pinned at the engine's two
|
|
405
405
|
* mint sites (the gate's fallback re-mint and the inherited station's) rather than thrown at
|
|
406
|
-
* derivation, where a policy's own object could trip it;
|
|
407
|
-
* guard's own record, which no policy composes but a policy wrapping an exported guard can relay beside a
|
|
408
|
-
* bit it cleared, so the bit is pinned at the two guard mint sites (the removal guard's ask, the
|
|
409
|
-
* session-transcript guard's);
|
|
406
|
+
* derivation, where a policy's own object could trip it;
|
|
410
407
|
* - `false` — the origin says nothing about the bit: a `policy` ask may carry it (a safety policy's
|
|
411
|
-
* own mandate) or not, and both are legal
|
|
408
|
+
* own mandate) or not, and both are legal; an `integrity_guard` ask carries it exactly when its guard's class
|
|
409
|
+
* explains it ({@link RRA_EXPLAINERS}: a protected-location removal, the session-transcript write — pinned at
|
|
410
|
+
* those two mint sites) and not for the two the engine raises because it could not read or verify the command.
|
|
412
411
|
*/
|
|
413
412
|
export declare const ORIGIN_IMPLIES_REAL_APPROVAL: {
|
|
414
413
|
readonly content_question: false;
|
|
@@ -420,7 +419,7 @@ export declare const ORIGIN_IMPLIES_REAL_APPROVAL: {
|
|
|
420
419
|
readonly hook: false;
|
|
421
420
|
readonly ask_rule: false;
|
|
422
421
|
readonly denial_limit_fallback: "at_mint";
|
|
423
|
-
readonly integrity_guard:
|
|
422
|
+
readonly integrity_guard: false;
|
|
424
423
|
readonly shell_gate_tighten: false;
|
|
425
424
|
readonly safety_tighten: false;
|
|
426
425
|
readonly policy: false;
|
|
@@ -648,10 +647,11 @@ export type ToolMarkSource = "deployment" | "mcp_annotation" | "a2a_default";
|
|
|
648
647
|
* `dangerous_delete` is a removal whose target is a protected location (`dangerousRemovalOf`: the filesystem root, a
|
|
649
648
|
* top-level directory, a home directory, or a workspace directory — the task root, the working directory, an additional
|
|
650
649
|
* working directory — or an ancestor of one): the reference implementation's dangerous-removal breaker, which no mode,
|
|
651
|
-
* allow rule or classifier answers. `unverifiable_delete` is
|
|
652
|
-
* `unverifiable_shell_text` is a shell handed text the command does not spell (a program's output, a substitution,
|
|
653
|
-
* file's content, an argv a stream fills in): the engine cannot read what that shell will execute.
|
|
654
|
-
*
|
|
650
|
+
* allow rule or classifier answers. `unverifiable_delete` is a recursive forced removal whose target the command text cannot
|
|
651
|
+
* resolve; `unverifiable_shell_text` is a shell handed text the command does not spell (a program's output, a substitution,
|
|
652
|
+
* a file's content, an argv a stream fills in): the engine cannot read what that shell will execute. What the engine cannot
|
|
653
|
+
* read or verify is no reason to ask more strictly than an ordinary question, so those two read the ordinary row
|
|
654
|
+
* ({@link ORDINARY_ROW}); they stay words of their own for the reason a card and a release name.
|
|
655
655
|
* `rule_unreadable` is a rule that may govern the call and cannot be read for it: the organization's snapshot, a partition of
|
|
656
656
|
* the person's store, or this call against a deny / ask row (the lexer's word, a content row, the read station's rows).
|
|
657
657
|
* `write_protection` and `write_protection_on_disk` are the two readings of one table hit, judged per written target and never
|
|
@@ -660,7 +660,7 @@ export type ToolMarkSource = "deployment" | "mcp_annotation" | "a2a_default";
|
|
|
660
660
|
* an innocent spelling the disk carries onto a guarded path, which the auto-mode classifier does not answer). A command
|
|
661
661
|
* writing several targets may carry both.
|
|
662
662
|
*/
|
|
663
|
-
export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "
|
|
663
|
+
export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "transcript_write", "org_rule", "rule_unreadable", "ask_rule", "denial_limit_fallback", "classifier_no_ruling", "requires_user_interaction", "cross_boundary", "operator_forced", "shell_floor", "target_unresolved", "probe", "write_protection_on_disk", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "policy_rra", "artifact_shared_read", "mode", "unverifiable_delete", "unverifiable_shell_text", "unstated", "ordinary"];
|
|
664
664
|
export type AskClass = (typeof ASK_CLASSES)[number];
|
|
665
665
|
/** Membership test for {@link AskClass} — the word crosses the wire on `tool_end.gate.disposition`. */
|
|
666
666
|
export declare function isAskClass(v: unknown): v is AskClass;
|
|
@@ -724,27 +724,13 @@ export declare const MODE_ARBITRATION: {
|
|
|
724
724
|
readonly ruleMayClear: false;
|
|
725
725
|
readonly hookAskFloor: false;
|
|
726
726
|
};
|
|
727
|
-
readonly dangerous_delete:
|
|
727
|
+
readonly dangerous_delete: {
|
|
728
728
|
readonly bypassImmune: true;
|
|
729
729
|
readonly classifierEligible: false;
|
|
730
730
|
readonly sandboxAdmission: false;
|
|
731
731
|
readonly ruleMayClear: false;
|
|
732
732
|
readonly hookAskFloor: true;
|
|
733
|
-
}
|
|
734
|
-
readonly unverifiable_delete: Readonly<{
|
|
735
|
-
readonly bypassImmune: true;
|
|
736
|
-
readonly classifierEligible: false;
|
|
737
|
-
readonly sandboxAdmission: false;
|
|
738
|
-
readonly ruleMayClear: false;
|
|
739
|
-
readonly hookAskFloor: true;
|
|
740
|
-
}>;
|
|
741
|
-
readonly unverifiable_shell_text: Readonly<{
|
|
742
|
-
readonly bypassImmune: true;
|
|
743
|
-
readonly classifierEligible: false;
|
|
744
|
-
readonly sandboxAdmission: false;
|
|
745
|
-
readonly ruleMayClear: false;
|
|
746
|
-
readonly hookAskFloor: true;
|
|
747
|
-
}>;
|
|
733
|
+
};
|
|
748
734
|
readonly transcript_write: {
|
|
749
735
|
readonly bypassImmune: false;
|
|
750
736
|
readonly classifierEligible: true;
|
|
@@ -878,6 +864,20 @@ export declare const MODE_ARBITRATION: {
|
|
|
878
864
|
readonly ruleMayClear: false;
|
|
879
865
|
readonly hookAskFloor: false;
|
|
880
866
|
};
|
|
867
|
+
readonly unverifiable_delete: Readonly<{
|
|
868
|
+
readonly bypassImmune: false;
|
|
869
|
+
readonly classifierEligible: true;
|
|
870
|
+
readonly sandboxAdmission: true;
|
|
871
|
+
readonly ruleMayClear: true;
|
|
872
|
+
readonly hookAskFloor: false;
|
|
873
|
+
}>;
|
|
874
|
+
readonly unverifiable_shell_text: Readonly<{
|
|
875
|
+
readonly bypassImmune: false;
|
|
876
|
+
readonly classifierEligible: true;
|
|
877
|
+
readonly sandboxAdmission: true;
|
|
878
|
+
readonly ruleMayClear: true;
|
|
879
|
+
readonly hookAskFloor: false;
|
|
880
|
+
}>;
|
|
881
881
|
readonly unstated: {
|
|
882
882
|
readonly bypassImmune: false;
|
|
883
883
|
readonly classifierEligible: true;
|
|
@@ -885,13 +885,13 @@ export declare const MODE_ARBITRATION: {
|
|
|
885
885
|
readonly ruleMayClear: true;
|
|
886
886
|
readonly hookAskFloor: false;
|
|
887
887
|
};
|
|
888
|
-
readonly ordinary: {
|
|
888
|
+
readonly ordinary: Readonly<{
|
|
889
889
|
readonly bypassImmune: false;
|
|
890
890
|
readonly classifierEligible: true;
|
|
891
891
|
readonly sandboxAdmission: true;
|
|
892
892
|
readonly ruleMayClear: true;
|
|
893
893
|
readonly hookAskFloor: false;
|
|
894
|
-
}
|
|
894
|
+
}>;
|
|
895
895
|
};
|
|
896
896
|
/** The fence over the arbitration table: `never` while every class has a row. */
|
|
897
897
|
export type ArbitrationTableCoversEveryClass = AssertAllKeysHandled<Exclude<AskClass, keyof typeof MODE_ARBITRATION>>;
|
|
@@ -976,7 +976,7 @@ export declare function screenAskClassMembers(askClass: unknown, classes: unknow
|
|
|
976
976
|
* The OWN half of the class derivation — what ONE ask says about itself through its own members, and the integrity guards
|
|
977
977
|
* its engine record carries for its call (`record`, read by the caller through {@link attestationOf}): the guards are engine
|
|
978
978
|
* findings, never a member, so a policy cannot move a real-approval question into a guard's class. The bare-bit rules are
|
|
979
|
-
* applied over THIS ask's own set: `requiresRealApproval` with no explaining class is `policy_rra
|
|
979
|
+
* applied over THIS ask's own set: `requiresRealApproval` with no explaining class, or beside the shell-text guard, is `policy_rra` ({@link bareBit}); a self-declared
|
|
980
980
|
* `mandated` with no other class is `operator_forced` (a deployment probe's own mandate, read conservatively). Returns the
|
|
981
981
|
* specific classes only — an empty set is "nothing but hesitation", which the caller reads as `ordinary`.
|
|
982
982
|
*/
|
|
@@ -994,7 +994,7 @@ export declare function decisionAskClassesOf(d: Extract<PermissionResult, {
|
|
|
994
994
|
* set is `ordinary`. The two faces the ask was raised under enter HERE and nowhere else, so every reader of the folded row
|
|
995
995
|
* reads it already folded: `readFace` — `roots` takes the classifier's lane from a set that holds a class the narrowed face
|
|
996
996
|
* withholds from it; `askFace` — `shell` reads a class {@link RELEASED_ON_SHELL_FACE} holds as not bypass-immune. Absent
|
|
997
|
-
* faces read the table's own rows. */
|
|
997
|
+
* faces read the table's own rows. A check that did not finish ({@link unfinishedCheck}) loses the classifier and floors a hook. */
|
|
998
998
|
export declare function foldArbitrationRow(classes: ReadonlySet<AskClass>, readFace?: ContainmentFace, askFace?: AskFace): ModeArbitrationRow;
|
|
999
999
|
/**
|
|
1000
1000
|
* The ONE class derivation: the decision half ({@link decisionAskClassesOf}) joined with the gate's own facts —
|
package/dist/core/ask-origin.js
CHANGED
|
@@ -195,7 +195,7 @@ export const ORIGIN_IMPLIES_REAL_APPROVAL = {
|
|
|
195
195
|
hook: false,
|
|
196
196
|
ask_rule: false,
|
|
197
197
|
denial_limit_fallback: "at_mint",
|
|
198
|
-
integrity_guard:
|
|
198
|
+
integrity_guard: false,
|
|
199
199
|
shell_gate_tighten: false,
|
|
200
200
|
safety_tighten: false,
|
|
201
201
|
policy: false,
|
|
@@ -274,8 +274,6 @@ export const ASK_CLASSES = Object.freeze([
|
|
|
274
274
|
"hook",
|
|
275
275
|
"ancestor",
|
|
276
276
|
"dangerous_delete",
|
|
277
|
-
"unverifiable_delete",
|
|
278
|
-
"unverifiable_shell_text",
|
|
279
277
|
"transcript_write",
|
|
280
278
|
"org_rule",
|
|
281
279
|
"rule_unreadable",
|
|
@@ -295,6 +293,8 @@ export const ASK_CLASSES = Object.freeze([
|
|
|
295
293
|
"policy_rra",
|
|
296
294
|
"artifact_shared_read",
|
|
297
295
|
"mode",
|
|
296
|
+
"unverifiable_delete",
|
|
297
|
+
"unverifiable_shell_text",
|
|
298
298
|
"unstated",
|
|
299
299
|
"ordinary",
|
|
300
300
|
]);
|
|
@@ -302,14 +302,12 @@ const ASK_CLASS_SET = new Set(ASK_CLASSES);
|
|
|
302
302
|
export function isAskClass(v) {
|
|
303
303
|
return ASK_CLASS_SET.has(v);
|
|
304
304
|
}
|
|
305
|
-
const
|
|
305
|
+
const ORDINARY_ROW = Object.freeze({ bypassImmune: false, classifierEligible: true, sandboxAdmission: true, ruleMayClear: true, hookAskFloor: false });
|
|
306
306
|
export const MODE_ARBITRATION = {
|
|
307
307
|
content_question: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
308
308
|
hook: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
309
309
|
ancestor: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
310
|
-
dangerous_delete:
|
|
311
|
-
unverifiable_delete: REMOVAL_BREAKER_ROW,
|
|
312
|
-
unverifiable_shell_text: REMOVAL_BREAKER_ROW,
|
|
310
|
+
dangerous_delete: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
313
311
|
transcript_write: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
314
312
|
org_rule: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
315
313
|
rule_unreadable: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
@@ -329,8 +327,10 @@ export const MODE_ARBITRATION = {
|
|
|
329
327
|
policy_rra: { bypassImmune: true, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
330
328
|
artifact_shared_read: { bypassImmune: false, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
331
329
|
mode: { bypassImmune: false, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
330
|
+
unverifiable_delete: ORDINARY_ROW,
|
|
331
|
+
unverifiable_shell_text: ORDINARY_ROW,
|
|
332
332
|
unstated: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: true, hookAskFloor: false },
|
|
333
|
-
ordinary:
|
|
333
|
+
ordinary: ORDINARY_ROW,
|
|
334
334
|
};
|
|
335
335
|
export const ASK_FACES = Object.freeze(["shell", "other"]);
|
|
336
336
|
export function askFaceOf(toolName) {
|
|
@@ -344,7 +344,13 @@ function bypassImmuneOf(c) {
|
|
|
344
344
|
return [...c.classes].some((k) => bypassImmuneOn(k, c.askFace));
|
|
345
345
|
}
|
|
346
346
|
const CLASSIFIER_WITHHELD_ON_ROOTS = new Set(["probe"]);
|
|
347
|
-
|
|
347
|
+
function unfinishedCheck(classes) {
|
|
348
|
+
return classes.has("unverifiable_shell_text") && classes.has("policy_rra");
|
|
349
|
+
}
|
|
350
|
+
function bareBit(d, classes, record) {
|
|
351
|
+
return d.requiresRealApproval === true && (!explainsRealApprovalBit(classes) || record?.guards?.includes("unverifiable_shell_text") === true);
|
|
352
|
+
}
|
|
353
|
+
export const RRA_EXPLAINERS = new Set(["dangerous_delete", "transcript_write", "org_rule", "rule_unreadable", "denial_limit_fallback", "classifier_no_ruling", "ancestor", "artifact_shared_read", "requires_user_interaction", "cross_boundary"]);
|
|
348
354
|
export function explainsRealApprovalBit(classes) {
|
|
349
355
|
for (const c of classes)
|
|
350
356
|
if (RRA_EXPLAINERS.has(c))
|
|
@@ -399,7 +405,7 @@ export function ownAskClassesOf(d, record) {
|
|
|
399
405
|
out.add("hook");
|
|
400
406
|
if (d.decisionReason === "mode")
|
|
401
407
|
out.add("mode");
|
|
402
|
-
if (d
|
|
408
|
+
if (bareBit(d, out, record))
|
|
403
409
|
out.add("policy_rra");
|
|
404
410
|
if (out.size === 0 && d.mandated === true)
|
|
405
411
|
out.add("operator_forced");
|
|
@@ -415,8 +421,9 @@ export function decisionAskClassesOf(d, call) {
|
|
|
415
421
|
export function foldArbitrationRow(classes, readFace, askFace) {
|
|
416
422
|
if (classes.size === 0)
|
|
417
423
|
return MODE_ARBITRATION.ordinary;
|
|
418
|
-
const
|
|
419
|
-
|
|
424
|
+
const unfinished = unfinishedCheck(classes);
|
|
425
|
+
const withheld = unfinished || (readFace === "roots" && [...classes].some((c) => CLASSIFIER_WITHHELD_ON_ROOTS.has(c)));
|
|
426
|
+
let bypassImmune = false, classifierEligible = !withheld, sandboxAdmission = true, ruleMayClear = true, hookAskFloor = unfinished;
|
|
420
427
|
for (const c of classes) {
|
|
421
428
|
const row = MODE_ARBITRATION[c];
|
|
422
429
|
bypassImmune ||= bypassImmuneOn(c, askFace);
|
|
@@ -466,7 +473,7 @@ export function classifyAsk(d, facts) {
|
|
|
466
473
|
classes.add("unstated");
|
|
467
474
|
for (const c of facts.ancestorClasses ?? [])
|
|
468
475
|
classes.add(c);
|
|
469
|
-
if (d
|
|
476
|
+
if (bareBit(d, classes, record))
|
|
470
477
|
classes.add("policy_rra");
|
|
471
478
|
for (const c of record?.foldedClasses ?? [])
|
|
472
479
|
classes.add(c);
|
|
@@ -11,7 +11,7 @@ import { INLINE_TRUNCATION_MARK, inlineUntrusted, UNRENDERABLE_CHAR_CLASS } from
|
|
|
11
11
|
import { catalogRuleFaceOf, catalogToolNames, hostTargetOf, isShellFaceToolName, pathTargetOf, protectivePathTargetOf } from "./tool-registry.js";
|
|
12
12
|
import { HOST_UNREADABLE_SENTENCE, hostPatternAdmits, readHostPattern, spelledHostPattern } from "./host-target.js";
|
|
13
13
|
import { heldBy, heldValues, wireOf } from "./tool-name-readings.js";
|
|
14
|
-
import { carriesDotSegment, isAbsoluteForFamily, isIdentityDir, isPathIdentity, isShellRootedSpellingUnmapped, isUncIdentity, pathFamilyOf, pathIdentityOf } from "../tools/fs/safety.js";
|
|
14
|
+
import { carriesDotSegment, isAbsoluteForFamily, isIdentityDir, isPathIdentity, isShellRootedSpellingUnmapped, isUncIdentity, pathFamilyOf, pathIdentityOf, shellDriveSpellingOf } from "../tools/fs/safety.js";
|
|
15
15
|
import { bindPathRules, judgeRuleRows, rowsWhereTheyLead } from "./path-rule-binding.js";
|
|
16
16
|
import { readShellCommand } from "./shell-run-candidates.js";
|
|
17
17
|
import { lineDescriptorsOfText, readOnlyLineObjection, readOnlyShellVerdict } from "./read-only-shell.js";
|
|
@@ -1330,7 +1330,8 @@ function resolveCdSegmentDirectories(segments, cwd) {
|
|
|
1330
1330
|
if (!priorCd && movesShellCursor(segment))
|
|
1331
1331
|
priorCd = true;
|
|
1332
1332
|
const bases = basesOfCwd(cwd);
|
|
1333
|
-
|
|
1333
|
+
const family = pathFamilyOf(bases);
|
|
1334
|
+
return dir === undefined || isShellRootedSpellingUnmapped(family, dir) || shellDriveSpellingOf(family, dir) !== undefined ? undefined : directoryIdentityOf(dir, bases);
|
|
1334
1335
|
});
|
|
1335
1336
|
}
|
|
1336
1337
|
export function scopeCoversCwd(scope, cwd, sessionId, identity) {
|
|
@@ -38,7 +38,8 @@ export declare function readStationAnswer(answer: ShellReadVerdict, call: Statio
|
|
|
38
38
|
/** The ask `d` with the silence a station's answer carries, each its own class on the question it keeps or mints: unread rows are a
|
|
39
39
|
* rule that could not be read (the rule lane's class); the finding `unanswered` is, unless rows are unread, the environment's silence —
|
|
40
40
|
* shell text the engine cannot read (a guard, attested on the ask's record for `call` beside the guards it already carries) — and the
|
|
41
|
-
* marks only pick whose. Either is a question only a person answers
|
|
41
|
+
* marks only pick whose. Either is a question only a person answers (the real-approval bit; beside the environment's guard alone no
|
|
42
|
+
* class explains it, and the class fold reads that pair as a check that did not finish); `probe` follows the finding. No silence ⇒ `d` itself. */
|
|
42
43
|
export declare function silencedBy<D extends Extract<PermissionResult, {
|
|
43
44
|
action: "ask";
|
|
44
45
|
}>>(d: D, verdict: ShellReadVerdict, call: {
|
|
@@ -1192,6 +1192,9 @@ export declare function createCoarseCommandNamePolicy(opts: {
|
|
|
1192
1192
|
* dialog (908517 / 909563) and re-attaches a matching user `ask` rule on the auto-mode surface (461507).
|
|
1193
1193
|
* Core has neither a persisted always-allow surface nor rule re-attachment — noted for whichever UI layer
|
|
1194
1194
|
* grows one.
|
|
1195
|
+
*
|
|
1196
|
+
* The bit now rides only the protected-location question; a target or shell text the guard could not read or verify is an ordinary
|
|
1197
|
+
* question — what the engine cannot read is no reason to ask more strictly (the class rows, `MODE_ARBITRATION`, say the rest).
|
|
1195
1198
|
*/
|
|
1196
1199
|
export declare function createUnverifiableDeletePolicy(opts?: {
|
|
1197
1200
|
/** Extra variable names treated as well-known-safe roots, ADDED to the default set `TMPDIR`/`HOME`
|
|
@@ -1899,7 +1902,7 @@ export declare function isPolicyApprover(v: unknown): boolean;
|
|
|
1899
1902
|
* and its call reaches the same answer.
|
|
1900
1903
|
*
|
|
1901
1904
|
* Only the classes a standing rule may clear can be declared — the column `ruleMayClear` of
|
|
1902
|
-
* {@link import("./ask-origin.js").MODE_ARBITRATION} (today `
|
|
1905
|
+
* {@link import("./ask-origin.js").MODE_ARBITRATION} (today `unverifiable_delete`, `unverifiable_shell_text`, `unstated` and `ordinary`): a table is a deployment's answer
|
|
1903
1906
|
* to the questions the allow layer itself may answer, by class instead of by tool. A question the engine mints demanding a
|
|
1904
1907
|
* person ({@link AskRequest.requiresRealApproval}) always carries a class outside that column, so no table covers it; a
|
|
1905
1908
|
* hand-built request carrying the bit beside a covered set is answered by the table and refused by the real-approval arm,
|
package/dist/core/tool-policy.js
CHANGED
|
@@ -3,7 +3,7 @@ import { homedir } from "node:os";
|
|
|
3
3
|
import { argsReadFrom, carryArgsReadFrom, withArgsReading } from "./effective-path-target.js";
|
|
4
4
|
import { editRewrittenSentence, readRejudge, rewriteChasedSentence } from "./rewrite-rejudge.js";
|
|
5
5
|
import { brandPolicyAskClass } from "./ask-class.js";
|
|
6
|
-
import { ASK_CLASSES, decisionAskClassesOf, headlessDenialMessage, joinAskReasons, MODE_ARBITRATION, unresolvedAskDenialMessage } from "./ask-origin.js";
|
|
6
|
+
import { ASK_CLASSES, decisionAskClassesOf, explainsRealApprovalBit, headlessDenialMessage, joinAskReasons, MODE_ARBITRATION, unresolvedAskDenialMessage } from "./ask-origin.js";
|
|
7
7
|
import { attest, attestationOf, engineSentenceOf, isEngineAttestation, mergeAttestation, mintAttestation, withAttestation } from "./engine-attestation.js";
|
|
8
8
|
import { ownReadRootCandidate, readRootGrantSeat } from "./read-root-grant-screen.js";
|
|
9
9
|
import { liveWordsOf } from "./approval-words.js";
|
|
@@ -799,7 +799,7 @@ export function createUnverifiableDeletePolicy(opts) {
|
|
|
799
799
|
}, "external_authority");
|
|
800
800
|
}
|
|
801
801
|
function removalAsk(req, verdict) {
|
|
802
|
-
return attest({ action: "ask", decisionReason: "safety", requiresRealApproval: true, message: verdict.text }, req, { guards: [verdict.guard], sentence: { text: verdict.text, guard: verdict.guard } });
|
|
802
|
+
return attest({ action: "ask", decisionReason: "safety", ...(explainsRealApprovalBit([verdict.guard]) ? { requiresRealApproval: true } : {}), message: verdict.text }, req, { guards: [verdict.guard], sentence: { text: verdict.text, guard: verdict.guard } });
|
|
803
803
|
}
|
|
804
804
|
function pathSegments(p) {
|
|
805
805
|
return p.split(/[\\/]/).filter(Boolean);
|
package/dist/shell/lex.d.ts
CHANGED
|
@@ -244,7 +244,12 @@ export interface LexParseFailure {
|
|
|
244
244
|
};
|
|
245
245
|
/** The segments the walk read before it stopped, the last one holding the tokens it had read when it stopped. Bash runs
|
|
246
246
|
* each complete line before it parses the next one (`rm -r x` on line 1 runs although line 2 never closes its quote),
|
|
247
|
-
* so a reader asking what the text MAY run reads these as runs; a reader asking what the text DOES reads the failure.
|
|
247
|
+
* so a reader asking what the text MAY run reads these as runs; a reader asking what the text DOES reads the failure.
|
|
248
|
+
* Every segment before the last is such a run — the read station's planner and the deny lanes read the same ones. A
|
|
249
|
+
* here-document the text never terminates is read as the shells read it, to the end of the text: the segment owning it
|
|
250
|
+
* holds that body, and the last segment is an empty one at the text's end. Which of these runs a shell reaches is not
|
|
251
|
+
* decided here (a quote left open on the SAME line stops bash before any of that line runs; zsh parses the whole text
|
|
252
|
+
* first): the reading is of what MAY run. */
|
|
248
253
|
readonly readBefore: readonly LexedSegment[];
|
|
249
254
|
}
|
|
250
255
|
/** A command: its segments, or the one reason it has none. */
|
|
@@ -319,6 +324,19 @@ export declare function parameterArithmeticTexts(body: string): {
|
|
|
319
324
|
readonly subscript?: string;
|
|
320
325
|
readonly offset?: string;
|
|
321
326
|
};
|
|
327
|
+
/**
|
|
328
|
+
* The command lines a parameter expansion's OPERAND runs (`${X:-$(cmd)}` when X is unset or empty, `${X:+$(cmd)}` when it is
|
|
329
|
+
* set, `${X#$(cmd)}` always; measured on bash 3.2 and 5.2, dash, zsh): the command and process substitutions written in it,
|
|
330
|
+
* and those of the arithmetic and parameter expansions written in it — read as the shell expands the operand, left to right.
|
|
331
|
+
* In double quotes (`quoted`) a single quote is an ordinary character there and `<(` is text (`"${X:-'$(cmd)'}"` runs cmd);
|
|
332
|
+
* outside them a single-quoted run is text, a double-quoted run inside the operand reads as in double quotes, and
|
|
333
|
+
* `<(…)` / `>(…)` are process substitutions (`${X:-'$(cmd)'}` runs nothing, `${X:-"'$(cmd)'"}` runs cmd). A substitution's
|
|
334
|
+
* own text is never rewritten (`${X:-$(cat '.env')}` reads `cat '.env'`). A subscript and a substring offset are not operand
|
|
335
|
+
* text ({@link parameterArithmeticTexts}: the evaluator's). The walk stops at an expansion it cannot delimit and keeps what it
|
|
336
|
+
* read before it: the word itself stays unread either way (its braces carry `$`, {@link UNREADABLE_EXPANSION_TEXT}). The
|
|
337
|
+
* one reading of what an operand runs: the deny lanes' lines ({@link expansionRunsOf}) and the read station's nested plans.
|
|
338
|
+
*/
|
|
339
|
+
export declare function parameterOperandLines(body: string, quoted: boolean): readonly string[];
|
|
322
340
|
/** What evaluating an expansion (a word's, a here-document body's) runs, as far as its text shows it. `lines`: the command
|
|
323
341
|
* lines its substitutions run, each a command line of its own — a command or process substitution's body, the list of
|
|
324
342
|
* `${ …; }`, and the substitutions an arithmetic text holds (bash expands that text as double-quoted text first:
|
|
@@ -326,13 +344,18 @@ export declare function parameterArithmeticTexts(body: string): {
|
|
|
326
344
|
* ALSO run a program no line shows — the arithmetic evaluator evaluates a NAME recursively (`a='x[$(…)]'; $((a))`), so
|
|
327
345
|
* arithmetic text that names a variable or carries a `$` may, and so may a parameter expansion's subscript or substring
|
|
328
346
|
* offset (its own or one nested in its text, `${x:-${a[i]}}`), a value it re-reads (`${!R}`, `${P@P}`), and a parameter,
|
|
329
|
-
* brace or glob text that carries a substitution opener
|
|
330
|
-
*
|
|
347
|
+
* brace or glob text that carries a substitution opener. A parameter's operand is word grammar this lexer does not read as
|
|
348
|
+
* words, but the substitutions written in it run (`${X:-$(cmd)}` runs cmd when X is unset, `${X#$(cmd)}` always; measured on
|
|
349
|
+
* bash 3.2 and 5.2, dash, zsh): they are its lines ({@link parameterOperandLines}, the reading the read station's planner
|
|
350
|
+
* takes of the same operand), and the expansion stays hidden — whether the operand is expanded, and what it yields, the
|
|
351
|
+
* text does not say. The one reading of what an expansion runs: {@link expansionHidesRun} is its boolean face. */
|
|
331
352
|
export interface ExpansionRuns {
|
|
332
353
|
readonly lines: readonly string[];
|
|
333
354
|
readonly hidden: boolean;
|
|
334
355
|
}
|
|
335
|
-
|
|
356
|
+
/** `quoted`: the expansion stands in double quotes (a here-document body and an arithmetic text expand as such) — how its
|
|
357
|
+
* operand's quotes read ({@link parameterOperandLines}). */
|
|
358
|
+
export declare function expansionRunsOf(e: WordExpansion, quoted?: boolean): ExpansionRuns;
|
|
336
359
|
/** An arithmetic text's runs: none when it is plain ({@link arithmeticTextIsPlain}); else hidden (the evaluator may run
|
|
337
360
|
* what a value names), with the lines of the substitutions it holds, read as double-quoted text
|
|
338
361
|
* ({@link expansionsInHeredocBody}: quotes are ordinary characters there). */
|