synapse-sdk 1.0.0b12__py3-none-any.whl → 1.0.0b14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of synapse-sdk might be problematic. Click here for more details.

Files changed (86) hide show
  1. locale/ko/LC_MESSAGES/messages.mo +0 -0
  2. synapse_sdk/clients/agent/ray.py +9 -11
  3. synapse_sdk/clients/backend/annotation.py +1 -1
  4. synapse_sdk/clients/backend/core.py +31 -4
  5. synapse_sdk/clients/backend/data_collection.py +78 -5
  6. synapse_sdk/clients/backend/hitl.py +1 -1
  7. synapse_sdk/clients/backend/ml.py +1 -1
  8. synapse_sdk/clients/base.py +23 -16
  9. synapse_sdk/devtools/docs/docs/api/clients/agent.md +43 -0
  10. synapse_sdk/devtools/docs/docs/api/clients/backend.md +53 -0
  11. synapse_sdk/devtools/docs/docs/api/clients/base.md +35 -0
  12. synapse_sdk/devtools/docs/docs/api/clients/ray.md +321 -0
  13. synapse_sdk/devtools/docs/docs/api/index.md +52 -0
  14. synapse_sdk/devtools/docs/docs/api/plugins/categories.md +43 -0
  15. synapse_sdk/devtools/docs/docs/api/plugins/models.md +59 -0
  16. synapse_sdk/devtools/docs/docs/api/plugins/utils.md +328 -0
  17. synapse_sdk/devtools/docs/docs/api/utils/file.md +195 -0
  18. synapse_sdk/devtools/docs/docs/api/utils/network.md +378 -0
  19. synapse_sdk/devtools/docs/docs/api/utils/storage.md +57 -0
  20. synapse_sdk/devtools/docs/docs/api/utils/types.md +51 -0
  21. synapse_sdk/devtools/docs/docs/categories.md +0 -0
  22. synapse_sdk/devtools/docs/docs/cli-usage.md +280 -0
  23. synapse_sdk/devtools/docs/docs/concepts/index.md +38 -0
  24. synapse_sdk/devtools/docs/docs/configuration.md +83 -0
  25. synapse_sdk/devtools/docs/docs/contributing.md +306 -0
  26. synapse_sdk/devtools/docs/docs/examples/index.md +29 -0
  27. synapse_sdk/devtools/docs/docs/faq.md +179 -0
  28. synapse_sdk/devtools/docs/docs/features/converters/index.md +455 -0
  29. synapse_sdk/devtools/docs/docs/features/index.md +24 -0
  30. synapse_sdk/devtools/docs/docs/features/plugins/index.md +509 -0
  31. synapse_sdk/devtools/docs/docs/installation.md +94 -0
  32. synapse_sdk/devtools/docs/docs/introduction.md +47 -0
  33. synapse_sdk/devtools/docs/docs/quickstart.md +78 -0
  34. synapse_sdk/devtools/docs/docs/troubleshooting.md +519 -0
  35. synapse_sdk/devtools/docs/docs/tutorial-basics/_category_.json +8 -0
  36. synapse_sdk/devtools/docs/docs/tutorial-basics/congratulations.md +23 -0
  37. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-blog-post.md +34 -0
  38. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-document.md +57 -0
  39. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-page.md +43 -0
  40. synapse_sdk/devtools/docs/docs/tutorial-basics/deploy-your-site.md +31 -0
  41. synapse_sdk/devtools/docs/docs/tutorial-basics/markdown-features.mdx +152 -0
  42. synapse_sdk/devtools/docs/docs/tutorial-extras/_category_.json +7 -0
  43. synapse_sdk/devtools/docs/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
  44. synapse_sdk/devtools/docs/docs/tutorial-extras/img/localeDropdown.png +0 -0
  45. synapse_sdk/devtools/docs/docs/tutorial-extras/manage-docs-versions.md +55 -0
  46. synapse_sdk/devtools/docs/docs/tutorial-extras/translate-your-site.md +88 -0
  47. synapse_sdk/devtools/docs/docusaurus.config.ts +5 -3
  48. synapse_sdk/devtools/docs/i18n/ko/code.json +325 -0
  49. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/agent.md +43 -0
  50. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/backend.md +53 -0
  51. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/base.md +35 -0
  52. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/ray.md +321 -0
  53. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/index.md +52 -0
  54. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/file.md +195 -0
  55. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/network.md +378 -0
  56. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/storage.md +60 -0
  57. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/types.md +51 -0
  58. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/categories.md +0 -0
  59. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/cli-usage.md +280 -0
  60. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/concepts/index.md +38 -0
  61. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/configuration.md +83 -0
  62. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/contributing.md +306 -0
  63. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/examples/index.md +29 -0
  64. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/faq.md +179 -0
  65. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/converters/index.md +30 -0
  66. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/index.md +24 -0
  67. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/plugins/index.md +30 -0
  68. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/installation.md +94 -0
  69. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/introduction.md +47 -0
  70. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/quickstart.md +78 -0
  71. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/troubleshooting.md +519 -0
  72. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current.json +22 -0
  73. synapse_sdk/devtools/docs/i18n/ko/docusaurus-theme-classic/footer.json +42 -0
  74. synapse_sdk/devtools/docs/i18n/ko/docusaurus-theme-classic/navbar.json +18 -0
  75. synapse_sdk/devtools/docs/node_modules/shell-quote/print.py +3 -0
  76. synapse_sdk/devtools/docs/package.json +1 -1
  77. synapse_sdk/plugins/categories/export/actions/export.py +50 -2
  78. synapse_sdk/plugins/categories/export/templates/plugin/export.py +15 -2
  79. synapse_sdk/plugins/categories/upload/actions/upload.py +42 -27
  80. synapse_sdk/utils/file.py +77 -0
  81. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/METADATA +1 -1
  82. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/RECORD +86 -20
  83. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/WHEEL +0 -0
  84. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/entry_points.txt +0 -0
  85. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/licenses/LICENSE +0 -0
  86. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,280 @@
