feat(devin): re-target adapters to native Devin Local .devin/ paths#2089
Merged
Conversation
… native Devin Local .devin/ paths Cascade retires 2026-07-01, so move the Devin adapters onto Devin Local's native surfaces (resolves #2072): - hooks: emit Claude-style lifecycle events (PreToolUse/PostToolUse/PermissionRequest/UserPromptSubmit/Stop/SessionStart/SessionEnd) with { matcher?, hooks: [{ type, command|prompt, timeout? }] } groups to .devin/hooks.v1.json (project, top-level event map) and the hooks key of ~/.config/devin/config.json (global). Replace the Cascade event mapping in src/types/hooks.ts. - mcp: write mcpServers into .devin/config.json (project) / ~/.config/devin/config.json (global), merging with sibling permissions/hooks keys; never delete the shared file. - permissions: new DevinPermissions adapter mapping canonical actions to Devin's allow/deny/ask scope matchers (Read/Write/Exec/Fetch + MCP patterns, deny>ask>allow) in config.json; registered in the tuple, processor, and getToolTargets. - rules: fix global always-on rules path to ~/.config/devin/AGENTS.md (was ~/.codeium/windsurf/memories/global_rules.md). Project .devin/rules/*.md unchanged. - Add references/devin.md map; regenerate supported-tools tables and .gitignore (config.json excluded as a merged file). BEHAVIORAL CHANGE: existing Devin output paths move from .windsurf/~/.codeium to native .devin/~/.config/devin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rmed input Guard the global hooks config merge with isRecord (matching the mcp/permissions adapters) so a non-object existing config.json cannot inject stray keys, and explicitly skip prototype-pollution keys when importing Devin permission entries instead of relying on incidental coercion. Adds a regression test for the import skip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ss review nits Declare the 'devin-config' shared-file token on the mcp/hooks/permissions generation steps so assertSharedFilesOrdered() protects the new 3-writer .devin/config.json (matching the amp-settings/claude-settings convention), preventing a future step reorder from silently dropping a sibling feature's key. Also honor the validate param in DevinPermissions.fromRulesyncPermissions and correct stale 'codeium' wording in devin-mcp test descriptions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up for Devin Desktop upstream updates (#2072). rulesync's
devintarget was built as a Windsurf/Cascade clone; #1759 moved rules/workflows/skills to.devin/, but hooks and mcp still emitted legacy.windsurf//~/.codeium/windsurf/paths with the Cascade event model. Cognition's Devin Local standardized on a native.devin/config.jsonsurface. The maintainer re-confirmed all gaps on 2026-06-29 (Cascade retires 2026-07-01).Changes
devin-hooks.tson the Claude Code template: native events (PreToolUse/PostToolUse/PermissionRequest/UserPromptSubmit/Stop/SessionStart/SessionEnd) with{ matcher, hooks: [{ type, command/prompt, timeout }] }, written to.devin/hooks.v1.json(project, top-level map) and thehookskey of~/.config/devin/config.json(global, merge-safe). NewDEVIN_HOOK_EVENTS/CANONICAL_TO_DEVIN_EVENT_NAMESinhooks.ts.devin-mcp.tsnow writes themcpServerskey inside.devin/config.json(project) /~/.config/devin/config.json(user), merging with sibling keys. Fixed the contradictory processor comment.devin-permissions.tsmapping rulesync actions to Devin'spermissionsblock (Read/Write/Exec/Fetch+ MCP patterns, precedence deny > ask > allow). Registered in tool-target-tuples + permissions-processor (project/global/import).~/.codeium/windsurf/memories/global_rules.mdto native~/.config/devin/AGENTS.md. Project.devin/rules/*.mdunchanged.references/devin.md; regenerated supported-tools tables and.gitignore.Shared-config safety: mcp, permissions, and global hooks all read-modify-write
config.jsonpreserving each other's keys (amp settings.json pattern); an e2e generatesmcp,permissionstogether and asserts both keys co-locate.Existing Devin output paths move from
.windsurf/+~/.codeium/windsurf/to native.devin/+~/.config/devin/, and Devin gains a permissions adapter. This is intended (Cascade retires 2026-07-01).Verification
pnpm cicheckfully green: 293 test files, 6577 tests; e2e specs pass; sync-skill-docs, gitignore, supported-tools, cspell, secretlint all pass.References
Closes #2072