@kajidog/connpass-mcp-server 0.3.0 → 0.4.1
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 +72 -149
- package/dist/index.d.ts +0 -2
- package/dist/index.js +4749 -162
- package/dist/index.js.map +1 -1
- package/dist/mcp-app.html +139 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +2140 -0
- package/dist/stdio.js.map +1 -0
- package/package.json +18 -18
- package/dist/apps-sdk.d.ts +0 -8
- package/dist/apps-sdk.d.ts.map +0 -1
- package/dist/apps-sdk.js +0 -93
- package/dist/apps-sdk.js.map +0 -1
- package/dist/config.d.ts +0 -7
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -82
- package/dist/config.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tools/events.d.ts +0 -74
- package/dist/tools/events.d.ts.map +0 -1
- package/dist/tools/events.js +0 -413
- package/dist/tools/events.js.map +0 -1
- package/dist/tools/formatting.d.ts +0 -74
- package/dist/tools/formatting.d.ts.map +0 -1
- package/dist/tools/formatting.js +0 -222
- package/dist/tools/formatting.js.map +0 -1
- package/dist/tools/groups.d.ts +0 -48
- package/dist/tools/groups.d.ts.map +0 -1
- package/dist/tools/groups.js +0 -106
- package/dist/tools/groups.js.map +0 -1
- package/dist/tools/index.d.ts +0 -54
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -21
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/shared.d.ts +0 -24
- package/dist/tools/shared.d.ts.map +0 -1
- package/dist/tools/shared.js +0 -113
- package/dist/tools/shared.js.map +0 -1
- package/dist/tools/users.d.ts +0 -51
- package/dist/tools/users.d.ts.map +0 -1
- package/dist/tools/users.js +0 -239
- package/dist/tools/users.js.map +0 -1
- package/dist/transports/http.d.ts +0 -17
- package/dist/transports/http.d.ts.map +0 -1
- package/dist/transports/http.js +0 -185
- package/dist/transports/http.js.map +0 -1
- package/dist/transports/sse.d.ts +0 -21
- package/dist/transports/sse.d.ts.map +0 -1
- package/dist/transports/sse.js +0 -161
- package/dist/transports/sse.js.map +0 -1
- package/dist/widgets/connpass-events.d.ts +0 -41
- package/dist/widgets/connpass-events.d.ts.map +0 -1
- package/dist/widgets/connpass-events.js +0 -68
- package/dist/widgets/connpass-events.js.map +0 -1
- package/dist/widgets/connpass-schedule.d.ts +0 -41
- package/dist/widgets/connpass-schedule.d.ts.map +0 -1
- package/dist/widgets/connpass-schedule.js +0 -68
- package/dist/widgets/connpass-schedule.js.map +0 -1
- package/dist/widgets/index.d.ts +0 -6
- package/dist/widgets/index.d.ts.map +0 -1
- package/dist/widgets/index.js +0 -39
- package/dist/widgets/index.js.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { Event, EventsResponse, Presentation, PresentationsResponse } from "@kajidog/connpass-api-client";
|
|
2
|
-
export interface FormatEventOptions {
|
|
3
|
-
descriptionLimit?: number;
|
|
4
|
-
catchPhraseLimit?: number;
|
|
5
|
-
presentationDescriptionLimit?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface FormattedPresentation {
|
|
8
|
-
id: number;
|
|
9
|
-
title: string;
|
|
10
|
-
speaker: string;
|
|
11
|
-
summary?: string;
|
|
12
|
-
links?: {
|
|
13
|
-
url?: string;
|
|
14
|
-
slideshare?: string;
|
|
15
|
-
youtube?: string;
|
|
16
|
-
twitter?: string;
|
|
17
|
-
};
|
|
18
|
-
order: number;
|
|
19
|
-
updatedAt: string;
|
|
20
|
-
}
|
|
21
|
-
export interface FormattedEvent {
|
|
22
|
-
id: number;
|
|
23
|
-
title: string;
|
|
24
|
-
catchPhrase?: string;
|
|
25
|
-
summary?: string;
|
|
26
|
-
url: string;
|
|
27
|
-
hashTag?: string;
|
|
28
|
-
imageUrl?: string;
|
|
29
|
-
schedule: {
|
|
30
|
-
start: string;
|
|
31
|
-
end: string;
|
|
32
|
-
};
|
|
33
|
-
location?: {
|
|
34
|
-
place?: string;
|
|
35
|
-
address?: string;
|
|
36
|
-
};
|
|
37
|
-
owner: {
|
|
38
|
-
nickname: string;
|
|
39
|
-
displayName: string;
|
|
40
|
-
};
|
|
41
|
-
participants: {
|
|
42
|
-
accepted: number;
|
|
43
|
-
waiting: number;
|
|
44
|
-
limit?: number;
|
|
45
|
-
};
|
|
46
|
-
group?: {
|
|
47
|
-
id?: number;
|
|
48
|
-
title?: string;
|
|
49
|
-
url?: string;
|
|
50
|
-
};
|
|
51
|
-
updatedAt: string;
|
|
52
|
-
presentations?: FormattedPresentation[];
|
|
53
|
-
}
|
|
54
|
-
export interface FormattedEventsResponse {
|
|
55
|
-
returned: number;
|
|
56
|
-
available: number;
|
|
57
|
-
start: number;
|
|
58
|
-
events: FormattedEvent[];
|
|
59
|
-
}
|
|
60
|
-
export interface FormattedPresentationsResponse {
|
|
61
|
-
returned: number;
|
|
62
|
-
presentations: FormattedPresentation[];
|
|
63
|
-
}
|
|
64
|
-
export declare function truncateText(text: string, limit: number): string;
|
|
65
|
-
export declare function stripHtml(input: string): string;
|
|
66
|
-
export declare function sanitizeRichText(input: string): string;
|
|
67
|
-
export declare function formatPresentation(presentation: Presentation, descriptionLimit?: number): FormattedPresentation;
|
|
68
|
-
export declare function formatPresentationsResponse(response: PresentationsResponse, options?: Pick<FormatEventOptions, "presentationDescriptionLimit">): FormattedPresentationsResponse;
|
|
69
|
-
export declare function formatEvent(event: Event, options?: FormatEventOptions): FormattedEvent;
|
|
70
|
-
export declare function formatEventsResponse(response: EventsResponse, options?: FormatEventOptions): FormattedEventsResponse;
|
|
71
|
-
export declare function formatEventList(events: (Event & {
|
|
72
|
-
presentations?: PresentationsResponse["presentations"];
|
|
73
|
-
})[], options?: FormatEventOptions): FormattedEvent[];
|
|
74
|
-
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/tools/formatting.ts"],"names":[],"mappings":"AAAA,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AAC,KAAK,GAAG;IACf,aAAa,CAAC,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC,EAAE,EACJ,OAAO,CAAC,EAAE,kBAAkB,GAC3B,cAAc,EAAE,CAElB"}
|
package/dist/tools/formatting.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.truncateText = truncateText;
|
|
4
|
-
exports.stripHtml = stripHtml;
|
|
5
|
-
exports.sanitizeRichText = sanitizeRichText;
|
|
6
|
-
exports.formatPresentation = formatPresentation;
|
|
7
|
-
exports.formatPresentationsResponse = formatPresentationsResponse;
|
|
8
|
-
exports.formatEvent = formatEvent;
|
|
9
|
-
exports.formatEventsResponse = formatEventsResponse;
|
|
10
|
-
exports.formatEventList = formatEventList;
|
|
11
|
-
const HTML_ENTITY_MAP = {
|
|
12
|
-
" ": " ",
|
|
13
|
-
"&": "&",
|
|
14
|
-
"<": "<",
|
|
15
|
-
">": ">",
|
|
16
|
-
""": '"',
|
|
17
|
-
""": '"',
|
|
18
|
-
"'": "'",
|
|
19
|
-
"'": "'",
|
|
20
|
-
"`": "`",
|
|
21
|
-
};
|
|
22
|
-
function truncateText(text, limit) {
|
|
23
|
-
if (!text) {
|
|
24
|
-
return "";
|
|
25
|
-
}
|
|
26
|
-
if (text.length <= limit) {
|
|
27
|
-
return text;
|
|
28
|
-
}
|
|
29
|
-
if (limit <= 3) {
|
|
30
|
-
return text.slice(0, limit);
|
|
31
|
-
}
|
|
32
|
-
return `${text.slice(0, limit - 3).trimEnd()}...`;
|
|
33
|
-
}
|
|
34
|
-
function decodeHtmlEntities(input) {
|
|
35
|
-
return input
|
|
36
|
-
.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g, (entity) => {
|
|
37
|
-
const mapped = HTML_ENTITY_MAP[entity];
|
|
38
|
-
if (mapped) {
|
|
39
|
-
return mapped;
|
|
40
|
-
}
|
|
41
|
-
const numericMatch = entity.match(/^&#(x?[0-9a-fA-F]+);$/);
|
|
42
|
-
if (!numericMatch) {
|
|
43
|
-
return entity;
|
|
44
|
-
}
|
|
45
|
-
const value = numericMatch[1];
|
|
46
|
-
const codePoint = value.startsWith("x") || value.startsWith("X")
|
|
47
|
-
? Number.parseInt(value.slice(1), 16)
|
|
48
|
-
: Number.parseInt(value, 10);
|
|
49
|
-
if (!Number.isFinite(codePoint)) {
|
|
50
|
-
return entity;
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
return String.fromCodePoint(codePoint);
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
return entity;
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
.replace(/\u00a0/gi, " ");
|
|
60
|
-
}
|
|
61
|
-
function stripHtml(input) {
|
|
62
|
-
if (!input) {
|
|
63
|
-
return "";
|
|
64
|
-
}
|
|
65
|
-
const withoutScripts = input.replace(/<script[\s\S]*?<\/script>/gi, "");
|
|
66
|
-
const withoutStyles = withoutScripts.replace(/<style[\s\S]*?<\/style>/gi, "");
|
|
67
|
-
// Collapse whitespace between consecutive table cells within a row
|
|
68
|
-
// This handles HTML where there are newlines between </td> and <td>
|
|
69
|
-
const normalizedTableCells = withoutStyles
|
|
70
|
-
.replace(/<\/(td|th)>\s*<(td|th)/gi, "</$1>\t<$2") // Join adjacent cells with tab
|
|
71
|
-
.replace(/<\/(tr)>\s*<tr/gi, "</$1>\n<tr"); // Ensure row breaks stay as newlines
|
|
72
|
-
const withLineBreaks = normalizedTableCells
|
|
73
|
-
.replace(/<br\s*\/?\s*>/gi, "\n")
|
|
74
|
-
.replace(/<\/(p|div|section|article|header|footer|li)>/gi, "\n")
|
|
75
|
-
.replace(/<\/(td|th)>/gi, "\t") // Tab separator between table cells
|
|
76
|
-
.replace(/<li[^>]*>/gi, "- ")
|
|
77
|
-
.replace(/<\/(h[1-6]|tr)>/gi, "\n");
|
|
78
|
-
const withoutTags = withLineBreaks.replace(/<[^>]+>/g, "");
|
|
79
|
-
return decodeHtmlEntities(withoutTags);
|
|
80
|
-
}
|
|
81
|
-
function sanitizeRichText(input) {
|
|
82
|
-
if (!input) {
|
|
83
|
-
return "";
|
|
84
|
-
}
|
|
85
|
-
const stripped = stripHtml(input);
|
|
86
|
-
const normalizedWhitespace = stripped
|
|
87
|
-
.replace(/\r/g, "\n")
|
|
88
|
-
.split(/\n+/)
|
|
89
|
-
.map((line) => line.trim())
|
|
90
|
-
.filter(Boolean)
|
|
91
|
-
.join("\n");
|
|
92
|
-
return normalizedWhitespace.replace(/[\t ]+/g, " ").trim();
|
|
93
|
-
}
|
|
94
|
-
function formatPresentation(presentation, descriptionLimit) {
|
|
95
|
-
const summary = sanitizeRichText(presentation.description);
|
|
96
|
-
const formatted = {
|
|
97
|
-
id: presentation.id,
|
|
98
|
-
title: presentation.title.trim(),
|
|
99
|
-
speaker: presentation.speakerName,
|
|
100
|
-
order: presentation.order,
|
|
101
|
-
updatedAt: presentation.updatedAt,
|
|
102
|
-
};
|
|
103
|
-
const processedSummary = typeof descriptionLimit === "number" && descriptionLimit > 0
|
|
104
|
-
? truncateText(summary, descriptionLimit)
|
|
105
|
-
: summary;
|
|
106
|
-
if (processedSummary) {
|
|
107
|
-
formatted.summary = processedSummary;
|
|
108
|
-
}
|
|
109
|
-
const links = {
|
|
110
|
-
url: presentation.url,
|
|
111
|
-
slideshare: presentation.slideshareUrl,
|
|
112
|
-
youtube: presentation.youtubeUrl,
|
|
113
|
-
twitter: presentation.twitterUrl,
|
|
114
|
-
};
|
|
115
|
-
if (links.url || links.slideshare || links.youtube || links.twitter) {
|
|
116
|
-
formatted.links = links;
|
|
117
|
-
}
|
|
118
|
-
return formatted;
|
|
119
|
-
}
|
|
120
|
-
function formatPresentationsResponse(response, options) {
|
|
121
|
-
const descriptionLimit = options?.presentationDescriptionLimit;
|
|
122
|
-
return {
|
|
123
|
-
returned: response.presentationsReturned,
|
|
124
|
-
presentations: response.presentations.map((presentation) => formatPresentation(presentation, descriptionLimit)),
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function formatEvent(event, options) {
|
|
128
|
-
const descriptionLimit = options?.descriptionLimit;
|
|
129
|
-
const catchPhraseLimit = options?.catchPhraseLimit;
|
|
130
|
-
const presentationDescriptionLimit = options?.presentationDescriptionLimit;
|
|
131
|
-
const catchPhrase = sanitizeRichText(event.catchPhrase);
|
|
132
|
-
const description = sanitizeRichText(event.description);
|
|
133
|
-
const participants = {
|
|
134
|
-
accepted: event.participantCount,
|
|
135
|
-
waiting: event.waitingCount,
|
|
136
|
-
};
|
|
137
|
-
if (typeof event.limit === "number") {
|
|
138
|
-
participants.limit = event.limit;
|
|
139
|
-
}
|
|
140
|
-
const formatted = {
|
|
141
|
-
id: event.id,
|
|
142
|
-
title: event.title.trim(),
|
|
143
|
-
url: event.url,
|
|
144
|
-
schedule: {
|
|
145
|
-
start: event.startedAt,
|
|
146
|
-
end: event.endedAt,
|
|
147
|
-
},
|
|
148
|
-
owner: {
|
|
149
|
-
nickname: event.ownerNickname,
|
|
150
|
-
displayName: event.ownerDisplayName,
|
|
151
|
-
},
|
|
152
|
-
participants,
|
|
153
|
-
updatedAt: event.updatedAt,
|
|
154
|
-
};
|
|
155
|
-
if (event.hashTag) {
|
|
156
|
-
formatted.hashTag = event.hashTag;
|
|
157
|
-
}
|
|
158
|
-
if (event.imageUrl) {
|
|
159
|
-
formatted.imageUrl = event.imageUrl;
|
|
160
|
-
}
|
|
161
|
-
const processedCatchPhrase = typeof catchPhraseLimit === "number" && catchPhraseLimit > 0
|
|
162
|
-
? truncateText(catchPhrase, catchPhraseLimit)
|
|
163
|
-
: catchPhrase;
|
|
164
|
-
if (processedCatchPhrase) {
|
|
165
|
-
formatted.catchPhrase = processedCatchPhrase;
|
|
166
|
-
}
|
|
167
|
-
// descriptionLimit: undefined = no limit (full text)
|
|
168
|
-
// descriptionLimit: 0 = exclude description entirely
|
|
169
|
-
// descriptionLimit: N > 0 = truncate to N characters
|
|
170
|
-
const processedDescription = typeof descriptionLimit === "number"
|
|
171
|
-
? descriptionLimit > 0
|
|
172
|
-
? truncateText(description, descriptionLimit)
|
|
173
|
-
: "" // limit === 0 means exclude
|
|
174
|
-
: description; // undefined means no limit
|
|
175
|
-
if (processedDescription) {
|
|
176
|
-
formatted.summary = processedDescription;
|
|
177
|
-
}
|
|
178
|
-
if (event.place || event.address) {
|
|
179
|
-
const location = {};
|
|
180
|
-
if (event.place) {
|
|
181
|
-
location.place = event.place;
|
|
182
|
-
}
|
|
183
|
-
if (event.address) {
|
|
184
|
-
location.address = event.address;
|
|
185
|
-
}
|
|
186
|
-
if (Object.keys(location).length > 0) {
|
|
187
|
-
formatted.location = location;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if (event.groupId || event.groupTitle || event.groupUrl) {
|
|
191
|
-
const group = {};
|
|
192
|
-
if (typeof event.groupId === "number") {
|
|
193
|
-
group.id = event.groupId;
|
|
194
|
-
}
|
|
195
|
-
if (event.groupTitle) {
|
|
196
|
-
group.title = event.groupTitle;
|
|
197
|
-
}
|
|
198
|
-
if (event.groupUrl) {
|
|
199
|
-
group.url = event.groupUrl;
|
|
200
|
-
}
|
|
201
|
-
if (Object.keys(group).length > 0) {
|
|
202
|
-
formatted.group = group;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
const eventWithPresentations = event;
|
|
206
|
-
if (eventWithPresentations.presentations?.length) {
|
|
207
|
-
formatted.presentations = eventWithPresentations.presentations.map((presentation) => formatPresentation(presentation, presentationDescriptionLimit));
|
|
208
|
-
}
|
|
209
|
-
return formatted;
|
|
210
|
-
}
|
|
211
|
-
function formatEventsResponse(response, options) {
|
|
212
|
-
return {
|
|
213
|
-
returned: response.eventsReturned,
|
|
214
|
-
available: response.eventsAvailable,
|
|
215
|
-
start: response.eventsStart,
|
|
216
|
-
events: response.events.map((event) => formatEvent(event, options)),
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function formatEventList(events, options) {
|
|
220
|
-
return events.map((event) => formatEvent(event, options));
|
|
221
|
-
}
|
|
222
|
-
//# sourceMappingURL=formatting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src/tools/formatting.ts"],"names":[],"mappings":";;AAsFA,oCAcC;AAkCD,8BAuBC;AAED,4CAcC;AAED,gDAmCC;AAED,kEAYC;AAED,kCA4GC;AAED,oDAUC;AAED,0CAOC;AA5VD,MAAM,eAAe,GAA2B;IAC9C,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;CACd,CAAC;AAqEF,SAAgB,YAAY,CAAC,IAAY,EAAE,KAAa;IACtD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACpD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK;SACT,OAAO,CAAC,gCAAgC,EAAE,CAAC,MAAM,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QA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AAC,QAAQ,EAAE,CAAC;YACnB,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC7B,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,MAAM,sBAAsB,GAAG,KAE9B,CAAC;IAEF,IAAI,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QACjD,SAAS,CAAC,aAAa,GAAG,sBAAsB,CAAC,aAAa,CAAC,GAAG,CAChE,CAAC,YAAY,EAAE,EAAE,CACf,kBAAkB,CAAC,YAAY,EAAE,4BAA4B,CAAC,CACjE,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,oBAAoB,CAClC,QAAwB,EACxB,OAA4B;IAE5B,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,cAAc;QACjC,SAAS,EAAE,QAAQ,CAAC,eAAe;QACnC,KAAK,EAAE,QAAQ,CAAC,WAAW;QAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe,CAC7B,MAEI,EACJ,OAA4B;IAE5B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/tools/groups.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ConnpassClient } from "@kajidog/connpass-api-client";
|
|
2
|
-
declare const groupHandlers: {
|
|
3
|
-
search_groups(args: unknown, connpassClient: ConnpassClient): Promise<import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
4
|
-
};
|
|
5
|
-
export type GroupToolName = keyof typeof groupHandlers;
|
|
6
|
-
export declare const groupTools: {
|
|
7
|
-
[x: string]: unknown;
|
|
8
|
-
name: string;
|
|
9
|
-
inputSchema: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
type: "object";
|
|
12
|
-
properties?: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
} | undefined;
|
|
15
|
-
required?: string[] | undefined;
|
|
16
|
-
};
|
|
17
|
-
title?: string | undefined;
|
|
18
|
-
description?: string | undefined;
|
|
19
|
-
_meta?: {
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
} | undefined;
|
|
22
|
-
icons?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
src: string;
|
|
25
|
-
mimeType?: string | undefined;
|
|
26
|
-
sizes?: string[] | undefined;
|
|
27
|
-
}[] | undefined;
|
|
28
|
-
outputSchema?: {
|
|
29
|
-
[x: string]: unknown;
|
|
30
|
-
type: "object";
|
|
31
|
-
properties?: {
|
|
32
|
-
[x: string]: unknown;
|
|
33
|
-
} | undefined;
|
|
34
|
-
required?: string[] | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
annotations?: {
|
|
37
|
-
[x: string]: unknown;
|
|
38
|
-
title?: string | undefined;
|
|
39
|
-
readOnlyHint?: boolean | undefined;
|
|
40
|
-
destructiveHint?: boolean | undefined;
|
|
41
|
-
idempotentHint?: boolean | undefined;
|
|
42
|
-
openWorldHint?: boolean | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
}[];
|
|
45
|
-
export declare function isGroupTool(name: string): name is GroupToolName;
|
|
46
|
-
export declare function handleGroupTool(name: GroupToolName, args: unknown, connpassClient: ConnpassClient): Promise<import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
47
|
-
export {};
|
|
48
|
-
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA0G9D,QAAA,MAAM,aAAa;wBACS,OAAO,kBAAkB,cAAc;CAKlE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAEvD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqB,CAAC;AAE7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,aAAa,CAE/D;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,cAAc,kEAG/B"}
|
package/dist/tools/groups.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.groupTools = void 0;
|
|
4
|
-
exports.isGroupTool = isGroupTool;
|
|
5
|
-
exports.handleGroupTool = handleGroupTool;
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
|
-
const shared_js_1 = require("./shared.js");
|
|
8
|
-
const GroupSearchInputSchema = zod_1.z.object({
|
|
9
|
-
query: zod_1.z
|
|
10
|
-
.string()
|
|
11
|
-
.min(1)
|
|
12
|
-
.describe("Search for groups whose title or description matches all keywords")
|
|
13
|
-
.optional(),
|
|
14
|
-
groupIds: zod_1.z
|
|
15
|
-
.array(zod_1.z.number())
|
|
16
|
-
.describe("Limit results to these group IDs")
|
|
17
|
-
.optional(),
|
|
18
|
-
country: zod_1.z.string().min(1).describe("ISO country code, e.g. 'JP'").optional(),
|
|
19
|
-
prefecture: zod_1.z
|
|
20
|
-
.string()
|
|
21
|
-
.min(1)
|
|
22
|
-
.describe("Prefecture name to filter by")
|
|
23
|
-
.optional(),
|
|
24
|
-
page: zod_1.z.number().int().min(1).describe("1-based page number").optional(),
|
|
25
|
-
pageSize: zod_1.z
|
|
26
|
-
.number()
|
|
27
|
-
.int()
|
|
28
|
-
.min(1)
|
|
29
|
-
.max(100)
|
|
30
|
-
.describe("How many groups per page (default 20)")
|
|
31
|
-
.optional(),
|
|
32
|
-
sort: zod_1.z
|
|
33
|
-
.enum(shared_js_1.GROUP_SORT_KEYS)
|
|
34
|
-
.describe("Ranking by activity, members, or recency")
|
|
35
|
-
.optional(),
|
|
36
|
-
});
|
|
37
|
-
function buildGroupSearchParams(input, options) {
|
|
38
|
-
const pagination = (0, shared_js_1.applyPagination)(input.page, input.pageSize, options);
|
|
39
|
-
return {
|
|
40
|
-
keyword: input.query,
|
|
41
|
-
groupId: input.groupIds,
|
|
42
|
-
countryCode: input.country,
|
|
43
|
-
prefecture: input.prefecture,
|
|
44
|
-
order: input.sort ? shared_js_1.GROUP_SORT_MAP[input.sort] : undefined,
|
|
45
|
-
...pagination,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const groupToolsInternal = [
|
|
49
|
-
{
|
|
50
|
-
name: "search_groups",
|
|
51
|
-
description: "Find Connpass groups with simple filters",
|
|
52
|
-
inputSchema: {
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
query: {
|
|
56
|
-
type: "string",
|
|
57
|
-
description: "Keywords that must match the group title or description",
|
|
58
|
-
},
|
|
59
|
-
groupIds: {
|
|
60
|
-
type: "array",
|
|
61
|
-
items: { type: "number" },
|
|
62
|
-
description: "Only show these specific group IDs",
|
|
63
|
-
},
|
|
64
|
-
country: {
|
|
65
|
-
type: "string",
|
|
66
|
-
description: "ISO country code, e.g. 'JP'",
|
|
67
|
-
},
|
|
68
|
-
prefecture: {
|
|
69
|
-
type: "string",
|
|
70
|
-
description: "Prefecture name to filter by",
|
|
71
|
-
},
|
|
72
|
-
page: {
|
|
73
|
-
type: "integer",
|
|
74
|
-
minimum: 1,
|
|
75
|
-
description: "1-based page number (default 1)",
|
|
76
|
-
},
|
|
77
|
-
pageSize: {
|
|
78
|
-
type: "integer",
|
|
79
|
-
minimum: 1,
|
|
80
|
-
maximum: 100,
|
|
81
|
-
description: "Groups per page (default 20)",
|
|
82
|
-
},
|
|
83
|
-
sort: {
|
|
84
|
-
type: "string",
|
|
85
|
-
enum: [...shared_js_1.GROUP_SORT_KEYS],
|
|
86
|
-
description: "Rank by activity, member count, or recency",
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
const groupHandlers = {
|
|
93
|
-
async search_groups(args, connpassClient) {
|
|
94
|
-
const params = GroupSearchInputSchema.parse(args ?? {});
|
|
95
|
-
const searchParams = buildGroupSearchParams(params);
|
|
96
|
-
return connpassClient.searchGroups(searchParams);
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
exports.groupTools = groupToolsInternal;
|
|
100
|
-
function isGroupTool(name) {
|
|
101
|
-
return name in groupHandlers;
|
|
102
|
-
}
|
|
103
|
-
async function handleGroupTool(name, args, connpassClient) {
|
|
104
|
-
return groupHandlers[name](args, connpassClient);
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=groups.js.map
|
package/dist/tools/groups.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":";;;AAsHA,kCAEC;AAED,0CAMC;AA9HD,6BAAwB;AAExB,2CAKqB;AAErB,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,mEAAmE,CACpE;SACA,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CAAC,kCAAkC,CAAC;SAC5C,QAAQ,EAAE;IACb,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CA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;IAE9B,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/tools/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ConnpassClient } from "@kajidog/connpass-api-client";
|
|
2
|
-
export declare const tools: {
|
|
3
|
-
[x: string]: unknown;
|
|
4
|
-
name: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
[x: string]: unknown;
|
|
7
|
-
type: "object";
|
|
8
|
-
properties?: {
|
|
9
|
-
[x: string]: unknown;
|
|
10
|
-
} | undefined;
|
|
11
|
-
required?: string[] | undefined;
|
|
12
|
-
};
|
|
13
|
-
title?: string | undefined;
|
|
14
|
-
description?: string | undefined;
|
|
15
|
-
_meta?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
icons?: {
|
|
19
|
-
[x: string]: unknown;
|
|
20
|
-
src: string;
|
|
21
|
-
mimeType?: string | undefined;
|
|
22
|
-
sizes?: string[] | undefined;
|
|
23
|
-
}[] | undefined;
|
|
24
|
-
outputSchema?: {
|
|
25
|
-
[x: string]: unknown;
|
|
26
|
-
type: "object";
|
|
27
|
-
properties?: {
|
|
28
|
-
[x: string]: unknown;
|
|
29
|
-
} | undefined;
|
|
30
|
-
required?: string[] | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
annotations?: {
|
|
33
|
-
[x: string]: unknown;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
readOnlyHint?: boolean | undefined;
|
|
36
|
-
destructiveHint?: boolean | undefined;
|
|
37
|
-
idempotentHint?: boolean | undefined;
|
|
38
|
-
openWorldHint?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
}[];
|
|
41
|
-
export declare function handleToolCall(name: string, args: unknown, connpassClient: ConnpassClient): Promise<import("./formatting.js").FormattedEventsResponse | import("./formatting.js").FormattedPresentationsResponse | import("@kajidog/connpass-api-client").EventsResponse | import("@kajidog/connpass-api-client").UsersResponse | {
|
|
42
|
-
userId: number;
|
|
43
|
-
sections: {
|
|
44
|
-
date: string;
|
|
45
|
-
events: import("./formatting.js").FormattedEvent[];
|
|
46
|
-
}[];
|
|
47
|
-
metadata: {
|
|
48
|
-
fromDate: string;
|
|
49
|
-
toDate: string;
|
|
50
|
-
inspected: number;
|
|
51
|
-
limit: number;
|
|
52
|
-
};
|
|
53
|
-
} | import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
54
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AAElE,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,cAAc;;;;;;;;;;;;2DAe/B"}
|
package/dist/tools/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tools = void 0;
|
|
4
|
-
exports.handleToolCall = handleToolCall;
|
|
5
|
-
const events_js_1 = require("./events.js");
|
|
6
|
-
const groups_js_1 = require("./groups.js");
|
|
7
|
-
const users_js_1 = require("./users.js");
|
|
8
|
-
exports.tools = [...events_js_1.eventTools, ...groups_js_1.groupTools, ...users_js_1.userTools];
|
|
9
|
-
async function handleToolCall(name, args, connpassClient) {
|
|
10
|
-
if ((0, events_js_1.isEventTool)(name)) {
|
|
11
|
-
return (0, events_js_1.handleEventTool)(name, args, connpassClient);
|
|
12
|
-
}
|
|
13
|
-
if ((0, groups_js_1.isGroupTool)(name)) {
|
|
14
|
-
return (0, groups_js_1.handleGroupTool)(name, args, connpassClient);
|
|
15
|
-
}
|
|
16
|
-
if ((0, users_js_1.isUserTool)(name)) {
|
|
17
|
-
return (0, users_js_1.handleUserTool)(name, args, connpassClient);
|
|
18
|
-
}
|
|
19
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAQA,wCAkBC;AAxBD,2CAAuE;AACvE,2CAAuE;AACvE,yCAAmE;AAEtD,QAAA,KAAK,GAAG,CAAC,GAAG,sBAAU,EAAE,GAAG,sBAAU,EAAE,GAAG,oBAAS,CAAC,CAAC;AAE3D,KAAK,UAAU,cAAc,CAClC,IAAY,EACZ,IAAa,EACb,cAA8B;IAE9B,IAAI,IAAA,uBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,IAAA,2BAAe,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,IAAA,uBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,IAAA,2BAAe,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,IAAA,yBAAc,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
package/dist/tools/shared.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
2
|
-
export declare const EVENT_SORT_KEYS: readonly ["start-date-asc", "start-date-desc", "newly-added"];
|
|
3
|
-
export type EventSortKey = (typeof EVENT_SORT_KEYS)[number];
|
|
4
|
-
export declare const EVENT_SORT_MAP: Record<EventSortKey, 1 | 2 | 3>;
|
|
5
|
-
export declare const GROUP_SORT_KEYS: readonly ["most-events", "most-members", "newly-added"];
|
|
6
|
-
export type GroupSortKey = (typeof GROUP_SORT_KEYS)[number];
|
|
7
|
-
export declare const GROUP_SORT_MAP: Record<GroupSortKey, 1 | 2 | 3>;
|
|
8
|
-
export declare const USER_SORT_KEYS: readonly ["most-events", "most-followers", "newly-added"];
|
|
9
|
-
export type UserSortKey = (typeof USER_SORT_KEYS)[number];
|
|
10
|
-
export declare const USER_SORT_MAP: Record<UserSortKey, 1 | 2 | 3>;
|
|
11
|
-
export declare function parseDateInput(input: string, options?: {
|
|
12
|
-
style?: "compact" | "hyphenated";
|
|
13
|
-
}): string;
|
|
14
|
-
export declare function toYmdArray(value?: string | string[]): string[] | undefined;
|
|
15
|
-
export declare function parseHyphenatedDate(input: string): string;
|
|
16
|
-
export declare function normalizeStringArray(value?: string | string[]): string[] | undefined;
|
|
17
|
-
export type PaginationParams = {
|
|
18
|
-
start?: number;
|
|
19
|
-
count?: number;
|
|
20
|
-
};
|
|
21
|
-
export declare function applyPagination(page: number | undefined, pageSize: number | undefined, options?: {
|
|
22
|
-
includePagination?: boolean;
|
|
23
|
-
}): PaginationParams;
|
|
24
|
-
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,eAAe,+DAIlB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAI1D,CAAC;AAEF,eAAO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