1
+ ---
2
+ id: cli-usage
3
+ title: CLI Usage Guide
4
+ sidebar_position: 4
5
+ ---
6
+
7
+ # CLI Usage Guide
8
+
9
+ The Synapse SDK provides a powerful interactive CLI for managing your development workflow, from configuration to plugin development and code editing.
10
+
11
+ ## Getting Started
12
+
13
+ Launch the interactive CLI:
14
+
15
+ ```bash
16
+ synapse
17
+ ```
18
+
19
+ Or run specific commands directly:
20
+
21
+ ```bash
22
+ # Start development tools immediately
23
+ synapse --dev-tools
24
+
25
+ # Show help
26
+ synapse --help
27
+ ```
28
+
29
+ ## Main Menu Options
30
+
31
+ When you run `synapse`, you'll see the main menu:
32
+
33
+ ```
34
+ 🚀 Synapse SDK
35
+ Select an option:
36
+ 🌐 Run Dev Tools
37
+ 💻 Open Code-Server IDE
38
+ ⚙️ Configuration
39
+ 🔌 Plugin Management
40
+ 🚪 Exit
41
+ ```
42
+
43
+ ## 🌐 Run Dev Tools
44
+
45
+ Launches the Synapse development tools dashboard with:
46
+
47
+ - **Interactive UI**: Web-based dashboard for managing agents and jobs
48
+ - **Real-time Monitoring**: Live view of agent status and job execution
49
+ - **Plugin Management**: Upload, test, and manage plugins through the UI
50
+
51
+ ### Usage
52
+ ```bash
53
+ # Launch dev tools from CLI menu
54
+ synapse
55
+
56
+ # Or start directly
57
+ synapse --dev-tools
58
+ ```
59
+
60
+ ## 💻 Open Code-Server IDE
61
+
62
+ Opens a web-based VS Code environment for plugin development. Supports both agent-based and local code-server instances.
63
+
64
+ ### Agent Code-Server
65
+
66
+ Connect to a remote code-server running on an agent:
67
+
68
+ - **Automatic Setup**: Synapse configures the workspace and installs dependencies
69
+ - **Plugin Encryption**: Local plugin code is encrypted and securely transferred
70
+ - **Workspace Sync**: Your local project is available in the agent environment
71
+
72
+ ### Local Code-Server
73
+
74
+ Launch a local code-server instance:
75
+
76
+ - **Port Detection**: Automatically reads port from `~/.config/code-server/config.yaml`
77
+ - **Folder Parameter**: Opens with correct workspace directory
78
+ - **Browser Integration**: Automatically opens browser with proper URL
79
+
80
+ ### Usage Examples
81
+
82
+ ```bash
83
+ # Interactive menu (recommended)
84
+ synapse
85
+ # Select "💻 Open Code-Server IDE"
86
+
87
+ # Direct command
88
+ synapse code-server
89
+
90
+ # With specific options
91
+ synapse code-server --agent my-agent --workspace /path/to/project
92
+
93
+ # Don't open browser automatically
94
+ synapse code-server --no-open-browser
95
+ ```
96
+
97
+ ### Code-Server Options
98
+
99
+ | Option | Description | Default |
100
+ |--------|-------------|---------|
101
+ | `--agent` | Specific agent ID to use | Current agent or prompt |
102
+ | `--workspace` | Project directory path | Current directory |
103
+ | `--open-browser/--no-open-browser` | Open browser automatically | `--open-browser` |
104
+
105
+ ### Local Code-Server Installation
106
+
107
+ If code-server isn't installed locally, the CLI provides installation instructions:
108
+
109
+ ```bash
110
+ # Recommended: Install script
111
+ curl -fsSL https://code-server.dev/install.sh | sh
112
+
113
+ # Using npm
114
+ npm install -g code-server
115
+
116
+ # Using yarn
117
+ yarn global add code-server
118
+ ```
119
+
120
+ For more options, visit: https://coder.com/docs/code-server/latest/install
121
+
122
+ ## ⚙️ Configuration
123
+
124
+ Interactive configuration wizard for setting up:
125
+
126
+ - **Backend Connection**: Configure API endpoints and authentication
127
+ - **Agent Selection**: Choose and configure development agents
128
+ - **Token Management**: Manage access tokens and authentication
129
+
130
+ ### Configuration Files
131
+
132
+ Synapse stores configuration in:
133
+ - **Backend Config**: `~/.synapse/devtools.yaml`
134
+ - **Agent Config**: `~/.synapse/devtools.yaml` (agent section)
135
+ - **Code-Server Config**: `~/.config/code-server/config.yaml`
136
+
137
+ ## 🔌 Plugin Management
138
+
139
+ Comprehensive plugin development and management tools:
140
+
141
+ ### Create New Plugin
142
+
143
+ ```bash
144
+ synapse
145
+ # Select "🔌 Plugin Management" → "Create new plugin"
146
+ ```
147
+
148
+ Interactive wizard creates:
149
+ - Plugin directory structure
150
+ - Configuration files (`config.yaml`)
151
+ - Example plugin code
152
+ - Requirements and dependencies
153
+
154
+ ### Run Plugin Locally
155
+
156
+ Test plugins in different environments:
157
+
158
+ ```bash
159
+ # Script execution (local)
160
+ synapse plugin run my_action '{"param": "value"}' --run-by script
161
+
162
+ # Agent execution (remote)
163
+ synapse plugin run my_action '{"param": "value"}' --run-by agent
164
+
165
+ # Backend execution (cloud)
166
+ synapse plugin run my_action '{"param": "value"}' --run-by backend
167
+ ```
168
+
169
+ ### Publish Plugin
170
+
171
+ Deploy plugins to your Synapse backend:
172
+
173
+ ```bash
174
+ synapse
175
+ # Select "🔌 Plugin Management" → "Publish plugin"
176
+ ```
177
+
178
+ Options:
179
+ - **Debug Mode**: Test deployment with verbose logging
180
+ - **Production Mode**: Deploy for live use
181
+
182
+ ## Command Reference
183
+
184
+ ### Main Commands
185
+
186
+ ```bash
187
+ # Interactive CLI (main menu)
188
+ synapse
189
+
190
+ # Development tools
191
+ synapse --dev-tools
192
+
193
+ # Direct commands
194
+ synapse config # Configuration wizard
195
+ synapse devtools # Development dashboard
196
+ synapse code-server # Code editing environment
197
+ synapse plugin # Plugin management
198
+ ```
199
+
200
+ ### Code-Server Command
201
+
202
+ ```bash
203
+ synapse code-server [OPTIONS]
204
+
205
+ Options:
206
+ --agent TEXT Agent name or ID
207
+ --open-browser / --no-open-browser
208
+ Open in browser [default: open-browser]
209
+ --workspace TEXT Workspace directory path (defaults to current directory)
210
+ --help Show this message and exit.
211
+ ```
212
+
213
+ ### Plugin Commands
214
+
215
+ ```bash
216
+ # Create plugin
217
+ synapse plugin create
218
+
219
+ # Run plugin
220
+ synapse plugin run ACTION PARAMS [OPTIONS]
221
+
222
+ # Publish plugin
223
+ synapse plugin publish [OPTIONS]
224
+ ```
225
+
226
+ ## Tips & Best Practices
227
+
228
+ ### Code-Server Development
229
+
230
+ 1. **Plugin Detection**: When opening code-server, Synapse automatically detects if your workspace contains a plugin and encrypts it for secure transfer to agents.
231
+
232
+ 2. **Workspace Paths**: Agent workspaces typically use `/home/coder/workspace` - this is normal for containerized environments.
233
+
234
+ 3. **Port Configuration**: Local code-server port is read from your config file, defaulting to 8070 if not configured.
235
+
236
+ ### Configuration Management
237
+
238
+ 1. **Token Security**: Store API tokens securely and rotate them regularly
239
+ 2. **Agent Selection**: Use descriptive agent names to identify their purpose
240
+ 3. **Backend URLs**: Ensure backend URLs are accessible from your development environment
241
+
242
+ ### Plugin Development
243
+
244
+ 1. **Local Testing**: Always test plugins locally with `--run-by script` before deploying
245
+ 2. **Debug Mode**: Use debug mode for initial deployments to catch issues early
246
+ 3. **Version Control**: Use git to track plugin changes and manage versions
247
+
248
+ ## Troubleshooting
249
+
250
+ ### Code-Server Issues
251
+
252
+ **Problem**: "Code-server is not available"
253
+ - **Solution**: Ensure the agent has code-server support enabled
254
+
255
+ **Problem**: Browser doesn't open automatically
256
+ - **Solution**: Manually copy the provided URL to your browser
257
+
258
+ **Problem**: Wrong port displayed
259
+ - **Solution**: Check `~/.config/code-server/config.yaml` for correct port configuration
260
+
261
+ ### Configuration Issues
262
+
263
+ **Problem**: "No backend configured"
264
+ - **Solution**: Run `synapse config` to set up backend connection
265
+
266
+ **Problem**: "Invalid token (401)"
267
+ - **Solution**: Generate a new API token and update configuration
268
+
269
+ **Problem**: "Connection timeout"
270
+ - **Solution**: Check network connectivity and backend URL accessibility
271
+
272
+ ### Plugin Issues
273
+
274
+ **Problem**: Plugin not detected in workspace
275
+ - **Solution**: Ensure your directory has a valid `config.yaml` file
276
+
277
+ **Problem**: Plugin execution fails
278
+ - **Solution**: Check plugin dependencies and syntax, test locally first
279
+
280
+ For more troubleshooting help, see the [Troubleshooting Guide](./troubleshooting.md).
@@ -0,0 +1,38 @@
1
+ ---
2
+ id: index
3
+ title: Core Concepts
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ # Core Concepts
8
+
9
+ Understanding the fundamental concepts of Synapse SDK.
10
+
11
+ ## Architecture
12
+
13
+ Learn about the overall system architecture and design principles.
14
+
15
+ ## Plugin System
16
+
17
+ Understanding how plugins work, categories, and execution methods.
18
+
19
+ ## Clients
20
+
21
+ Different client types and their use cases:
22
+ - BackendClient for API operations
23
+ - AgentClient for distributed execution
24
+
25
+ ## Execution Methods
26
+
27
+ Different ways to run plugins:
28
+ - **JOB**: Long-running operations with monitoring
29
+ - **TASK**: Quick, simple operations
30
+ - **RESTAPI**: Serving models and APIs
31
+
32
+ ## Data Flow
33
+
34
+ How data flows through the system from input to output.
35
+
36
+ ## Security
37
+
38
+ Authentication, authorization, and security best practices.
@@ -0,0 +1,83 @@
1
+ ---
2
+ id: configuration
3
+ title: Configuration
4
+ sidebar_position: 8
5
+ ---
6
+
7
+ # Configuration
8
+
9
+ Configure Synapse SDK for your environment and use cases.
10
+
11
+ ## Configuration Methods
12
+
13
+ There are three ways to configure Synapse SDK:
14
+
15
+ 1. **Synapse CLI**
16
+ 2. **Environment variables**
17
+ 3. **Configuration file**
18
+
19
+ ## CLI
20
+
21
+ The interactive configuration menu provides an easy way to configure your Synapse SDK:
22
+
23
+ ```bash
24
+ $ synapse config
25
+ ```
26
+
27
+ This will open an interactive menu where you can:
28
+ - Configure backend host and API token
29
+ - Select or manually configure an agent
30
+ - View current configuration
31
+
32
+ ### Key Features:
33
+ - **Plain text token display**: Tokens are shown in plain text for easy verification
34
+ - **Connection testing**: After configuring backend or agent, the connection is automatically tested
35
+ - **No startup delays**: Connection checks only happen when you configure settings, not on CLI startup
36
+
37
+ ## Configuration File
38
+
39
+ Create a configuration file at `~/.synapse/config.json`:
40
+
41
+ ```json
42
+ {
43
+ "backend": {
44
+ "host": "https://api.synapse.sh",
45
+ "token": "your-api-token"
46
+ },
47
+ "agent": {
48
+ "id": "agent-uuid-123",
49
+ "name": "My Development Agent",
50
+ "token": "your-agent-token"
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## Plugin Management
56
+
57
+ The CLI provides an interactive plugin management interface:
58
+
59
+ ```bash
60
+ $ synapse
61
+ # Select "Plugin Management"
62
+ ```
63
+
64
+ ### Available Options:
65
+
66
+ 1. **Create new plugin**: Creates a new plugin from templates using cookiecutter
67
+ 2. **Run plugin locally**: Interactive interface to run plugins with configurable parameters
68
+ 3. **Publish plugin**: Publishes plugins to the configured backend with debug mode option
69
+
70
+ ### Plugin Publishing
71
+
72
+ When publishing plugins:
73
+ - **Debug mode**: Enabled by default for development
74
+ - **Backend integration**: Uses your configured backend settings
75
+ - **Connection testing**: Verifies backend connection before publishing
76
+ - **Error handling**: Stops on errors and waits for user acknowledgment
77
+
78
+ ### Plugin Development Workflow
79
+
80
+ 1. **Create**: Use the CLI to create a new plugin template
81
+ 2. **Develop**: Write your plugin code following the generated structure
82
+ 3. **Test**: Run plugins locally through the interactive interface
83
+ 4. **Publish**: Deploy to your configured backend with debug options
@@ -0,0 +1,306 @@
1
+ ---
2
+ id: contributing
3
+ title: Contributing
4
+ sidebar_position: 12
5
+ ---
6
+
7
+ # Contributing to Synapse SDK
8
+
9
+ Thank you for your interest in contributing to Synapse SDK! This guide will help you get started with contributing to the project.
10
+
11
+ ## Development Setup
12
+
13
+ ### Prerequisites
14
+
15
+ - Python 3.8 or higher
16
+ - Git
17
+ - Virtual environment tool (venv, conda, etc.)
18
+
19
+ ### Getting Started
20
+
21
+ 1. **Fork and Clone the Repository**
22
+ ```bash
23
+ git clone https://github.com/yourusername/synapse-sdk.git
24
+ cd synapse-sdk
25
+ ```
26
+
27
+ 2. **Create Virtual Environment**
28
+ ```bash
29
+ python -m venv .venv
30
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
31
+ ```
32
+
33
+ 3. **Install Dependencies**
34
+ ```bash
35
+ pip install -r requirements.txt
36
+ pip install -r requirements.test.txt
37
+ ```
38
+
39
+ ## Code Formatting and Quality
40
+
41
+ ### Ruff Formatting
42
+
43
+ We use **Ruff** for code formatting and linting. All contributions must follow our formatting standards.
44
+
45
+ #### Required Commands
46
+
47
+ Before submitting any code changes, run these commands:
48
+
49
+ ```bash
50
+ # Format all Python code
51
+ ruff format .
52
+
53
+ # Fix linting issues
54
+ ruff check --fix .
55
+
56
+ # Check for remaining issues
57
+ ruff check .
58
+ ```
59
+
60
+ #### Formatting Workflow
61
+
62
+ 1. **Make your changes** - Write or modify Python code
63
+ 2. **Format with Ruff** - Run `ruff format .` to apply consistent formatting
64
+ 3. **Fix linting issues** - Run `ruff check --fix .` to resolve code quality issues
65
+ 4. **Verify changes** - Review the formatted code to ensure correctness
66
+ 5. **Commit changes** - Create commits with properly formatted code
67
+
68
+ #### IDE Integration
69
+
70
+ Configure your IDE to run Ruff automatically:
71
+
72
+ - **VS Code**: Install the Ruff extension
73
+ - **PyCharm**: Configure Ruff as external tool
74
+ - **Vim/Neovim**: Use ruff-lsp or similar plugins
75
+
76
+ ### Code Style Guidelines
77
+
78
+ - **Line length**: Follow project-specific settings in `pyproject.toml`
79
+ - **Import sorting**: Let Ruff handle import organization
80
+ - **Type hints**: Use type annotations where appropriate
81
+ - **Docstrings**: Follow Google-style docstring format
82
+ - **Comments**: Write clear, concise comments for complex logic
83
+
84
+ ## Testing
85
+
86
+ ### Running Tests
87
+
88
+ ```bash
89
+ # Run all tests
90
+ pytest
91
+
92
+ # Run specific test file
93
+ pytest tests/plugins/utils/test_config.py
94
+
95
+ # Run with coverage
96
+ pytest --cov=synapse_sdk
97
+ ```
98
+
99
+ ### Writing Tests
100
+
101
+ - Write tests for all new functionality
102
+ - Use descriptive test names that explain the scenario
103
+ - Include both positive and negative test cases
104
+ - Mock external dependencies appropriately
105
+ - Maintain high test coverage
106
+
107
+ #### Test Structure
108
+
109
+ ```python
110
+ class TestMyFeature:
111
+ """Test MyFeature functionality."""
112
+
113
+ def test_feature_success_case(self):
114
+ """Test successful feature operation."""
115
+ # Arrange
116
+ input_data = {"key": "value"}
117
+
118
+ # Act
119
+ result = my_feature(input_data)
120
+
121
+ # Assert
122
+ assert result == expected_output
123
+
124
+ def test_feature_error_case(self):
125
+ """Test feature error handling."""
126
+ with pytest.raises(ValueError, match="Expected error message"):
127
+ my_feature(invalid_input)
128
+ ```
129
+
130
+ ## Plugin Development
131
+
132
+ ### Creating New Plugin Utilities
133
+
134
+ When adding new plugin utilities:
135
+
136
+ 1. **Add to appropriate module**:
137
+ - Configuration utilities → `synapse_sdk/plugins/utils/config.py`
138
+ - Action utilities → `synapse_sdk/plugins/utils/actions.py`
139
+ - Registry utilities → `synapse_sdk/plugins/utils/registry.py`
140
+
141
+ 2. **Include comprehensive docstrings**:
142
+ ```python
143
+ def my_utility_function(param: str) -> Dict[str, Any]:
144
+ """Brief description of the function.
145
+
146
+ Args:
147
+ param: Description of the parameter.
148
+
149
+ Returns:
150
+ Description of the return value.
151
+
152
+ Raises:
153
+ ValueError: When input is invalid.
154
+
155
+ Examples:
156
+ >>> my_utility_function("example")
157
+ {'result': 'processed'}
158
+ """
159
+ ```
160
+
161
+ 3. **Add to `__all__` exports**
162
+ 4. **Write comprehensive tests**
163
+ 5. **Update documentation**
164
+
165
+ ### Plugin Categories
166
+
167
+ When working with plugin categories:
168
+
169
+ - Use existing categories when possible
170
+ - Follow naming conventions: `snake_case`
171
+ - Add proper validation and error handling
172
+ - Update category enums if adding new categories
173
+
174
+ ## Documentation
175
+
176
+ ### API Documentation
177
+
178
+ - Update docstrings for all public functions
179
+ - Include usage examples in docstrings
180
+ - Add type hints for better IDE support
181
+ - Document error conditions and exceptions
182
+
183
+ ### User Documentation
184
+
185
+ Update relevant documentation files:
186
+
187
+ - **API Reference**: `docs/api/plugins/utils.md`
188
+ - **Feature Guides**: `docs/features/plugins/index.md`
189
+ - **Changelog**: `docs/changelog.md`
190
+ - **Examples**: Add practical usage examples
191
+
192
+ ### Documentation Format
193
+
194
+ Use clear, concise language with:
195
+
196
+ - Code examples for all functions
197
+ - Parameter and return value descriptions
198
+ - Error handling examples
199
+ - Migration guides for breaking changes
200
+
201
+ ## Pull Request Process
202
+
203
+ ### Before Submitting
204
+
205
+ 1. **Run formatting and linting**:
206
+ ```bash
207
+ ruff format .
208
+ ruff check --fix .
209
+ ```
210
+
211
+ 2. **Run all tests**:
212
+ ```bash
213
+ pytest
214
+ ```
215
+
216
+ 3. **Update documentation** as needed
217
+
218
+ 4. **Add changelog entry** for significant changes
219
+
220
+ ### Pull Request Guidelines
221
+
222
+ - **Clear title**: Describe what the PR accomplishes
223
+ - **Detailed description**: Explain the changes and motivation
224
+ - **Reference issues**: Link to relevant GitHub issues
225
+ - **Test coverage**: Ensure new code is tested
226
+ - **Documentation**: Update docs for user-facing changes
227
+
228
+ ### PR Template
229
+
230
+ ```markdown
231
+ ## Description
232
+ Brief description of changes
233
+
234
+ ## Type of Change
235
+ - [ ] Bug fix
236
+ - [ ] New feature
237
+ - [ ] Breaking change
238
+ - [ ] Documentation update
239
+
240
+ ## Testing
241
+ - [ ] Tests pass locally
242
+ - [ ] New tests added for new functionality
243
+ - [ ] Code formatted with Ruff
244
+
245
+ ## Documentation
246
+ - [ ] API documentation updated
247
+ - [ ] User guide updated if needed
248
+ - [ ] Changelog entry added
249
+ ```
250
+
251
+ ## Code Review
252
+
253
+ ### Review Criteria
254
+
255
+ - **Functionality**: Code works as intended
256
+ - **Quality**: Follows coding standards and best practices
257
+ - **Testing**: Adequate test coverage
258
+ - **Documentation**: Clear documentation for public APIs
259
+ - **Performance**: No obvious performance issues
260
+ - **Security**: No security vulnerabilities
261
+
262
+ ### Responding to Feedback
263
+
264
+ - Address all reviewer comments
265
+ - Ask for clarification if feedback is unclear
266
+ - Make requested changes promptly
267
+ - Re-run formatting and tests after changes
268
+
269
+ ## Project Structure
270
+
271
+ Understanding the project organization:
272
+
273
+ ```
274
+ synapse_sdk/
275
+ ├── plugins/
276
+ │ ├── utils/ # Plugin utilities (modular)
277
+ │ │ ├── config.py # Configuration utilities
278
+ │ │ ├── actions.py # Action management
279
+ │ │ └── registry.py # Registry utilities
280
+ │ ├── categories/ # Plugin category implementations
281
+ │ └── models.py # Core plugin models
282
+ ├── clients/ # API clients
283
+ ├── utils/ # General utilities
284
+ └── devtools/ # Development tools
285
+
286
+ tests/
287
+ ├── plugins/
288
+ │ └── utils/ # Plugin utility tests
289
+ └── ... # Other test modules
290
+
291
+ docs/ # Documentation
292
+ ├── api/ # API reference
293
+ ├── features/ # Feature guides
294
+ └── changelog.md # Change log
295
+ ```
296
+
297
+ ## Getting Help
298
+
299
+ - **GitHub Issues**: Report bugs or request features
300
+ - **Discussions**: Ask questions or discuss ideas
301
+ - **Documentation**: Check existing docs first
302
+ - **Code Review**: Ask for clarification during review
303
+
304
+ ## License
305
+
306
+ By contributing to Synapse SDK, you agree that your contributions will be licensed under the same license as the project (MIT License).