@crypto512/jicon-mcp 0.7.0 → 1.0.0
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.
- package/README.md +133 -381
- package/TOOL_LIST.md +810 -120
- package/dist/config/constants.d.ts +1 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +1 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/loader.d.ts +1 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +27 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/types.d.ts +8 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/confluence/client.d.ts +38 -0
- package/dist/confluence/client.d.ts.map +1 -1
- package/dist/confluence/client.js +117 -0
- package/dist/confluence/client.js.map +1 -1
- package/dist/confluence/tools.d.ts +102 -75
- package/dist/confluence/tools.d.ts.map +1 -1
- package/dist/confluence/tools.js +510 -151
- package/dist/confluence/tools.js.map +1 -1
- package/dist/confluence/types.d.ts +55 -1
- package/dist/confluence/types.d.ts.map +1 -1
- package/dist/index.js +88 -2
- package/dist/index.js.map +1 -1
- package/dist/jira/tools.d.ts +0 -5
- package/dist/jira/tools.d.ts.map +1 -1
- package/dist/jira/tools.js +40 -87
- package/dist/jira/tools.js.map +1 -1
- package/dist/permissions/filter.d.ts +5 -0
- package/dist/permissions/filter.d.ts.map +1 -1
- package/dist/permissions/filter.js +29 -12
- package/dist/permissions/filter.js.map +1 -1
- package/dist/permissions/tool-registry.d.ts +23 -25
- package/dist/permissions/tool-registry.d.ts.map +1 -1
- package/dist/permissions/tool-registry.js +41 -45
- package/dist/permissions/tool-registry.js.map +1 -1
- package/dist/permissions/write-home-validator.d.ts +35 -0
- package/dist/permissions/write-home-validator.d.ts.map +1 -0
- package/dist/permissions/write-home-validator.js +140 -0
- package/dist/permissions/write-home-validator.js.map +1 -0
- package/dist/tempo/tools.d.ts.map +1 -1
- package/dist/tempo/tools.js +43 -44
- package/dist/tempo/tools.js.map +1 -1
- package/dist/utils/buffer-tools.d.ts +119 -1
- package/dist/utils/buffer-tools.d.ts.map +1 -1
- package/dist/utils/buffer-tools.js +610 -3
- package/dist/utils/buffer-tools.js.map +1 -1
- package/dist/utils/content-buffer.d.ts +46 -0
- package/dist/utils/content-buffer.d.ts.map +1 -1
- package/dist/utils/content-buffer.js +108 -12
- package/dist/utils/content-buffer.js.map +1 -1
- package/dist/utils/http-client.d.ts.map +1 -1
- package/dist/utils/http-client.js +4 -4
- package/dist/utils/http-client.js.map +1 -1
- package/dist/utils/jicon-help.d.ts +29 -0
- package/dist/utils/jicon-help.d.ts.map +1 -0
- package/dist/utils/jicon-help.js +873 -0
- package/dist/utils/jicon-help.js.map +1 -0
- package/dist/utils/plantuml/client.d.ts +40 -0
- package/dist/utils/plantuml/client.d.ts.map +1 -0
- package/dist/utils/plantuml/client.js +306 -0
- package/dist/utils/plantuml/client.js.map +1 -0
- package/dist/utils/plantuml/docker-manager.d.ts +35 -0
- package/dist/utils/plantuml/docker-manager.d.ts.map +1 -0
- package/dist/utils/plantuml/docker-manager.js +280 -0
- package/dist/utils/plantuml/docker-manager.js.map +1 -0
- package/dist/utils/plantuml/index.d.ts +11 -0
- package/dist/utils/plantuml/index.d.ts.map +1 -0
- package/dist/utils/plantuml/index.js +16 -0
- package/dist/utils/plantuml/index.js.map +1 -0
- package/dist/utils/plantuml/service.d.ts +46 -0
- package/dist/utils/plantuml/service.d.ts.map +1 -0
- package/dist/utils/plantuml/service.js +96 -0
- package/dist/utils/plantuml/service.js.map +1 -0
- package/dist/utils/plantuml/tools.d.ts +65 -0
- package/dist/utils/plantuml/tools.d.ts.map +1 -0
- package/dist/utils/plantuml/tools.js +272 -0
- package/dist/utils/plantuml/tools.js.map +1 -0
- package/dist/utils/plantuml/types.d.ts +130 -0
- package/dist/utils/plantuml/types.d.ts.map +1 -0
- package/dist/utils/plantuml/types.js +66 -0
- package/dist/utils/plantuml/types.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +14 -0
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +84 -1
- package/dist/utils/response-formatter.js.map +1 -1
- package/dist/utils/url-tools.d.ts +49 -0
- package/dist/utils/url-tools.d.ts.map +1 -0
- package/dist/utils/url-tools.js +141 -0
- package/dist/utils/url-tools.js.map +1 -0
- package/dist/utils/xhtml/confluence-schema.d.ts +55 -0
- package/dist/utils/xhtml/confluence-schema.d.ts.map +1 -0
- package/dist/utils/xhtml/confluence-schema.js +215 -0
- package/dist/utils/xhtml/confluence-schema.js.map +1 -0
- package/dist/utils/xhtml/index.d.ts +17 -0
- package/dist/utils/xhtml/index.d.ts.map +1 -0
- package/dist/utils/xhtml/index.js +21 -0
- package/dist/utils/xhtml/index.js.map +1 -0
- package/dist/utils/xhtml/operations.d.ts +100 -0
- package/dist/utils/xhtml/operations.d.ts.map +1 -0
- package/dist/utils/xhtml/operations.js +596 -0
- package/dist/utils/xhtml/operations.js.map +1 -0
- package/dist/utils/xhtml/parser.d.ts +64 -0
- package/dist/utils/xhtml/parser.d.ts.map +1 -0
- package/dist/utils/xhtml/parser.js +180 -0
- package/dist/utils/xhtml/parser.js.map +1 -0
- package/dist/utils/xhtml/plantuml.d.ts +112 -0
- package/dist/utils/xhtml/plantuml.d.ts.map +1 -0
- package/dist/utils/xhtml/plantuml.js +251 -0
- package/dist/utils/xhtml/plantuml.js.map +1 -0
- package/dist/utils/xhtml/selector.d.ts +35 -0
- package/dist/utils/xhtml/selector.d.ts.map +1 -0
- package/dist/utils/xhtml/selector.js +358 -0
- package/dist/utils/xhtml/selector.js.map +1 -0
- package/dist/utils/xhtml/serializer.d.ts +26 -0
- package/dist/utils/xhtml/serializer.d.ts.map +1 -0
- package/dist/utils/xhtml/serializer.js +170 -0
- package/dist/utils/xhtml/serializer.js.map +1 -0
- package/dist/utils/xhtml/types.d.ts +134 -0
- package/dist/utils/xhtml/types.d.ts.map +1 -0
- package/dist/utils/xhtml/types.js +65 -0
- package/dist/utils/xhtml/types.js.map +1 -0
- package/dist/utils/xhtml/validator.d.ts +67 -0
- package/dist/utils/xhtml/validator.d.ts.map +1 -0
- package/dist/utils/xhtml/validator.js +300 -0
- package/dist/utils/xhtml/validator.js.map +1 -0
- package/package.json +5 -1
- package/CLAUDE.md +0 -947
- package/CONTRIBUTING.md +0 -371
- package/DEVELOPMENT.md +0 -400
- package/JIRA_API_ANALYSIS.md +0 -275
package/DEVELOPMENT.md
DELETED
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
# Development Guide - Testing Jicon MCP Server
|
|
2
|
-
|
|
3
|
-
## Testing Your Development Version
|
|
4
|
-
|
|
5
|
-
There are several ways to test the MCP server during development:
|
|
6
|
-
|
|
7
|
-
## Method 1: Claude Desktop with Local Build (Recommended)
|
|
8
|
-
|
|
9
|
-
### Step 1: Build the Project
|
|
10
|
-
```bash
|
|
11
|
-
npm run build
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### Step 2: Configure Claude Desktop
|
|
15
|
-
|
|
16
|
-
Edit your Claude Desktop configuration file:
|
|
17
|
-
|
|
18
|
-
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
19
|
-
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"mcpServers": {
|
|
24
|
-
"jicon-dev": {
|
|
25
|
-
"command": "node",
|
|
26
|
-
"args": ["/absolute/path/to/jicon/dist/index.js"],
|
|
27
|
-
"env": {
|
|
28
|
-
"JIRA_URL": "https://jira.example.com",
|
|
29
|
-
"JIRA_USERNAME": "your-email@example.com",
|
|
30
|
-
"JIRA_API_TOKEN": "your-test-token",
|
|
31
|
-
"CONFLUENCE_URL": "https://confluence.example.com",
|
|
32
|
-
"CONFLUENCE_USERNAME": "your-email@example.com",
|
|
33
|
-
"CONFLUENCE_API_TOKEN": "your-test-token"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Or use `.jicon.json` in the project directory:**
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"mcpServers": {
|
|
45
|
-
"jicon-dev": {
|
|
46
|
-
"command": "node",
|
|
47
|
-
"args": ["/absolute/path/to/jicon/dist/index.js"]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Then create `.jicon.json` in your project:
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"jira": {
|
|
58
|
-
"url": "https://jira.example.com",
|
|
59
|
-
"username": "your-email@example.com",
|
|
60
|
-
"token": "your-test-token"
|
|
61
|
-
},
|
|
62
|
-
"confluence": {
|
|
63
|
-
"url": "https://confluence.example.com",
|
|
64
|
-
"username": "your-email@example.com",
|
|
65
|
-
"token": "your-test-token"
|
|
66
|
-
},
|
|
67
|
-
"permissions": {
|
|
68
|
-
"mode": "readonly"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Step 3: Restart Claude Desktop
|
|
74
|
-
|
|
75
|
-
1. Quit Claude Desktop completely
|
|
76
|
-
2. Start Claude Desktop again
|
|
77
|
-
3. The server should appear in the MCP menu (hammer icon)
|
|
78
|
-
|
|
79
|
-
### Step 4: Test in Claude
|
|
80
|
-
|
|
81
|
-
Ask Claude to use the tools:
|
|
82
|
-
```
|
|
83
|
-
Can you search for issues in project TEST using Jira?
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Method 2: MCP Inspector (Best for Debugging)
|
|
89
|
-
|
|
90
|
-
The MCP Inspector is a tool from Anthropic for testing MCP servers.
|
|
91
|
-
|
|
92
|
-
### Install MCP Inspector
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npx @modelcontextprotocol/inspector node dist/index.js
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
This opens a web interface where you can:
|
|
99
|
-
- See all available tools
|
|
100
|
-
- Test tool execution
|
|
101
|
-
- Inspect requests/responses
|
|
102
|
-
- Debug errors
|
|
103
|
-
|
|
104
|
-
### With Configuration File
|
|
105
|
-
|
|
106
|
-
Create `.jicon.json` in the project root first, then:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npx @modelcontextprotocol/inspector node dist/index.js
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
The inspector will read your config automatically.
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Method 3: Manual Testing with stdio
|
|
117
|
-
|
|
118
|
-
### Test the Server Directly
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
# Build first
|
|
122
|
-
npm run build
|
|
123
|
-
|
|
124
|
-
# Run the server
|
|
125
|
-
node dist/index.js
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
You should see:
|
|
129
|
-
```
|
|
130
|
-
✓ Using environment variables (or config file info)
|
|
131
|
-
✓ Jira configured: https://jira.example.com
|
|
132
|
-
✓ Confluence configured: https://confluence.example.com
|
|
133
|
-
✓ Permission mode: full
|
|
134
|
-
✓ Allowed tools: 28/28
|
|
135
|
-
Jicon MCP Server running on stdio
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Send Test JSON-RPC Request
|
|
139
|
-
|
|
140
|
-
The server communicates via JSON-RPC over stdio. You can test manually:
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Method 4: npm link for Global Testing
|
|
149
|
-
|
|
150
|
-
Make your dev version available globally:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
# In the jicon directory
|
|
154
|
-
npm link
|
|
155
|
-
|
|
156
|
-
# Now you can use it anywhere
|
|
157
|
-
jicon-mcp
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Then in Claude Desktop config:
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"mcpServers": {
|
|
164
|
-
"jicon-dev": {
|
|
165
|
-
"command": "jicon-mcp"
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Testing Different Configurations
|
|
174
|
-
|
|
175
|
-
### Test Read-Only Mode
|
|
176
|
-
|
|
177
|
-
Create `.jicon.json`:
|
|
178
|
-
```json
|
|
179
|
-
{
|
|
180
|
-
"jira": { "url": "...", "username": "...", "token": "..." },
|
|
181
|
-
"confluence": { "url": "...", "username": "...", "token": "..." },
|
|
182
|
-
"permissions": {
|
|
183
|
-
"mode": "readonly"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Ask Claude to try creating an issue - it should be denied:
|
|
189
|
-
```
|
|
190
|
-
Create a Jira issue in project TEST
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Expected: Error message about permission denied.
|
|
194
|
-
|
|
195
|
-
### Test Virtual Actions
|
|
196
|
-
|
|
197
|
-
```json
|
|
198
|
-
{
|
|
199
|
-
"permissions": {
|
|
200
|
-
"mode": "custom",
|
|
201
|
-
"whitelist": ["jira_read", "confluence_read"]
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Test that only read actions work.
|
|
207
|
-
|
|
208
|
-
### Test Whitelist
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"permissions": {
|
|
213
|
-
"mode": "custom",
|
|
214
|
-
"whitelist": ["jira_search_issues", "jira_get_issue"]
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Only those 2 tools should be available.
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## Development Workflow
|
|
224
|
-
|
|
225
|
-
### 1. Make Changes to Code
|
|
226
|
-
|
|
227
|
-
Edit files in `src/`:
|
|
228
|
-
```bash
|
|
229
|
-
vim src/jira/tools.ts
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### 2. Rebuild
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
npm run build
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
Or use watch mode:
|
|
239
|
-
```bash
|
|
240
|
-
npm run watch
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### 3. Restart Claude Desktop
|
|
244
|
-
|
|
245
|
-
- Quit Claude Desktop
|
|
246
|
-
- Start it again
|
|
247
|
-
- Test your changes
|
|
248
|
-
|
|
249
|
-
### 4. Check Logs
|
|
250
|
-
|
|
251
|
-
**MacOS Logs:**
|
|
252
|
-
```bash
|
|
253
|
-
tail -f ~/Library/Logs/Claude/mcp*.log
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
**Windows Logs:**
|
|
257
|
-
```
|
|
258
|
-
%APPDATA%\Claude\logs\
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
Look for errors or debug output from your server.
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
## Debugging Tips
|
|
266
|
-
|
|
267
|
-
### Enable Verbose Logging
|
|
268
|
-
|
|
269
|
-
Add console.error statements (they go to stderr, not stdout):
|
|
270
|
-
|
|
271
|
-
```typescript
|
|
272
|
-
console.error("DEBUG: Tool called with args:", args);
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Test Individual Components
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
# Test configuration loading
|
|
279
|
-
node -e "const {ConfigLoader} = require('./dist/config/loader.js'); console.log(ConfigLoader.load())"
|
|
280
|
-
|
|
281
|
-
# Test permission filter
|
|
282
|
-
node -e "const {PermissionFilter} = require('./dist/permissions/filter.js'); const f = new PermissionFilter({mode:'readonly',whitelist:[],blacklist:[]}); console.log(f.isToolAllowed('jira_search_issues'))"
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Run Unit Tests
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
npm test
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Test Specific Test File
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
node --test tests/permissions/filter.test.ts
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
|
-
## Common Issues
|
|
300
|
-
|
|
301
|
-
### Issue: "Command not found"
|
|
302
|
-
|
|
303
|
-
**Solution:** Use absolute path in Claude Desktop config:
|
|
304
|
-
```json
|
|
305
|
-
"args": ["/Users/yourname/projects/jicon/dist/index.js"]
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### Issue: "No services configured"
|
|
309
|
-
|
|
310
|
-
**Solution:** Check your `.jicon.json` or environment variables are set correctly.
|
|
311
|
-
|
|
312
|
-
### Issue: Server not appearing in Claude Desktop
|
|
313
|
-
|
|
314
|
-
**Solution:**
|
|
315
|
-
1. Check config file syntax (valid JSON)
|
|
316
|
-
2. Restart Claude Desktop completely
|
|
317
|
-
3. Check logs for errors
|
|
318
|
-
4. Verify the `command` path is correct
|
|
319
|
-
|
|
320
|
-
### Issue: Permission denied errors
|
|
321
|
-
|
|
322
|
-
**Solution:** Check your `permissions` configuration in `.jicon.json`.
|
|
323
|
-
|
|
324
|
-
### Issue: Changes not taking effect
|
|
325
|
-
|
|
326
|
-
**Solution:**
|
|
327
|
-
1. Run `npm run build` after code changes
|
|
328
|
-
2. Completely quit and restart Claude Desktop
|
|
329
|
-
3. Clear Claude Desktop cache if needed
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Testing Checklist
|
|
334
|
-
|
|
335
|
-
Before committing changes:
|
|
336
|
-
|
|
337
|
-
- [ ] `npm run build` succeeds
|
|
338
|
-
- [ ] `npm test` passes
|
|
339
|
-
- [ ] Server starts without errors
|
|
340
|
-
- [ ] Can list tools via MCP Inspector
|
|
341
|
-
- [ ] Can execute tools in Claude Desktop
|
|
342
|
-
- [ ] Permission system works as expected
|
|
343
|
-
- [ ] Error messages are clear and helpful
|
|
344
|
-
- [ ] Config hierarchy works (project > home > env)
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
## Advanced: Testing with Multiple Configurations
|
|
349
|
-
|
|
350
|
-
Create a test script to quickly switch configs:
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
#!/bin/bash
|
|
354
|
-
# test-config.sh
|
|
355
|
-
|
|
356
|
-
case $1 in
|
|
357
|
-
"full")
|
|
358
|
-
cp .jicon.json.example .jicon.json
|
|
359
|
-
;;
|
|
360
|
-
"readonly")
|
|
361
|
-
cp .jicon.json.readonly .jicon.json
|
|
362
|
-
;;
|
|
363
|
-
"custom")
|
|
364
|
-
cp .jicon.json.custom .jicon.json
|
|
365
|
-
;;
|
|
366
|
-
*)
|
|
367
|
-
echo "Usage: ./test-config.sh [full|readonly|custom]"
|
|
368
|
-
exit 1
|
|
369
|
-
;;
|
|
370
|
-
esac
|
|
371
|
-
|
|
372
|
-
echo "Switched to $1 mode. Restart Claude Desktop to apply."
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## Testing with CI/CD
|
|
378
|
-
|
|
379
|
-
For automated testing, you can use the MCP test utilities:
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
# Run integration tests (coming soon)
|
|
383
|
-
npm run test:integration
|
|
384
|
-
|
|
385
|
-
# Test against mock Jira/Confluence servers
|
|
386
|
-
npm run test:e2e
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
## Need Help?
|
|
392
|
-
|
|
393
|
-
- Check [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines
|
|
394
|
-
- See [README.md](README.md) for configuration examples
|
|
395
|
-
- Open an issue on GitHub for bugs
|
|
396
|
-
- Use GitHub Discussions for questions
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
**Happy Testing! 🚀**
|
package/JIRA_API_ANALYSIS.md
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
# Jira API Compatibility Analysis
|
|
2
|
-
|
|
3
|
-
**Date**: 2025-11-12
|
|
4
|
-
**Analysis**: Jira REST API implementation vs. latest official documentation
|
|
5
|
-
**Target**: Jira Server/Data Center and Jira Cloud
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Executive Summary
|
|
10
|
-
|
|
11
|
-
The current Jira implementation is **FULLY COMPATIBLE** with **Jira Server/Data Center** (versions 8.x, 9.x, and latest) but has **LIMITED COMPATIBILITY** with **Jira Cloud**. While the documentation claims to support both platforms, the implementation uses Server/Data Center-specific patterns that will fail on Cloud instances.
|
|
12
|
-
|
|
13
|
-
### Key Findings
|
|
14
|
-
|
|
15
|
-
| Component | Server/Data Center | Cloud | Status |
|
|
16
|
-
|-----------|-------------------|-------|--------|
|
|
17
|
-
| Core API Version | `/rest/api/2/` ✅ | `/rest/api/3/` ❌ | **Partial** |
|
|
18
|
-
| Agile API Version | `/rest/agile/1.0/` ✅ | `/rest/agile/1.0/` ✅ | **Good** |
|
|
19
|
-
| User References | `{ name: "username" }` ✅ | `{ accountId: "..." }` ❌ | **Incompatible** |
|
|
20
|
-
| Authentication | Basic + Bearer ✅ | Basic (email + token) ✅ | **Good** |
|
|
21
|
-
| Search Method | POST ✅ | POST ✅ | **Good** |
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Detailed Analysis
|
|
26
|
-
|
|
27
|
-
### 1. Core API Endpoints (`/rest/api/2/`)
|
|
28
|
-
|
|
29
|
-
#### Status: ✅ CURRENT for Server/Data Center
|
|
30
|
-
|
|
31
|
-
**Current Implementation**: `/rest/api/2/`
|
|
32
|
-
|
|
33
|
-
**Finding**: The implementation correctly uses `/rest/api/2/` for all core operations:
|
|
34
|
-
- Issue search: `/rest/api/2/search` (line 42 in client.ts)
|
|
35
|
-
- Issue operations: `/rest/api/2/issue/{key}`
|
|
36
|
-
- Comments: `/rest/api/2/issue/{key}/comment`
|
|
37
|
-
- Projects: `/rest/api/2/project`
|
|
38
|
-
- Transitions: `/rest/api/2/issue/{key}/transitions`
|
|
39
|
-
- Issue links: `/rest/api/2/issueLink`
|
|
40
|
-
|
|
41
|
-
**Recommendation**: ✅ **No changes needed** for Server/Data Center. This is the current and correct API version for Jira Server/Data Center 8.x, 9.x, and latest (11.2.0).
|
|
42
|
-
|
|
43
|
-
**Note for Cloud**: Jira Cloud uses `/rest/api/3/` as its primary API version, though `/rest/api/2/` is still supported for backward compatibility. For full Cloud support, consider adding v3 endpoints.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
### 2. Agile API Endpoints (`/rest/agile/1.0/`)
|
|
48
|
-
|
|
49
|
-
#### Status: ✅ CURRENT for both Server/Data Center and Cloud
|
|
50
|
-
|
|
51
|
-
**Current Implementation**: `/rest/agile/1.0/`
|
|
52
|
-
|
|
53
|
-
**Finding**: The implementation correctly uses `/rest/agile/1.0/` for all Agile operations:
|
|
54
|
-
- Boards: `/rest/agile/1.0/board/{id}` (line 268)
|
|
55
|
-
- Sprints: `/rest/agile/1.0/board/{id}/sprint` (line 282)
|
|
56
|
-
- Sprint issues: `/rest/agile/1.0/sprint/{id}/issue` (line 299)
|
|
57
|
-
|
|
58
|
-
**Verification**: Checked against latest Jira Agile Data Center 9.17.0 REST API documentation. Version 1.0 is still current across all versions.
|
|
59
|
-
|
|
60
|
-
**Recommendation**: ✅ **No changes needed**. This is correct and not obsolete.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
### 3. Issue Search Method (GET vs POST)
|
|
65
|
-
|
|
66
|
-
#### Status: ✅ OPTIMAL
|
|
67
|
-
|
|
68
|
-
**Current Implementation**: POST `/rest/api/2/search`
|
|
69
|
-
|
|
70
|
-
**Finding**: The implementation uses POST for issue search (line 42 in client.ts):
|
|
71
|
-
```typescript
|
|
72
|
-
return this.http.post<JiraSearchResult>("/rest/api/2/search", params);
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Best Practice**: According to official documentation:
|
|
76
|
-
- GET is suitable for simple queries
|
|
77
|
-
- POST is recommended when JQL is large to avoid URL length limitations
|
|
78
|
-
|
|
79
|
-
**Recommendation**: ✅ **No changes needed**. Using POST is the safer and more robust approach.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
### 4. User Field Format (CRITICAL ISSUE)
|
|
84
|
-
|
|
85
|
-
#### Status: ❌ INCOMPATIBLE with Jira Cloud
|
|
86
|
-
|
|
87
|
-
**Current Implementation**: `{ name: "username" }`
|
|
88
|
-
|
|
89
|
-
**Code Location**: `src/jira/client.ts:92`
|
|
90
|
-
```typescript
|
|
91
|
-
if (issueData.assignee) {
|
|
92
|
-
fields.assignee = { name: issueData.assignee };
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Problem**: This format only works for Jira Server/Data Center. Jira Cloud requires:
|
|
97
|
-
```typescript
|
|
98
|
-
fields.assignee = { accountId: "5b10ac8d82e05b22cc7d4ef5" };
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Background**:
|
|
102
|
-
- **Pre-GDPR (before 2018)**: Jira used `name` and `key` fields for users
|
|
103
|
-
- **Post-GDPR (2018+)**: Jira Cloud deprecated `name`/`key` fields
|
|
104
|
-
- **Current (2024)**: Cloud requires `accountId`, Server/Data Center still uses `name`
|
|
105
|
-
|
|
106
|
-
**Impact**:
|
|
107
|
-
- ❌ Creating/updating issues with assignee will fail on Jira Cloud
|
|
108
|
-
- ✅ Works correctly on Server/Data Center
|
|
109
|
-
|
|
110
|
-
**Recommendation**: Implement Cloud detection and conditional field format:
|
|
111
|
-
|
|
112
|
-
```typescript
|
|
113
|
-
// Detect if Cloud instance
|
|
114
|
-
private isCloudInstance(): boolean {
|
|
115
|
-
return this.config.url.includes('.atlassian.net');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// In createIssue method:
|
|
119
|
-
if (issueData.assignee) {
|
|
120
|
-
if (this.isCloudInstance()) {
|
|
121
|
-
fields.assignee = { accountId: issueData.assignee };
|
|
122
|
-
} else {
|
|
123
|
-
fields.assignee = { name: issueData.assignee };
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
**Alternative**: Document that assignee parameter should be formatted according to instance type, and users should provide the correct identifier format.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
### 5. Other Field Formats
|
|
133
|
-
|
|
134
|
-
#### Status: ✅ CORRECT
|
|
135
|
-
|
|
136
|
-
**Current Implementation**:
|
|
137
|
-
```typescript
|
|
138
|
-
project: { key: issueData.projectKey } // ✅ Correct
|
|
139
|
-
issuetype: { name: issueData.issueType } // ✅ Correct
|
|
140
|
-
priority: { name: issueData.priority } // ✅ Correct
|
|
141
|
-
components: issueData.components.map(name => ({ name })) // ✅ Correct
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Finding**: All other field formats follow the correct patterns for both Cloud and Server/Data Center.
|
|
145
|
-
|
|
146
|
-
**Recommendation**: ✅ **No changes needed**.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### 6. Authentication Methods
|
|
151
|
-
|
|
152
|
-
#### Status: ✅ GOOD
|
|
153
|
-
|
|
154
|
-
**Current Implementation**: Supports both Basic Auth and Bearer Auth
|
|
155
|
-
|
|
156
|
-
**Server/Data Center**:
|
|
157
|
-
- ✅ Basic Auth: username + password/token
|
|
158
|
-
- ✅ Bearer Auth: Personal Access Token (PAT) for 8.14+
|
|
159
|
-
|
|
160
|
-
**Cloud**:
|
|
161
|
-
- ✅ Basic Auth: email + API token
|
|
162
|
-
|
|
163
|
-
**Recommendation**: ✅ **No changes needed**. Authentication is correctly implemented.
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
### 7. Deprecated Features Check
|
|
168
|
-
|
|
169
|
-
#### OAuth 1.0a
|
|
170
|
-
- **Status**: Deprecated in Jira Agile API
|
|
171
|
-
- **Impact**: Not applicable (we don't use OAuth)
|
|
172
|
-
|
|
173
|
-
#### createmeta Endpoint
|
|
174
|
-
- **Status**: Removed in Jira 9.0 due to performance issues
|
|
175
|
-
- **Impact**: Not applicable (we don't use this endpoint)
|
|
176
|
-
|
|
177
|
-
#### User Privacy API
|
|
178
|
-
- **Status**: `name` field deprecated in Cloud only
|
|
179
|
-
- **Impact**: ❌ Affects our assignee field implementation (see section 4)
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Missing Modern Features
|
|
184
|
-
|
|
185
|
-
While the implementation is not using obsolete APIs, there are some modern features that could be added:
|
|
186
|
-
|
|
187
|
-
1. **Issue Properties API** - Store custom key-value data on issues
|
|
188
|
-
2. **Bulk Operations** - Update multiple issues in one call
|
|
189
|
-
3. **Advanced Search Features** - More sophisticated JQL query building
|
|
190
|
-
4. **Webhooks** - Real-time event notifications
|
|
191
|
-
5. **User Search API** - Find users by email/name to get accountId (critical for Cloud support)
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Recommendations
|
|
196
|
-
|
|
197
|
-
### Priority 1: Critical (Cloud Compatibility)
|
|
198
|
-
|
|
199
|
-
1. **Add Cloud/Data Center Detection**
|
|
200
|
-
```typescript
|
|
201
|
-
private isCloudInstance(): boolean {
|
|
202
|
-
return this.config.url.includes('.atlassian.net');
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
2. **Fix Assignee Field Format**
|
|
207
|
-
- Implement conditional formatting based on instance type
|
|
208
|
-
- Add user search tool to get accountId on Cloud instances
|
|
209
|
-
- Update documentation to clarify assignee parameter format
|
|
210
|
-
|
|
211
|
-
3. **Update Documentation**
|
|
212
|
-
- Clarify that current implementation is optimized for Server/Data Center
|
|
213
|
-
- Document Cloud limitations
|
|
214
|
-
- Provide examples for both platforms
|
|
215
|
-
|
|
216
|
-
### Priority 2: Enhancement (Optional)
|
|
217
|
-
|
|
218
|
-
1. **Add User Search Tool**
|
|
219
|
-
```typescript
|
|
220
|
-
async searchUsers(query: string): Promise<User[]> {
|
|
221
|
-
const endpoint = this.isCloudInstance()
|
|
222
|
-
? '/rest/api/3/user/search'
|
|
223
|
-
: '/rest/api/2/user/search';
|
|
224
|
-
return this.http.get(endpoint, { params: { query } });
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
2. **Consider Cloud v3 API Support**
|
|
229
|
-
- Add optional v3 endpoint support for Cloud instances
|
|
230
|
-
- Maintain v2 backward compatibility
|
|
231
|
-
|
|
232
|
-
3. **Add Bulk Operations**
|
|
233
|
-
- Implement bulk update/transition endpoints
|
|
234
|
-
- Reduce API calls for batch operations
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## Conclusion
|
|
239
|
-
|
|
240
|
-
### Current Status: ✅ FULLY COMPATIBLE with Server/Data Center
|
|
241
|
-
|
|
242
|
-
The Jira implementation uses **current, non-obsolete APIs** for Jira Server/Data Center:
|
|
243
|
-
- ✅ `/rest/api/2/` is the correct version (not obsolete)
|
|
244
|
-
- ✅ `/rest/agile/1.0/` is the current Agile API version
|
|
245
|
-
- ✅ Field formats are correct for Server/Data Center
|
|
246
|
-
- ✅ Authentication methods are modern and secure
|
|
247
|
-
- ✅ Search implementation follows best practices
|
|
248
|
-
|
|
249
|
-
### Cloud Compatibility: ⚠️ LIMITED
|
|
250
|
-
|
|
251
|
-
The implementation has **limited Cloud support**:
|
|
252
|
-
- ❌ User field format incompatible (`name` vs `accountId`)
|
|
253
|
-
- ⚠️ Using v2 API instead of recommended v3 for Cloud
|
|
254
|
-
- ✅ Authentication works correctly
|
|
255
|
-
- ✅ Most read operations work correctly
|
|
256
|
-
|
|
257
|
-
### Final Recommendation
|
|
258
|
-
|
|
259
|
-
**If targeting Server/Data Center only**: ✅ **NO CHANGES NEEDED** - implementation is current and correct.
|
|
260
|
-
|
|
261
|
-
**If targeting both Cloud and Data Center**: ⚠️ **UPDATES REQUIRED**:
|
|
262
|
-
1. Implement Cloud detection
|
|
263
|
-
2. Fix user field formats
|
|
264
|
-
3. Add user search capability
|
|
265
|
-
4. Update documentation to clarify platform-specific behavior
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## References
|
|
270
|
-
|
|
271
|
-
- [Jira Data Center REST API v11.2.0](https://developer.atlassian.com/server/jira/platform/rest/v10000/)
|
|
272
|
-
- [Jira Cloud REST API v3](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
|
|
273
|
-
- [Jira Agile Data Center 9.17.0 REST API](https://docs.atlassian.com/jira-software/REST/9.17.0/)
|
|
274
|
-
- [Jira REST API Examples](https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/)
|
|
275
|
-
- [GDPR User API Migration](https://community.atlassian.com/t5/Jira-questions/What-value-should-be-used-in-assignee-filed-while-creating-issue/qaq-p/1352474)
|