Skip to content

Agent Mode: add trusted local skills support#644

Open
AnthonyRonning wants to merge 2 commits into
masterfrom
codex-maple-agent-skills-mvp-maple
Open

Agent Mode: add trusted local skills support#644
AnthonyRonning wants to merge 2 commits into
masterfrom
codex-maple-agent-skills-mvp-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • register Goose’s first-class SkillsClient in every Agent Mode session, exposing the exact load_skill tool and personal skills from ~/.agents/skills
  • discover project .agents/skills only after a one-time, account-scoped Trust this folder? decision; persist both trust and decline decisions by canonical folder path
  • keep the Skills client transient so trust-filtered discovery state is never reconstructed from persisted Goose extension config
  • render expandable timeline cards only for actual load_skill calls, with Loading, Loaded, and Couldn’t load outcome-aware titles
  • preserve the existing Maple permission flow for every action a skill requests; only the instruction-loading load_skill call is always allowed

Trust and compatibility

  • untrusted or unreadable project roots fail closed to an account-owned inert discovery directory while personal skills remain available
  • offline historical folders remain loadable without prompting
  • canonical paths make symlink aliases share one decision
  • a user MCP server named skills coexists with Maple’s unprefixed Skills client
  • the runtime-only registration key is longer than Maple’s existing MCP name limit, so no previously valid MCP configuration becomes reserved or unrecoverable

Validation

  • cargo test --all-targets --locked — 128 passed
  • cargo clippy --lib -- -D warnings
  • cargo fmt --check
  • bun run format:check
  • bun run lint — 0 errors; 12 existing warnings outside this change
  • bun run typecheck
  • bun test — 131 passed
  • bun run build
  • nix flake check
  • packaged a debug Maple.app and exercised Agent Mode against the local OpenSecret/billing/Continuum stack

Packaged-app coverage included trusting a project, loading a project skill, declining a different project, confirming a declined project skill is unavailable, loading a personal skill from the declined project, verifying decisions survive new sessions and app restarts, and checking successful and failed skill timeline cards.

Three independent review passes covered backend security/trust boundaries, Goose integration and persistence, and frontend UX/accessibility. All validated findings were fixed and the reviewers reported no remaining actionable issues.


Open in Devin Review

Summary by CodeRabbit

  • New Features

    • Added a project “trust/untrust” prompt for loading project-specific AI skills.
    • Trust is saved per folder and treated as a one-time decision.
    • While the decision is pending, related agent settings controls are temporarily disabled.
  • Bug Fixes

    • Improved the skills loading timeline to use the selected load_skill argument in the displayed titles (including success/failure states).
    • Strengthened reserved-name validation to avoid conflicts with user MCP servers and refined load_skill permission defaults.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1e5d05b-aa39-464c-8c8f-f2e5c8e91e21

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6314c and e2c34d1.

📒 Files selected for processing (1)
  • frontend/src-tauri/src/agent.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src-tauri/src/agent.rs

📝 Walkthrough

Walkthrough

Adds per-project Maple Skills trust decisions, restricted handling for untrusted folders, transient SkillsClient lifecycle management, argument-aware load_skill timeline titles, and shared MCP reserved-key validation.

Changes

Project skills trust and Maple Skills

Layer / File(s) Summary
Trust contract and prompt workflow
frontend/src-tauri/src/agent.rs, frontend/src-tauri/src/lib.rs, frontend/src/services/agentRuntimeService.ts, frontend/src/components/AgentMode.tsx
Adds persisted trust types, Tauri commands, runtime service methods, and an Agent Mode dialog for selecting and saving a folder decision.
Transient Maple Skills client lifecycle
frontend/src-tauri/src/agent.rs
Registers Maple Skills tools, selects trusted or restricted working directories, and reattaches the transient client around session and MCP extension mutations.
Argument-aware load-skill timeline
frontend/src-tauri/src/agent.rs
Uses the requested skill name in timeline titles and merges loading, success, and failure states without overwriting the argument-aware title.
MCP reservation and compatibility validation
frontend/src-tauri/src/agent.rs
Centralizes Maple-reserved MCP key checks and updates related registration, permission, migration, and compatibility tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AgentMode
  participant agentRuntimeService
  participant TauriAgent
  participant AgentConfig
  AgentMode->>agentRuntimeService: request project skills trust
  agentRuntimeService->>TauriAgent: invoke trust command
  TauriAgent->>AgentConfig: read or persist canonical path decision
  AgentConfig-->>TauriAgent: return trust status
  TauriAgent-->>agentRuntimeService: return status
  agentRuntimeService-->>AgentMode: display or close trust dialog
Loading

Possibly related PRs

Poem

I’m a rabbit guarding skills at night,
Trust the path, or keep it out of sight.
Maple tools hop in with care,
Titles bloom in timeline air.
Reserved names stay in their burrow tight.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding trusted local skills support to Agent Mode.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex-maple-agent-skills-mvp-maple

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2c34d1
Status: ✅  Deploy successful!
Preview URL: https://71e1de8b.maple-ca8.pages.dev
Branch Preview URL: https://codex-maple-agent-skills-mvp.maple-ca8.pages.dev

View logs

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

coderabbitai[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant