Repository navigation
feat(agent): propose_files_rule, its card, the hidden-path ask, the defaults in every view, the policy page's files form (PR C1) - #2218
wanderdev0 wants to merge 9 commits into
Conversation
…del would have it (PR C1 rows) Rows for PR C1, failing at this head where the tool does not exist: - the tool is the worker's own (WORKER_ONLY_TOOLS, registry-declared); a page's START_RUN that lists it gets no offered tool, no card and no stored rule. - offered only with ml.sh on, a root set and a host answering: each absence alone leaves it off the run's list. - refused before any card: a pattern outside every root, a rule the scope already holds, a credential directory's show (the three provisional texts the coordinator sent). - approval stores the card's rule at the session with origin "proposed"; the model's scope/origin/id args are ignored; a decline stores nothing at either scope. - a reason is cut to 200 with an ellipsis, drawn on one line, and the config's key in it never reaches the card. - a show's card whose glob the host did not answer says so, lists no paths, and its approval still adds the rule. - guards: propose_policy still refuses the files consumer; patternRefusal still refuses credential directories; ml.table's hidden-file sentence names the tool only where offered, no run of two spaces either way. redteam-files-hide gains the view row: a session with no files rule still shows the four default holds, and nothing removes one. Co-Authored-By: Claude Code <noreply@anthropic.com>
… a show that can reach a template The show() default moves to a held non-template name (.env.local) now that a show whose pattern can match a dotenv template is refused before any card, and the rows cover: the template refusal for a literal, a `*`, a `[...]` and a `?` pattern and under a person's hide, with a show that reaches none still a card; Always (`persist: true`) storing a global rule only on a card that offered it, and a denial that stores nothing on one that did not (a session show over a global hide, the global layer at 256) or on a plain decline; and a forged decision through __mlApprovals whose `arguments` differ from the call's, which must deny and write nothing. Co-Authored-By: Claude Code <noreply@anthropic.com>
…nd the scrub's minimum key The card is pinned as renderIn.type "files-rule" with always true on a normal hide and false on a session show over a global hide and at a full global layer; a decline reads Denied while an answer the card did not offer reads Not added; the forged-arguments row pins the other half (the card's rule is stored, no layer carries the forged pattern), since every resolve path drops arguments; and the reason row's config key is past the scrub's 12-character minimum, with a registered value beside it. Co-Authored-By: Claude Code <noreply@anthropic.com>
…s card, the hidden-path ask and the policy page's files form (PR C1) - propose_files_rule: a gated worker tool offered with ml.sh; the precheck refuses what the worker would not add (outside a root, a rule a scope holds, a full session, a credential directory, any show that can reach a dotenv template) with no card. - The card (renderIn type files-rule): the rule, the model's reason scrubbed and cut, for a show the files it matches now (the host's glob, or the browser copy's listing through the reader's own matcher and name mask); This session, Always where offered, Deny. - The resolve stores only the card's rule, at the session or globally on persist where the card offered Always. - askWhy cause hidden-path, with one words map for the four defaults shared with the spawn card line; ml.table's hidden-file sentence names the tool only where it is offered. - The four files defaults in every session's view; the policy page's own form and rows for global hiding rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… defaults; the hiding-rule form is not a setting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Spec, dev-doc and model-facing text read at 1c242d5 (
Departures 1 to 6 of the lane's message: accepted as built. 3 (the card's reason through No change asked on
|
…ules it, who lifts the tool's interim refusal, only a person's answer adds a rule; the tool's pattern names /files/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Text at 079c6c0: all six points of 7287382472 are in, read as the delta from 1c242d5 ( This covers the text only. The head that may merge is janitor-2's to name.
|
|
Reviewed at
|
… in every session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR C1 of the hiding rules (POLICIES.md, "Hiding files"): the model's proposal tool, its card, the ask's cause line for a hidden path, the four defaults in every session's view, and DevTools Settings' own form for
filesrows. Red-team rows: e3'stests/redteam-files-propose.test.mjs(18 rows, merged fromredteam/files-propose-rowsat d760b67; 17 failed before this code, the guard row passed).What it adds
propose_files_rule(src/tools/propose-files-rule-tool.ts): gated,realm: "worker", inWORKER_ONLY_TOOLS, dropped from a page's start, offered besidepropose_manifestonly while ml.sh is offered.src/sw/files-rule-proposal.tscheckFilesProposal) answers the model with no card for: bad arguments, a patternpatternRefusalrefuses, ashowwhose last segment can match a dotenv template, a pattern outside every root, a rule the session or the global layer already holds, and a session already holding 256 rules.renderIntypefiles-rule, built and frozen in the worker,src/sw/sw-files-proposal.ts):forModel(backend key and registered values) and cut to 200 characters on one line;show, the files it matches now: the host'sglobin the root (counted to 1000, 50 listed), or for a/files/...pattern the browser copy's listing, matched withresolveHiddenand shown through the listing's name mask;hideis overridden and the global layer is under 256) and Deny.persistand the card offered Always. Apersiston a card without Always stores nothing. No resolve path carries a decision'sarguments, so a forged one never chooses the rule (e3's row pins this).hidden-pathaskWhy cause:<path> is hidden by <rule words>, so this call asks.DEFAULT_RULE_WORDS(files-hide.ts) names the four defaults for both this line and the spawn card'shidden by ….ml.table's hidden-file error names the tool only in a run that offers it. A JSDoc hint onhiddenSecretsnames it too.filesdefaults in every session, with or without a stored rule. The UPGRADE fixture infiles-hide-policies.test.mjsnow asserts them.POLICIESopsaddFilesandremoveFiles, throughaddFilesRuleandremoveFilesRule. The policy page draws a hiding rule as its own row with no Edit. Removing ahidenames what would decide instead and asks for confirmation.tests/fake-native-host.mjsanswersglob.Not in it
showis not built: window-ml-host's main releases the template, and the repair is files-host's. Until it lands, the tool refuses everyshowthat can reach a template. POLICIES.md says so.Tests
tests/redteam-files-propose.test.mjs(e3): 18 rows pass.tests/files-rule-proposal.test.mjs:/filespreview row asserting the card's list equalsresolveHidden's decision over a flat fixture, for 14 patterns;builtin-registry.test.mjs,agent.test.js), and the view's default rows (files-hide-policies.test.mjs,policy-effective-view.test.mjs).🤖 Generated with Claude Code