@aiquants/html-to-markdown 1.0.0 → 1.2.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.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";require("./mcp-server-streamable-DJ-R_Z_E.cjs").runStreamableMcpServer().catch(e=>{process.exit(1)});
2
+ "use strict";require("./mcp-server-streamable-DZ7VyWAg.cjs").runStreamableMcpServer().catch(e=>{process.exit(1)});
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r}from"./mcp-server-streamable-CjY9xfH0.js";r().catch(r=>{process.exit(1)});
2
+ import{r}from"./mcp-server-streamable-CgJP5t9P.js";r().catch(r=>{process.exit(1)});
package/dist/mcp.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=new(require("happy-dom").Window);Object.assign(global,{document:e.document,window:e,self:e});require("./mcp-server-eznfa4gh.cjs").runMcpServer().catch(e=>{process.exit(1)});
2
+ const e=new(require("happy-dom").Window);Object.assign(global,{document:e.document,window:e,self:e});require("./mcp-server-DSLDlYZX.cjs").runMcpServer().catch(e=>{process.exit(1)});
package/dist/mcp.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{Window as o}from"happy-dom";const e=new o;Object.assign(global,{document:e.document,window:e,self:e});import{r as s}from"./mcp-server-CvLGX0Fe.js";s().catch(o=>{process.exit(1)});
2
+ import{Window as o}from"happy-dom";const e=new o;Object.assign(global,{document:e.document,window:e,self:e});import{r as s}from"./mcp-server-DmJXoVRZ.js";s().catch(o=>{process.exit(1)});
@@ -8,12 +8,15 @@ import { HtmlToMarkdownArgs, SaveContentArgs, UrlToMarkdownFileArgs } from './mc
8
8
  export type ToolContext<T = unknown> = {
9
9
  [toolName: string]: T;
10
10
  };
11
+ export type StreamableProgress = Progress & {
12
+ type: "progress";
13
+ };
11
14
  /**
12
15
  * Extended Tool interface with handler function.
13
16
  * ハンドラー関数を含む拡張 Tool インターフェース
14
17
  */
