# tonykastaneda/slippy architecture

> Architecture diagram of the GitHub repository tonykastaneda/slippy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tonykastaneda/slippy
- Repository: https://github.com/tonykastaneda/slippy

## Overview

Slippy embeds agent-facing automation in Adobe Illustrator and Photoshop. An agent connects to the app’s loopback endpoint, submits a command, and receives the result; edits are performed on the host app’s main thread and surfaced in the Slippy panel. Illustrator and Photoshop each have native command implementations, while Photoshop also contains an earlier UXP-plus-Node bridge retained for reference. The README documents the product flow and capabilities; some internal wiring is not visible in the sampled excerpts, so uncertain links are omitted.

Main entry points: [`shared/Server.cpp`](https://github.com/tonykastaneda/slippy/blob/main/shared/Server.cpp) (Loopback server), [`illustrator/SlippyPlugin.cpp`](https://github.com/tonykastaneda/slippy/blob/main/illustrator/SlippyPlugin.cpp) (Plug-in entry), [`photoshop/PsPlugin.cpp`](https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsPlugin.cpp) (Plug-in entry), [`photoshop/uxp/plugin/main.js`](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/main.js) (UXP panel runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared runtime"]
  node_server["Loopback server<br/>[Server.cpp]"]
  node_mcp["MCP handling<br/>[Mcp.cpp]"]
  node_commands_api["Command interface<br/>[Commands.h]"]
  node_platform["Platform services<br/>[Platform.cpp]"]
end

subgraph group_illustrator["Illustrator plug-in"]
  node_ai_plugin["Plug-in entry<br/>[SlippyPlugin.cpp]"]
  node_ai_commands["Illustrator commands<br/>[Commands.cpp]"]
  node_ai_domain["Document and art tools"]
  node_ai_panel["Illustrator panel"]
end

subgraph group_photoshop["Photoshop native"]
  node_ps_plugin["Plug-in entry<br/>[PsPlugin.cpp]"]
  node_ps_commands["Photoshop commands<br/>[PsCommands.cpp]"]
  node_ps_descriptors["Action descriptors<br/>[PsDescriptor.cpp]"]
  node_ps_suites["Photoshop SDK suites<br/>[PsSuites.cpp]"]
  node_ps_panel["Docked panel<br/>[panel.js]"]
end

subgraph group_uxp["Photoshop UXP reference"]
  node_bridge_server["UXP bridge server<br/>[server.js]"]
  node_plugin_link["Panel link<br/>[plugin-link.js]"]
  node_uxp_main["UXP panel runtime<br/>[main.js]"]
  node_registry["UXP command registry<br/>[registry.js]"]
  node_uxp_documents["Document commands<br/>[documents.js]"]
  node_uxp_layers["Layer commands<br/>[layers.js]"]
  node_uxp_tools["Bridge tools<br/>[tools.js]"]
end

node_agent(("AI agent"))
node_illustrator_app["Illustrator"]
node_photoshop_app["Photoshop"]
node_rpc_client["JSON-RPC client<br/>[slippy_client.py]"]

node_agent -->|"calls MCP"| node_server
node_agent -->|"uses JSON-RPC"| node_rpc_client
node_rpc_client -.->|"sends requests"| node_server
node_server -->|"routes MCP"| node_mcp
node_ai_plugin -->|"starts server"| node_server
node_ps_plugin -->|"starts server"| node_server
node_server -->|"dispatches calls"| node_commands_api
node_ai_plugin -->|"dispatches on main thread"| node_ai_commands
node_ai_commands -->|"implements interface"| node_commands_api
node_ai_plugin -->|"runs in"| node_illustrator_app
node_ai_commands -->|"implements tools"| node_ai_domain
node_ai_plugin -.->|"shows activity"| node_ai_panel
node_ps_plugin -->|"dispatches commands"| node_ps_commands
node_ps_plugin -->|"runs in"| node_photoshop_app
node_ps_commands -->|"uses descriptors"| node_ps_descriptors
node_ps_plugin -.->|"serves connection info"| node_ps_panel
node_platform -->|"provides file and socket support"| node_server
node_bridge_server -->|"routes WebSocket"| node_plugin_link
node_bridge_server -->|"registers tools"| node_uxp_tools
node_plugin_link -->|"exchanges calls"| node_uxp_main
node_uxp_main -->|"loads and calls"| node_registry
node_uxp_main -->|"loads commands"| node_uxp_documents
node_uxp_main -->|"loads commands"| node_uxp_layers
node_uxp_documents -->|"registers commands"| node_registry
node_uxp_layers -->|"registers commands"| node_registry

click node_rpc_client "https://github.com/tonykastaneda/slippy/blob/main/client/slippy_client.py"
click node_server "https://github.com/tonykastaneda/slippy/blob/main/shared/Server.cpp"
click node_mcp "https://github.com/tonykastaneda/slippy/blob/main/shared/Mcp.cpp"
click node_commands_api "https://github.com/tonykastaneda/slippy/blob/main/shared/Commands.h"
click node_platform "https://github.com/tonykastaneda/slippy/blob/main/shared/Platform.cpp"
click node_ai_plugin "https://github.com/tonykastaneda/slippy/blob/main/illustrator/SlippyPlugin.cpp"
click node_ai_commands "https://github.com/tonykastaneda/slippy/blob/main/illustrator/Commands.cpp"
click node_ai_domain "https://github.com/tonykastaneda/slippy/tree/main/illustrator"
click node_ai_panel "https://github.com/tonykastaneda/slippy/blob/main/illustrator/SlippyPanelHostWin.cpp"
click node_ps_plugin "https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsPlugin.cpp"
click node_ps_commands "https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsCommands.cpp"
click node_ps_descriptors "https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsDescriptor.cpp"
click node_ps_suites "https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsSuites.cpp"
click node_ps_panel "https://github.com/tonykastaneda/slippy/blob/main/photoshop/panel/panel.js"
click node_bridge_server "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/server.js"
click node_plugin_link "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/plugin-link.js"
click node_uxp_main "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/main.js"
click node_registry "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/registry.js"
click node_uxp_documents "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/documents.js"
click node_uxp_layers "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/layers.js"
click node_uxp_tools "https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/tools.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_mcp,node_commands_api,node_platform,node_rpc_client toneBlue
class node_ai_plugin,node_ai_commands,node_ai_domain,node_ai_panel toneAmber
class node_ps_plugin,node_ps_commands,node_ps_descriptors,node_ps_suites,node_ps_panel toneMint
class node_bridge_server,node_plugin_link,node_uxp_main,node_registry,node_uxp_documents,node_uxp_layers,node_uxp_tools toneRose
class node_agent,node_illustrator_app,node_photoshop_app toneIndigo
```

## Components

### Shared runtime

- [Loopback server](https://github.com/tonykastaneda/slippy/blob/main/shared/Server.cpp): `shared/Server.cpp`
- [MCP handling](https://github.com/tonykastaneda/slippy/blob/main/shared/Mcp.cpp): `shared/Mcp.cpp`
- [Command interface](https://github.com/tonykastaneda/slippy/blob/main/shared/Commands.h): `shared/Commands.h`
- [Platform services](https://github.com/tonykastaneda/slippy/blob/main/shared/Platform.cpp): `shared/Platform.cpp`

### Illustrator plug-in

- [Plug-in entry](https://github.com/tonykastaneda/slippy/blob/main/illustrator/SlippyPlugin.cpp): `illustrator/SlippyPlugin.cpp`
- [Illustrator commands](https://github.com/tonykastaneda/slippy/blob/main/illustrator/Commands.cpp): `illustrator/Commands.cpp`
- [Document and art tools](https://github.com/tonykastaneda/slippy/tree/main/illustrator): `illustrator`
- [Illustrator panel](https://github.com/tonykastaneda/slippy/blob/main/illustrator/SlippyPanelHostWin.cpp): `illustrator/SlippyPanelHostWin.cpp`

### Photoshop native

- [Plug-in entry](https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsPlugin.cpp): `photoshop/PsPlugin.cpp`
- [Photoshop commands](https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsCommands.cpp): `photoshop/PsCommands.cpp`
- [Action descriptors](https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsDescriptor.cpp): `photoshop/PsDescriptor.cpp`
- [Photoshop SDK suites](https://github.com/tonykastaneda/slippy/blob/main/photoshop/PsSuites.cpp): `photoshop/PsSuites.cpp`
- [Docked panel](https://github.com/tonykastaneda/slippy/blob/main/photoshop/panel/panel.js): `photoshop/panel/panel.js`

### Photoshop UXP reference

- [UXP bridge server](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/server.js): `photoshop/uxp/bridge/src/server.js`
- [Panel link](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/plugin-link.js): `photoshop/uxp/bridge/src/plugin-link.js`
- [UXP panel runtime](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/main.js): `photoshop/uxp/plugin/main.js`
- [UXP command registry](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/registry.js): `photoshop/uxp/plugin/commands/registry.js`
- [Document commands](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/documents.js): `photoshop/uxp/plugin/commands/documents.js`
- [Layer commands](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/plugin/commands/layers.js): `photoshop/uxp/plugin/commands/layers.js`
- [Bridge tools](https://github.com/tonykastaneda/slippy/blob/main/photoshop/uxp/bridge/src/tools.js): `photoshop/uxp/bridge/src/tools.js`

### Other components

- **AI agent**
- **Illustrator**
- **Photoshop**
- [JSON-RPC client](https://github.com/tonykastaneda/slippy/blob/main/client/slippy_client.py): `client/slippy_client.py`

## Connections

- AI agent → Loopback server: calls MCP
- AI agent → JSON-RPC client: uses JSON-RPC
- JSON-RPC client → Loopback server: sends requests
- Loopback server → MCP handling: routes MCP
- Plug-in entry → Loopback server: starts server
- Plug-in entry → Loopback server: starts server (evidence: `photoshop/PsPlugin.cpp`)
- Loopback server → Command interface: dispatches calls
- Plug-in entry → Illustrator commands: dispatches on main thread (evidence: `illustrator/Commands.cpp`)
- Illustrator commands → Command interface: implements interface (evidence: `illustrator/Commands.cpp`)
- Plug-in entry → Illustrator: runs in
- Illustrator commands → Document and art tools: implements tools (evidence: `illustrator/Commands.cpp`)
- Plug-in entry → Illustrator panel: shows activity
- Plug-in entry → Photoshop commands: dispatches commands
- Plug-in entry → Photoshop: runs in
- Photoshop commands → Action descriptors: uses descriptors (evidence: `photoshop/PsCommands.cpp`)
- Plug-in entry → Docked panel: serves connection info
- Platform services → Loopback server: provides file and socket support (evidence: `shared/Server.cpp`)
- UXP bridge server → Panel link: routes WebSocket (evidence: `photoshop/uxp/bridge/src/server.js`)
- UXP bridge server → Bridge tools: registers tools (evidence: `photoshop/uxp/bridge/src/server.js`)
- Panel link → UXP panel runtime: exchanges calls
- UXP panel runtime → UXP command registry: loads and calls (evidence: `photoshop/uxp/plugin/main.js`)
- UXP panel runtime → Document commands: loads commands (evidence: `photoshop/uxp/plugin/main.js`)
- UXP panel runtime → Layer commands: loads commands (evidence: `photoshop/uxp/plugin/main.js`)
- Document commands → UXP command registry: registers commands (evidence: `photoshop/uxp/plugin/commands/documents.js`)
- Layer commands → UXP command registry: registers commands (evidence: `photoshop/uxp/plugin/commands/layers.js`)
