@crypto512/jicon-mcp 0.2.0 → 0.3.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/CLAUDE.md +9 -0
- package/JIRA_API_ANALYSIS.md +275 -0
- package/dist/confluence/client.d.ts +25 -5
- package/dist/confluence/client.d.ts.map +1 -1
- package/dist/confluence/client.js +14 -9
- package/dist/confluence/client.js.map +1 -1
- package/dist/confluence/tools.d.ts +20 -0
- package/dist/confluence/tools.d.ts.map +1 -1
- package/dist/confluence/tools.js +108 -16
- package/dist/confluence/tools.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/jira/client.d.ts +15 -4
- package/dist/jira/client.d.ts.map +1 -1
- package/dist/jira/client.js +11 -7
- package/dist/jira/client.js.map +1 -1
- package/dist/jira/tools.d.ts +20 -0
- package/dist/jira/tools.d.ts.map +1 -1
- package/dist/jira/tools.js +85 -11
- package/dist/jira/tools.js.map +1 -1
- package/dist/tempo/client.d.ts +11 -4
- package/dist/tempo/client.d.ts.map +1 -1
- package/dist/tempo/client.js +98 -25
- package/dist/tempo/client.js.map +1 -1
- package/dist/tempo/formatters.d.ts.map +1 -1
- package/dist/tempo/formatters.js +58 -21
- package/dist/tempo/formatters.js.map +1 -1
- package/dist/tempo/tools.d.ts +14 -6
- package/dist/tempo/tools.d.ts.map +1 -1
- package/dist/tempo/tools.js +43 -19
- package/dist/tempo/tools.js.map +1 -1
- package/dist/tempo/types.d.ts +10 -9
- package/dist/tempo/types.d.ts.map +1 -1
- package/dist/tempo/types.js +1 -0
- package/dist/tempo/types.js.map +1 -1
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -28,6 +28,7 @@ A Model Context Protocol (MCP) server that provides seamless integration with At
|
|
|
28
28
|
- **Team Tracking**: Access team worklogs and time tracking data
|
|
29
29
|
- **Account Management**: View and manage Tempo accounts
|
|
30
30
|
- **User Info**: Retrieve user time tracking information
|
|
31
|
+
- **v4 API**: Uses Tempo v4 API with automatic key-to-ID conversion
|
|
31
32
|
|
|
32
33
|
## Installation
|
|
33
34
|
|
|
@@ -80,6 +81,14 @@ CONFLUENCE_AUTH_TYPE=bearer
|
|
|
80
81
|
2. Select "Personal access tokens" in the left menu
|
|
81
82
|
3. Create a new token with appropriate permissions
|
|
82
83
|
|
|
84
|
+
### Tempo Configuration
|
|
85
|
+
|
|
86
|
+
Tempo uses the same authentication as Jira (same URL and credentials). This server uses **Tempo v4 API**, which requires issueId and projectId (integers) instead of string keys. The server automatically converts user-friendly keys (e.g., "PROJ-123") to the numeric IDs required by the v4 API.
|
|
87
|
+
|
|
88
|
+
**Requirements:**
|
|
89
|
+
- Tempo 3.x or later (which provides v4 API)
|
|
90
|
+
- Same Jira credentials for authentication
|
|
91
|
+
|
|
83
92
|
### Claude Desktop Configuration
|
|
84
93
|
|
|
85
94
|
#### For Jira/Confluence Cloud:
|
|
@@ -0,0 +1,275 @@
|
|
|
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)
|
|
@@ -6,7 +6,7 @@ import type { ConfluencePage, ConfluenceSearchResult, ConfluenceSpace, Confluenc
|
|
|
6
6
|
export declare class ConfluenceClient {
|
|
7
7
|
private http;
|
|
8
8
|
constructor(config: ApiConfig);
|
|
9
|
-
searchContent(cql: string, limit?: number, expand?: string[]): Promise<ConfluenceSearchResult>;
|
|
9
|
+
searchContent(cql: string, limit?: number, expand?: string[], start?: number): Promise<ConfluenceSearchResult>;
|
|
10
10
|
getPage(pageId: string, expand?: string[]): Promise<ConfluencePage>;
|
|
11
11
|
getPageByTitle(spaceKey: string, title: string, expand?: string[]): Promise<ConfluencePage | null>;
|
|
12
12
|
createPage(pageData: {
|
|
@@ -18,13 +18,33 @@ export declare class ConfluenceClient {
|
|
|
18
18
|
}): Promise<ConfluencePage>;
|
|
19
19
|
updatePage(pageId: string, version: number, title?: string, content?: string, minorEdit?: boolean): Promise<ConfluencePage>;
|
|
20
20
|
deletePage(pageId: string): Promise<void>;
|
|
21
|
-
listSpaces(limit?: number, type?: "global" | "personal"): Promise<
|
|
21
|
+
listSpaces(limit?: number, type?: "global" | "personal", start?: number): Promise<{
|
|
22
|
+
results: ConfluenceSpace[];
|
|
23
|
+
size: number;
|
|
24
|
+
start: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
}>;
|
|
22
27
|
getSpace(spaceKey: string, expand?: string[]): Promise<ConfluenceSpace>;
|
|
23
|
-
getPageChildren(pageId: string, expand?: string[], limit?: number): Promise<
|
|
28
|
+
getPageChildren(pageId: string, expand?: string[], limit?: number, start?: number): Promise<{
|
|
29
|
+
results: ConfluencePage[];
|
|
30
|
+
size: number;
|
|
31
|
+
start: number;
|
|
32
|
+
limit: number;
|
|
33
|
+
}>;
|
|
24
34
|
addComment(pageId: string, comment: string): Promise<ConfluenceComment>;
|
|
25
|
-
getComments(pageId: string, limit?: number): Promise<
|
|
35
|
+
getComments(pageId: string, limit?: number, start?: number): Promise<{
|
|
36
|
+
results: ConfluenceComment[];
|
|
37
|
+
size: number;
|
|
38
|
+
start: number;
|
|
39
|
+
limit: number;
|
|
40
|
+
}>;
|
|
26
41
|
uploadAttachment(pageId: string, filePath: string, comment?: string): Promise<ConfluenceAttachment>;
|
|
27
|
-
listAttachments(pageId: string, limit?: number): Promise<
|
|
42
|
+
listAttachments(pageId: string, limit?: number, start?: number): Promise<{
|
|
43
|
+
results: ConfluenceAttachment[];
|
|
44
|
+
size: number;
|
|
45
|
+
start: number;
|
|
46
|
+
limit: number;
|
|
47
|
+
}>;
|
|
28
48
|
private addLabels;
|
|
29
49
|
}
|
|
30
50
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/confluence/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AASpB,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAa;gBAEb,MAAM,EAAE,SAAS;IAKvB,aAAa,CACjB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,MAA6B,EACpC,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/confluence/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AASpB,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAa;gBAEb,MAAM,EAAE,SAAS;IAKvB,aAAa,CACjB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,MAA6B,EACpC,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,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AAC,EAAE,MAAM,EACd,KAAK,GAAE,MAAU,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,cAAc,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IA0B/E,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAevE,WAAW,CACf,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,GAAE,MAAU,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAuBlF,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,oBAAoB,CAAC;IAiB1B,eAAe,CACnB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,GAAE,MAAU,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;YAsB7E,SAAS;CAKxB"}
|
|
@@ -11,10 +11,11 @@ export class ConfluenceClient {
|
|
|
11
11
|
this.http = new HttpClient(config);
|
|
12
12
|
}
|
|
13
13
|
// Content search
|
|
14
|
-
async searchContent(cql, limit = DEFAULT_SEARCH_LIMIT, expand) {
|
|
14
|
+
async searchContent(cql, limit = DEFAULT_SEARCH_LIMIT, expand, start = 0) {
|
|
15
15
|
const params = new URLSearchParams();
|
|
16
16
|
params.append("cql", cql);
|
|
17
17
|
params.append("limit", String(limit));
|
|
18
|
+
params.append("start", String(start));
|
|
18
19
|
// Use default expand options if none specified to reduce response size
|
|
19
20
|
const expandToUse = expand && expand.length > 0 ? expand : DEFAULT_SEARCH_EXPAND;
|
|
20
21
|
params.append("expand", expandToUse.join(","));
|
|
@@ -84,7 +85,7 @@ export class ConfluenceClient {
|
|
|
84
85
|
await this.http.delete(`/rest/api/content/${pageId}`);
|
|
85
86
|
}
|
|
86
87
|
// Space operations
|
|
87
|
-
async listSpaces(limit, type) {
|
|
88
|
+
async listSpaces(limit, type, start = 0) {
|
|
88
89
|
const params = new URLSearchParams();
|
|
89
90
|
if (limit) {
|
|
90
91
|
params.append("limit", String(limit));
|
|
@@ -92,10 +93,11 @@ export class ConfluenceClient {
|
|
|
92
93
|
if (type) {
|
|
93
94
|
params.append("type", type);
|
|
94
95
|
}
|
|
96
|
+
params.append("start", String(start));
|
|
95
97
|
const queryString = params.toString();
|
|
96
98
|
const url = `/rest/api/space${queryString ? `?${queryString}` : ""}`;
|
|
97
99
|
const response = await this.http.get(url);
|
|
98
|
-
return response
|
|
100
|
+
return response;
|
|
99
101
|
}
|
|
100
102
|
async getSpace(spaceKey, expand) {
|
|
101
103
|
const params = new URLSearchParams();
|
|
@@ -107,7 +109,7 @@ export class ConfluenceClient {
|
|
|
107
109
|
return this.http.get(url);
|
|
108
110
|
}
|
|
109
111
|
// Page hierarchy
|
|
110
|
-
async getPageChildren(pageId, expand, limit) {
|
|
112
|
+
async getPageChildren(pageId, expand, limit, start = 0) {
|
|
111
113
|
const params = new URLSearchParams();
|
|
112
114
|
if (expand && expand.length > 0) {
|
|
113
115
|
params.append("expand", expand.join(","));
|
|
@@ -115,10 +117,11 @@ export class ConfluenceClient {
|
|
|
115
117
|
if (limit) {
|
|
116
118
|
params.append("limit", String(limit));
|
|
117
119
|
}
|
|
120
|
+
params.append("start", String(start));
|
|
118
121
|
const queryString = params.toString();
|
|
119
122
|
const url = `/rest/api/content/${pageId}/child/page${queryString ? `?${queryString}` : ""}`;
|
|
120
123
|
const response = await this.http.get(url);
|
|
121
|
-
return response
|
|
124
|
+
return response;
|
|
122
125
|
}
|
|
123
126
|
// Comments
|
|
124
127
|
async addComment(pageId, comment) {
|
|
@@ -134,16 +137,17 @@ export class ConfluenceClient {
|
|
|
134
137
|
};
|
|
135
138
|
return this.http.post("/rest/api/content", body);
|
|
136
139
|
}
|
|
137
|
-
async getComments(pageId, limit) {
|
|
140
|
+
async getComments(pageId, limit, start = 0) {
|
|
138
141
|
const params = new URLSearchParams();
|
|
139
142
|
params.append("expand", "body.storage");
|
|
140
143
|
if (limit) {
|
|
141
144
|
params.append("limit", String(limit));
|
|
142
145
|
}
|
|
146
|
+
params.append("start", String(start));
|
|
143
147
|
const queryString = params.toString();
|
|
144
148
|
const url = `/rest/api/content/${pageId}/child/comment?${queryString}`;
|
|
145
149
|
const response = await this.http.get(url);
|
|
146
|
-
return response
|
|
150
|
+
return response;
|
|
147
151
|
}
|
|
148
152
|
// Attachments
|
|
149
153
|
async uploadAttachment(pageId, filePath, comment) {
|
|
@@ -157,15 +161,16 @@ export class ConfluenceClient {
|
|
|
157
161
|
// The implementation here is simplified
|
|
158
162
|
return this.http.post(`/rest/api/content/${pageId}/child/attachment`, formData);
|
|
159
163
|
}
|
|
160
|
-
async listAttachments(pageId, limit) {
|
|
164
|
+
async listAttachments(pageId, limit, start = 0) {
|
|
161
165
|
const params = new URLSearchParams();
|
|
162
166
|
if (limit) {
|
|
163
167
|
params.append("limit", String(limit));
|
|
164
168
|
}
|
|
169
|
+
params.append("start", String(start));
|
|
165
170
|
const queryString = params.toString();
|
|
166
171
|
const url = `/rest/api/content/${pageId}/child/attachment${queryString ? `?${queryString}` : ""}`;
|
|
167
172
|
const response = await this.http.get(url);
|
|
168
|
-
return response
|
|
173
|
+
return response;
|
|
169
174
|
}
|
|
170
175
|
// Labels
|
|
171
176
|
async addLabels(pageId, labels) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"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C,IAAI,CAAC,qBAAqB,MAAM,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -11,19 +11,23 @@ export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
|
11
11
|
cql: z.ZodString;
|
|
12
12
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
14
15
|
}, "strip", z.ZodTypeAny, {
|
|
15
16
|
cql: string;
|
|
16
17
|
expand?: string[] | undefined;
|
|
17
18
|
limit?: number | undefined;
|
|
19
|
+
start?: number | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
cql: string;
|
|
20
22
|
expand?: string[] | undefined;
|
|
21
23
|
limit?: number | undefined;
|
|
24
|
+
start?: number | undefined;
|
|
22
25
|
}>;
|
|
23
26
|
handler: (args: {
|
|
24
27
|
cql: string;
|
|
25
28
|
limit?: number;
|
|
26
29
|
expand?: string[];
|
|
30
|
+
start?: number;
|
|
27
31
|
}) => Promise<ToolResult>;
|
|
28
32
|
};
|
|
29
33
|
confluence_get_page: {
|
|
@@ -140,16 +144,20 @@ export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
|
140
144
|
inputSchema: z.ZodObject<{
|
|
141
145
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
142
146
|
type: z.ZodOptional<z.ZodEnum<["global", "personal"]>>;
|
|
147
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
143
148
|
}, "strip", z.ZodTypeAny, {
|
|
144
149
|
type?: "global" | "personal" | undefined;
|
|
145
150
|
limit?: number | undefined;
|
|
151
|
+
start?: number | undefined;
|
|
146
152
|
}, {
|
|
147
153
|
type?: "global" | "personal" | undefined;
|
|
148
154
|
limit?: number | undefined;
|
|
155
|
+
start?: number | undefined;
|
|
149
156
|
}>;
|
|
150
157
|
handler: (args: {
|
|
151
158
|
limit?: number;
|
|
152
159
|
type?: "global" | "personal";
|
|
160
|
+
start?: number;
|
|
153
161
|
}) => Promise<ToolResult>;
|
|
154
162
|
};
|
|
155
163
|
confluence_get_space: {
|
|
@@ -175,19 +183,23 @@ export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
|
175
183
|
pageId: z.ZodString;
|
|
176
184
|
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
185
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
178
187
|
}, "strip", z.ZodTypeAny, {
|
|
179
188
|
pageId: string;
|
|
180
189
|
expand?: string[] | undefined;
|
|
181
190
|
limit?: number | undefined;
|
|
191
|
+
start?: number | undefined;
|
|
182
192
|
}, {
|
|
183
193
|
pageId: string;
|
|
184
194
|
expand?: string[] | undefined;
|
|
185
195
|
limit?: number | undefined;
|
|
196
|
+
start?: number | undefined;
|
|
186
197
|
}>;
|
|
187
198
|
handler: (args: {
|
|
188
199
|
pageId: string;
|
|
189
200
|
expand?: string[];
|
|
190
201
|
limit?: number;
|
|
202
|
+
start?: number;
|
|
191
203
|
}) => Promise<ToolResult>;
|
|
192
204
|
};
|
|
193
205
|
confluence_add_comment: {
|
|
@@ -212,16 +224,20 @@ export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
|
212
224
|
inputSchema: z.ZodObject<{
|
|
213
225
|
pageId: z.ZodString;
|
|
214
226
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
215
228
|
}, "strip", z.ZodTypeAny, {
|
|
216
229
|
pageId: string;
|
|
217
230
|
limit?: number | undefined;
|
|
231
|
+
start?: number | undefined;
|
|
218
232
|
}, {
|
|
219
233
|
pageId: string;
|
|
220
234
|
limit?: number | undefined;
|
|
235
|
+
start?: number | undefined;
|
|
221
236
|
}>;
|
|
222
237
|
handler: (args: {
|
|
223
238
|
pageId: string;
|
|
224
239
|
limit?: number;
|
|
240
|
+
start?: number;
|
|
225
241
|
}) => Promise<ToolResult>;
|
|
226
242
|
};
|
|
227
243
|
confluence_upload_attachment: {
|
|
@@ -250,16 +266,20 @@ export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
|
250
266
|
inputSchema: z.ZodObject<{
|
|
251
267
|
pageId: z.ZodString;
|
|
252
268
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
253
270
|
}, "strip", z.ZodTypeAny, {
|
|
254
271
|
pageId: string;
|
|
255
272
|
limit?: number | undefined;
|
|
273
|
+
start?: number | undefined;
|
|
256
274
|
}, {
|
|
257
275
|
pageId: string;
|
|
258
276
|
limit?: number | undefined;
|
|
277
|
+
start?: number | undefined;
|
|
259
278
|
}>;
|
|
260
279
|
handler: (args: {
|
|
261
280
|
pageId: string;
|
|
262
281
|
limit?: number;
|
|
282
|
+
start?: number;
|
|
263
283
|
}) => Promise<ToolResult>;
|
|
264
284
|
};
|
|
265
285
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/confluence/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/confluence/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gB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