15
18
  interface ExtendedTool extends Tool {
16
- handler: (args: HtmlToMarkdownArgs | SaveContentArgs | UrlToMarkdownFileArgs, context: ToolContext<HtmlToMarkdownArgs | SaveContentArgs | UrlToMarkdownFileArgs>) => AsyncGenerator<Progress | {
19
+ handler: (args: HtmlToMarkdownArgs | SaveContentArgs | UrlToMarkdownFileArgs, context: ToolContext<HtmlToMarkdownArgs | SaveContentArgs | UrlToMarkdownFileArgs>) => AsyncGenerator<StreamableProgress | {
17
20
  type: "result";
18
21
  result: CallToolResult;
19
22
  }>;
@@ -42,7 +45,7 @@ export declare class StreamableHtmlToMarkdownMcpServer {
42
45
  * Handle HTML to Markdown conversion tool call with streamable support.
43
46
  * streamable サポート付きの HTML から Markdown への変換ツール呼び出しを処理
44
47
  */
45
- handleHtmlToMarkdown(args: HtmlToMarkdownArgs, _context: ToolContext<HtmlToMarkdownArgs>): AsyncGenerator<Progress | {
48
+ handleHtmlToMarkdown(args: HtmlToMarkdownArgs, _context: ToolContext<HtmlToMarkdownArgs>): AsyncGenerator<StreamableProgress | {
46
49
  type: "result";
47
50
  result: CallToolResult;
48
51
  }>;
@@ -50,7 +53,7 @@ export declare class StreamableHtmlToMarkdownMcpServer {
50
53
  * Handle save content to file tool call with streamable support.
51
54
  * streamable サポート付きのファイル保存ツール呼び出しを処理
52
55
  */
53
- handleSaveContentToFile(args: SaveContentArgs, _context: ToolContext<SaveContentArgs>): AsyncGenerator<Progress | {
56
+ handleSaveContentToFile(args: SaveContentArgs, _context: ToolContext<SaveContentArgs>): AsyncGenerator<StreamableProgress | {
54
57
  type: "result";
55
58
  result: CallToolResult;
56
59
  }>;
@@ -58,7 +61,7 @@ export declare class StreamableHtmlToMarkdownMcpServer {
58
61
  * Handle URL to Markdown file conversion tool call with streamable support.
59
62
  * streamable サポート付きの URL から Markdown ファイルへの変換ツール呼び出しを処理
60
63
  */
61
- handleUrlToMarkdownFile(args: UrlToMarkdownFileArgs, _context: ToolContext<UrlToMarkdownFileArgs>): AsyncGenerator<Progress | {
64
+ handleUrlToMarkdownFile(args: UrlToMarkdownFileArgs, _context: ToolContext<UrlToMarkdownFileArgs>): AsyncGenerator<StreamableProgress | {
62
65
  type: "result";
63
66
  result: CallToolResult;
64
67
  }>;
@@ -21,71 +21,92 @@ export declare class HtmlToMarkdownMcpServer {
21
21
  handleHtmlToMarkdown(args: HtmlToMarkdownArgs | undefined): Promise<{
22
22
  [x: string]: unknown;
23
23
  content: ({
24
- [x: string]: unknown;
25
- text: string;
26
24
  type: "text";
25
+ text: string;
26
+ annotations?: {
27
+ audience?: ("user" | "assistant")[] | undefined;
28
+ priority?: number | undefined;
29
+ lastModified?: string | undefined;
30
+ } | undefined;
27
31
  _meta?: {
28
32
  [x: string]: unknown;
29
33
  } | undefined;
30
34
  } | {
31
- [x: string]: unknown;
32
35
  type: "image";
33
36
  data: string;
34
37
  mimeType: string;
38
+ annotations?: {
39
+ audience?: ("user" | "assistant")[] | undefined;
40
+ priority?: number | undefined;
41
+ lastModified?: string | undefined;
42
+ } | undefined;
35
43
  _meta?: {
36
44
  [x: string]: unknown;
37
45
  } | undefined;
38
46
  } | {
39
- [x: string]: unknown;
40
47
  type: "audio";
41
48
  data: string;
42
49
  mimeType: string;
50
+ annotations?: {
51
+ audience?: ("user" | "assistant")[] | undefined;
52
+ priority?: number | undefined;
53
+ lastModified?: string | undefined;
54
+ } | undefined;
43
55
  _meta?: {
44
56
  [x: string]: unknown;
45
57
  } | undefined;
46
58
  } | {
47
- [x: string]: unknown;
48
- type: "resource_link";
49
- name: string;
50
59
  uri: string;
51
- title?: string | undefined;
60
+ name: string;
61
+ type: "resource_link";
62
+ description?: string | undefined;
63
+ mimeType?: string | undefined;
64
+ annotations?: {
65
+ audience?: ("user" | "assistant")[] | undefined;
66
+ priority?: number | undefined;
67
+ lastModified?: string | undefined;
68
+ } | undefined;
52
69
  _meta?: {
53
70
  [x: string]: unknown;
54
71
  } | undefined;
55
- mimeType?: string | undefined;
56
- description?: string | undefined;
57
72
  icons?: {
58
- [x: string]: unknown;
59
73
  src: string;
60
74
  mimeType?: string | undefined;
61
75
  sizes?: string[] | undefined;
62
76
  }[] | undefined;
77
+ title?: string | undefined;
63
78
  } | {
64
- [x: string]: unknown;
65
79
  type: "resource";
66
80
  resource: {
67
- [x: string]: unknown;
68
- text: string;
69
81
  uri: string;
82
+ text: string;
83
+ mimeType?: string | undefined;
70
84
  _meta?: {
71
85
  [x: string]: unknown;
72
86
  } | undefined;
73
- mimeType?: string | undefined;
74
87
  } | {
75
- [x: string]: unknown;
76
88
  uri: string;
77
89
  blob: string;
90
+ mimeType?: string | undefined;
78
91
  _meta?: {
79
92
  [x: string]: unknown;
80
93
  } | undefined;
81
- mimeType?: string | undefined;
82
94
  };
95
+ annotations?: {
96
+ audience?: ("user" | "assistant")[] | undefined;
97
+ priority?: number | undefined;
98
+ lastModified?: string | undefined;
99
+ } | undefined;
83
100
  _meta?: {
84
101
  [x: string]: unknown;
85
102
  } | undefined;
86
103
  })[];
87
104
  _meta?: {
88
105
  [x: string]: unknown;
106
+ "io.modelcontextprotocol/related-task"?: {
107
+ [x: string]: unknown;
108
+ taskId: string;
109
+ } | undefined;
89
110
  } | undefined;
90
111
  structuredContent?: {
91
112
  [x: string]: unknown;
@@ -99,71 +120,92 @@ export declare class HtmlToMarkdownMcpServer {
99
120
  handleSaveContentToFile(args: SaveContentArgs | undefined): Promise<{
100
121
  [x: string]: unknown;
101
122
  content: ({
102
- [x: string]: unknown;
103
- text: string;
104
123
  type: "text";
124
+ text: string;
125
+ annotations?: {
126
+ audience?: ("user" | "assistant")[] | undefined;
127
+ priority?: number | undefined;
128
+ lastModified?: string | undefined;
129
+ } | undefined;
105
130
  _meta?: {
106
131
  [x: string]: unknown;
107
132
  } | undefined;
108
133
  } | {
109
- [x: string]: unknown;
110
134
  type: "image";
111
135
  data: string;
112
136
  mimeType: string;
137
+ annotations?: {
138
+ audience?: ("user" | "assistant")[] | undefined;
139
+ priority?: number | undefined;
140
+ lastModified?: string | undefined;
141
+ } | undefined;
113
142
  _meta?: {
114
143
  [x: string]: unknown;
115
144
  } | undefined;
116
145
  } | {
117
- [x: string]: unknown;
118
146
  type: "audio";
119
147
  data: string;
120
148
  mimeType: string;
149
+ annotations?: {
150
+ audience?: ("user" | "assistant")[] | undefined;
151
+ priority?: number | undefined;
152
+ lastModified?: string | undefined;
153
+ } | undefined;
121
154
  _meta?: {
122
155
  [x: string]: unknown;
123
156
  } | undefined;
124
157
  } | {
125
- [x: string]: unknown;
126
- type: "resource_link";
127
- name: string;
128
158
  uri: string;
129
- title?: string | undefined;
159
+ name: string;
160
+ type: "resource_link";
161
+ description?: string | undefined;
162
+ mimeType?: string | undefined;
163
+ annotations?: {
164
+ audience?: ("user" | "assistant")[] | undefined;
165
+ priority?: number | undefined;
166
+ lastModified?: string | undefined;
167
+ } | undefined;
130
168
  _meta?: {
131
169
  [x: string]: unknown;
132
170
  } | undefined;
133
- mimeType?: string | undefined;
134
- description?: string | undefined;
135
171
  icons?: {
136
- [x: string]: unknown;
137
172
  src: string;
138
173
  mimeType?: string | undefined;
139
174
  sizes?: string[] | undefined;
140
175
  }[] | undefined;
176
+ title?: string | undefined;
141
177
  } | {
142
- [x: string]: unknown;
143
178
  type: "resource";
144
179
  resource: {
145
- [x: string]: unknown;
146
- text: string;
147
180
  uri: string;
181
+ text: string;
182
+ mimeType?: string | undefined;
148
183
  _meta?: {
149
184
  [x: string]: unknown;
150
185
  } | undefined;
151
- mimeType?: string | undefined;
152
186
  } | {
153
- [x: string]: unknown;
154
187
  uri: string;
155
188
  blob: string;
189
+ mimeType?: string | undefined;
156
190
  _meta?: {
157
191
  [x: string]: unknown;
158
192
  } | undefined;
159
- mimeType?: string | undefined;
160
193
  };
194
+ annotations?: {
195
+ audience?: ("user" | "assistant")[] | undefined;
196
+ priority?: number | undefined;
197
+ lastModified?: string | undefined;
198
+ } | undefined;
161
199
  _meta?: {
162
200
  [x: string]: unknown;
163
201
  } | undefined;
164
202
  })[];
165
203
  _meta?: {
166
204
  [x: string]: unknown;
205
+ "io.modelcontextprotocol/related-task"?: {
206
+ [x: string]: unknown;
207
+ taskId: string;
208
+ } | undefined;
167
209
  } | undefined;
168
210
  structuredContent?: {
169
211
  [x: string]: unknown;
@@ -177,71 +219,92 @@ export declare class HtmlToMarkdownMcpServer {
177
219
  handleUrlToMarkdownFile(args: UrlToMarkdownFileArgs | undefined): Promise<{
178
220
  [x: string]: unknown;
179
221
  content: ({
180
- [x: string]: unknown;
181
- text: string;
182
222
  type: "text";
223
+ text: string;
224
+ annotations?: {
225
+ audience?: ("user" | "assistant")[] | undefined;
226
+ priority?: number | undefined;
227
+ lastModified?: string | undefined;
228
+ } | undefined;
183
229
  _meta?: {
184
230
  [x: string]: unknown;
185
231
  } | undefined;
186
232
  } | {
187
- [x: string]: unknown;
188
233
  type: "image";
189
234
  data: string;
190
235
  mimeType: string;
236
+ annotations?: {
237
+ audience?: ("user" | "assistant")[] | undefined;
238
+ priority?: number | undefined;
239
+ lastModified?: string | undefined;
240
+ } | undefined;
191
241
  _meta?: {
192
242
  [x: string]: unknown;
193
243
  } | undefined;
194
244
  } | {
195
- [x: string]: unknown;
196
245
  type: "audio";
197
246
  data: string;
198
247
  mimeType: string;
248
+ annotations?: {
249
+ audience?: ("user" | "assistant")[] | undefined;
250
+ priority?: number | undefined;
251
+ lastModified?: string | undefined;
252
+ } | undefined;
199
253
  _meta?: {
200
254
  [x: string]: unknown;
201
255
  } | undefined;
202
256
  } | {
203
- [x: string]: unknown;
204
- type: "resource_link";
205
- name: string;
206
257
  uri: string;
207
- title?: string | undefined;
258
+ name: string;
259
+ type: "resource_link";
260
+ description?: string | undefined;
261
+ mimeType?: string | undefined;
262
+ annotations?: {
263
+ audience?: ("user" | "assistant")[] | undefined;
264
+ priority?: number | undefined;
265
+ lastModified?: string | undefined;
266
+ } | undefined;
208
267
  _meta?: {
209
268
  [x: string]: unknown;
210
269
  } | undefined;
211
- mimeType?: string | undefined;
212
- description?: string | undefined;
213
270
  icons?: {
214
- [x: string]: unknown;
215
271
  src: string;
216
272
  mimeType?: string | undefined;
217
273
  sizes?: string[] | undefined;
218
274
  }[] | undefined;
275
+ title?: string | undefined;
219
276
  } | {
220
- [x: string]: unknown;
221
277
  type: "resource";
222
278
  resource: {
223
- [x: string]: unknown;
224
- text: string;
225
279
  uri: string;
280
+ text: string;
281
+ mimeType?: string | undefined;
226
282
  _meta?: {
227
283
  [x: string]: unknown;
228
284
  } | undefined;
229
- mimeType?: string | undefined;
230
285
  } | {
231
- [x: string]: unknown;
232
286
  uri: string;
233
287
  blob: string;
288
+ mimeType?: string | undefined;
234
289
  _meta?: {
235
290
  [x: string]: unknown;
236
291
  } | undefined;
237
- mimeType?: string | undefined;
238
292
  };
293
+ annotations?: {
294
+ audience?: ("user" | "assistant")[] | undefined;
295
+ priority?: number | undefined;
296
+ lastModified?: string | undefined;
297
+ } | undefined;
239
298
  _meta?: {
240
299
  [x: string]: unknown;
241
300
  } | undefined;
242
301
  })[];
243
302
  _meta?: {
244
303
  [x: string]: unknown;
304
+ "io.modelcontextprotocol/related-task"?: {
305
+ [x: string]: unknown;
306
+ taskId: string;
307
+ } | undefined;
245
308
  } | undefined;
246
309
  structuredContent?: {
247
310
  [x: string]: unknown;