Skip to content

feat(modes): bundle private roles and skills with scoped delegation - #2548

Merged
Tioit-Wang merged 2 commits into
mainfrom
feat/2544-mode-bundles
Nov 24, 2026
Merged

Tioit-Wang merged 2 commits into
mainfrom
feat/2544-mode-bundles

Conversation

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

Summary

Closes #2544. A mode can travel as a directory: mode.yaml references a prompt and private roles; valid skills are discovered from disk. A present manifest never falls back to mode.md. The existing Settings container has Mode / Subagents / Skills tabs. The session keeps its own model; each private role owns its pins, fallback order and thinking levels.

Task now accepts the original expert request separately from coordinator context, can narrow writes for one delegation, and can queue corrections with TaskSend. The host checks actual write/edit targets and move destinations. Settings edits, cancellation, and resume cannot silently expand a running child's permissions.

Requirement / design

Verification

Candidate 4bd6d4a1f on 7254a0452. Local Windows: full workspace build, desktop typecheck, lint, architecture/base checks, Rust format, all-targets check and clippy. Mode-related desktop/IPC/disk/real Electron suites: 151 passed, 2 skipped (file symlink privilege); junction and hardlink cases passed. Host write scopes: 10/10. Runtime delegation suite: 17/17, including a red/green regression for a truncated user quote. Real Host mode workflow, real sidecar model/fallback and parallel edit isolation passed. Desktop stop/follow-up assertions passed with graceful shutdown in the local test harness.

The broad local suites were run, not all green: Windows desktop full sweep: 5272 passed, 101 failed, 13 skipped (the error-code contract was fixed and rerun separately). Coverage includes macOS signing, POSIX path assumptions, symlink permissions and unrelated UI probes. The host error-code registry regression was fixed and retested. All 22 remaining Rust Windows failures from the normalized-temp run also failed on unmodified origin/main. The docs locale fixture likewise reproduces a path separator mismatch on main. Runtime tests on an isolated temp drive: 2171 passed, 1 skipped, 1 attachment path spelling failure; that suite passed 6/6 on the physical path. The global registry E2E deliberately refuses to touch Windows known folders. CI is the authoritative Linux/integration check.

v_wyxgwang added 2 commits November 24, 2026 16:19
Keep a mode, its private roles and its skills portable without leaking them into other conversations. Resolve the effective catalog in the host and retain legacy Markdown modes when no manifest exists.

Carry the original request separately from coordinator guidance, allow corrections to a live delegate, and enforce optional per-task write limits at the actual filesystem operation.

Closes #2544
Let consumers distinguish an unavailable boundary from a disallowed target or a session that changed during approval. Check the constant used by the host alongside literal RPC errors.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4bd6d4a
Status: ✅  Deploy successful!
Preview URL: https://7bdbfd10.pi-desktop.pages.dev
Branch Preview URL: https://feat-2544-mode-bundles.pi-desktop.pages.dev

View logs

@Tioit-Wang
Tioit-Wang merged commit 8e258d0 into main Nov 24, 2026
7 checks passed
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.

[Feature] 模式目录配置:专属子代理、技能与运行时委派

1 participant