You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "florianaltendorfer (via GitHub)" <gi...@apache.org> on 2026/10/23 05:32:18 UTC

[PR] fix(assistant): limit discovery session tools to a read-only set [maka]

florianaltendorfer opened a new pull request, #6253:
URL: https://github.com/apache/maka/pull/6253

   ## Summary
   
   Closes #6250.
   
   The discovery session is registered as a background session, so `hasSessionAccess` gave it every native assistant tool, including `MatterAdopt`, `MatterControl`, `MemoryIndexWrite` and `MemoryIndexCheckpoint`. It also has no tool ceiling, so the composer gave it the full default Host catalog, including Bash, Edit, Write and subagents. Only the prompt text kept it read-only.
   
   This PR enforces that in the Host:
   
   - The interactive run composer takes an optional session-scoped `filterTools` and applies it to the complete composed catalog, built-in tools included. `execution-composition` wires `PersonalAssistantService.filterTools` into it and into the tool-name listing. Existing assistant filters only drop assistant or `Matter*` names, so other sessions are unchanged.
   - The initiative module registers a discovery filter. Assistant tools are limited to the new `DISCOVERY_TOOLS` set: `DiscoveryReport`, `DiscoveryContext` and the read-only Memory tools. All other tools go through the same read-only rule as Plan mode (`read` / `web_read` category). Read, Grep, Glob, WebFetch, WebSearch and plugin tools declared as `read` stay. Bash, Edit, Write, subagents, client capabilities and untyped or mutating plugin tools are removed.
   
   ## Verification
   
   Extended the existing discovery test in `assistant-bot.test.ts`. It builds the real interactive composer with the built-in shell and edit tools plus foreign read, mutating and untyped tools, then checks the discovery session's catalog. Bash, Edit, Write and the foreign mutating tools are present without the filter and absent with it. Read, Grep, Glob, the foreign read tool and exactly `DISCOVERY_TOOLS` remain. The test fails without the change and passes with it. Runtime-host build and `typecheck`, biome lint and format, `npm run test:assistant`, and `node --test` on `assistant-bot`, `assistant-initiative-boundary`, `execution-model-composition`, `interactive-run-composer` and `matter-settlement-context` all pass.
   
   Not checked: a real desktop discovery session. Plugin tools are classified by their declared `categoryHint`, the same trust Plan mode uses.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Claude Code (Claude Opus) traced the root cause and wrote the change and test; I reviewed them.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(assistant): limit discovery session tools to a read-only set [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #6253:
URL: https://github.com/apache/maka/pull/6253#issuecomment-6358820897

   > **Automated review notice:** This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
   
   CI update for `61873698bd60eb9e9095ad577018ac99ad24e658`: [attempt 2](https://github.com/apache/maka/actions/runs/39906311092/attempts/2) failed in `ShellRun process crash recovery from running does not redispatch`. The fixture reads `ready.json` with `JSON.parse` while its child writes that file directly; the reported error is `Unexpected end of JSON input` at that read. The fixture, npm dependency files and CI workflow are unchanged from this PR's base, whose [main CI passed](https://github.com/apache/maka/actions/runs/39889769633). I have not established a regression caused by this tool-filter change, or independently reproduced this particular CI failure on main.
   
   I reran the failed job once. [Attempt 3](https://github.com/apache/maka/actions/runs/39906311092/attempts/3) is running; CI remains unverified until that result is available.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(assistant): limit discovery session tools to a read-only set [maka]

Posted by "florianaltendorfer (via GitHub)" <gi...@apache.org>.
florianaltendorfer commented on PR #6253:
URL: https://github.com/apache/maka/pull/6253#issuecomment-6413745658

   _Automated reply from the contributor's coding agent._
   
   Rebased onto main (conflict in `execution-composition.ts`). Checking the rebased change turned up two gaps in the allowlist, fixed in fe8b646: with Write, Edit and Bash filtered out, discovery had no way left to write its `operations.json` draft, so a new `DiscoveryDraft` tool writes only the current heartbeat's exploration result file; and the backend adds the `memory_remember` / `memory_extract` triggers after the session filter, so `memoryExtraction` is now only passed when the filter keeps them. I've updated the description to match, sorry it lagged behind the push.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org