Skip to content

Gate MXC recovery guidance by sandbox mode - #397

Merged
yikkuro (yikkuro) merged 3 commits into
mainfrom
allow-mxc-plugin-settings
Nov 18, 2026
Merged

yikkuro (yikkuro) merged 3 commits into
mainfrom
allow-mxc-plugin-settings

Conversation

@yikkuro

Copy link
Copy Markdown
Collaborator

Description

Mitigate common MXC filesystem failures through agent guidance and synchronize generated SOUL.md content with Full/Off mode. Preserve user-customized content and mode-independent command-consent, Windows transport, quoting, and memory guidance.

Related Issue

Relates to #379, #381, #394, and #395. Guidance mitigates these failures; it does not fix upstream metadata or host-loopback restrictions.

Changes

  • Prefer available Gateway-native file tools when their host-side boundary is acceptable, without bypassing denials or claiming contained execution.
  • Discover executable locations before requesting narrow existing-directory RO grants; request an existing parent for new destinations.
  • Explain literal PowerShell filesystem operations, explicit RW declarations, and same-invocation provider initialization for complex scripts.
  • Seed/migrate managed SOUL.md files at startup and agent creation; synchronize on live Full/Off switches before reopening ingress, with rollback and concurrent-edit checks.
  • Remove recognized, unmodified MXC-only sections in Off mode; retain customizations and generic consent guidance. Support legacy LF/CRLF migration.
  • Correct outdated Full/Limited documentation: Full is supported, Off executes on the host, and legacy Limited selections migrate to Full.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • CI/CD or build configuration change
  • Refactoring (no functional changes)

Testing

  • Tests pass locally (cd desktop && npm run test)
  • Renderer tests pass locally (cd desktop/renderer && npm run test)
  • Build succeeds (cd desktop && npm run build)
  • Manual testing performed (describe below)

Full test suites and production build were not run. Targeted commands run from desktop on the merged PR head:

  • npx --no-install vitest run src\windows-node-command-instructions.test.ts src\agent-personas.test.ts src\agent-workspaces-startup.test.ts src\agent-workspaces.test.ts src\windows-node-mxc-live-mode.test.ts src\windows-node-mxc-powershell-scope.test.ts src\windows-node-mxc-toggle.test.ts src\windows-node-mxc-modes.test.ts src\startup-order.test.ts src\config-write-service.test.ts src\model-config-application.test.ts - passed: 11 files, 255 tests; 2 existing pinned-runtime-dependent tests skipped. Existing Vite config-loader warning remains.
  • npx --no-install tsc --noEmit - passed.
  • npx --no-install eslint --quiet src\windows-node-command-instructions.ts src\windows-node-command-instructions.test.ts src\agent-personas.ts src\agent-personas.test.ts src\agent-workspaces-startup.test.ts src\windows-node-mxc-live-mode.test.ts src\windows-node-mxc-powershell-scope.test.ts src\main.ts - passed.
  • npx --no-install prettier --check src\agent-personas.ts src\agent-personas.test.ts src\agent-workspaces-startup.test.ts src\main.ts src\windows-node-command-instructions.ts src\windows-node-command-instructions.test.ts src\windows-node-mxc-live-mode.test.ts src\windows-node-mxc-powershell-scope.test.ts - passed.
  • From the repository root, git diff origin/main...HEAD --check - passed.

Manual development validation before incorporating latest main: npm run dev compiled and launched Electron; renderer and Gateway health returned HTTP 200; MXC reached active Full and application-service-ready. The user successfully cloned a repository, then switched MXC Off. The active main SOUL.md was updated at the switch and no longer contained generated MXC sections or declare-access instructions, while command consent remained ask-when-needed. This is a user-task success, not proof all tool calls were contained.

Harbor reruns of the seven previously failing cases are in preparation using the normal product toolset rather than artificial exec-only restrictions. Results are not yet claimed. Harbor code remains in its separate repository and is not included in this PR.

Checklist

  • My code follows the coding guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes

Tao Sun and others added 3 commits November 13, 2026 14:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	desktop/src/config-write-service.ts
#	desktop/src/main.ts
#	desktop/src/model-config-application.test.ts
#	desktop/src/model-config-application.ts
@yikkuro
yikkuro (yikkuro) merged commit f22a188 into main Nov 18, 2026
4 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.

1 participant