Skip to content

feat(devin): re-target adapters to native Devin Local .devin/ paths#2089

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2072-devin-native-paths
Jun 30, 2026
Merged

feat(devin): re-target adapters to native Devin Local .devin/ paths#2089
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2072-devin-native-paths

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Follow-up for Devin Desktop upstream updates (#2072). rulesync's devin target 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.json surface. The maintainer re-confirmed all gaps on 2026-06-29 (Cascade retires 2026-07-01).

Changes

  1. hooks — rewrote devin-hooks.ts on 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 the hooks key of ~/.config/devin/config.json (global, merge-safe). New DEVIN_HOOK_EVENTS/CANONICAL_TO_DEVIN_EVENT_NAMES in hooks.ts.
  2. mcpdevin-mcp.ts now writes the mcpServers key inside .devin/config.json (project) / ~/.config/devin/config.json (user), merging with sibling keys. Fixed the contradictory processor comment.
  3. permissions — new devin-permissions.ts mapping rulesync actions to Devin's permissions block (Read/Write/Exec/Fetch + MCP patterns, precedence deny > ask > allow). Registered in tool-target-tuples + permissions-processor (project/global/import).
  4. rules — global rules path fixed from ~/.codeium/windsurf/memories/global_rules.md to native ~/.config/devin/AGENTS.md. Project .devin/rules/*.md unchanged.
  5. Added references/devin.md; regenerated supported-tools tables and .gitignore.

Shared-config safety: mcp, permissions, and global hooks all read-modify-write config.json preserving each other's keys (amp settings.json pattern); an e2e generates mcp,permissions together and asserts both keys co-locate.

⚠️ Behavioral change

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 cicheck fully green: 293 test files, 6577 tests; e2e specs pass; sync-skill-docs, gitignore, supported-tools, cspell, secretlint all pass.

References

Closes #2072

cm-dyoshikawa and others added 3 commits June 30, 2026 07:19
… 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>
@dyoshikawa
dyoshikawa merged commit 8da0d8c into main Jun 30, 2026
10 of 16 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2072-devin-native-paths branch June 30, 2026 15:29
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.

Follow up Devin Desktop upstream updates: hooks/mcp still emit legacy .windsurf paths instead of native .devin/config.json

2 participants