youtube-knowledge-mcp 2.0.1 → 2.1.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 +110 -12
- package/dist/brain-schemas.d.ts +502 -0
- package/dist/brain-schemas.d.ts.map +1 -0
- package/dist/brain-schemas.js +113 -0
- package/dist/brain-schemas.js.map +1 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +20 -5
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +42 -0
- package/dist/prompts.js.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +66 -0
- package/dist/resources.js.map +1 -1
- package/dist/schemas.d.ts +67 -56
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +25 -4
- package/dist/schemas.js.map +1 -1
- package/dist/tools/ask-brain.d.ts +62 -0
- package/dist/tools/ask-brain.d.ts.map +1 -0
- package/dist/tools/ask-brain.js +70 -0
- package/dist/tools/ask-brain.js.map +1 -0
- package/dist/tools/batch.d.ts +10 -10
- package/dist/tools/batch.js +2 -2
- package/dist/tools/batch.js.map +1 -1
- package/dist/tools/brain-info.d.ts +180 -0
- package/dist/tools/brain-info.d.ts.map +1 -0
- package/dist/tools/brain-info.js +108 -0
- package/dist/tools/brain-info.js.map +1 -0
- package/dist/tools/build-brain.d.ts +120 -0
- package/dist/tools/build-brain.d.ts.map +1 -0
- package/dist/tools/build-brain.js +123 -0
- package/dist/tools/build-brain.js.map +1 -0
- package/dist/tools/clips.d.ts +4 -4
- package/dist/tools/fetch-videos.d.ts +8 -8
- package/dist/tools/get-chapters.d.ts +2 -2
- package/dist/tools/get-comments.d.ts +2 -2
- package/dist/tools/get-transcript.d.ts +2 -2
- package/dist/tools/library.d.ts +9 -7
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +10 -4
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/list-library.d.ts +4 -4
- package/dist/tools/manage-brain.d.ts +39 -0
- package/dist/tools/manage-brain.d.ts.map +1 -0
- package/dist/tools/manage-brain.js +53 -0
- package/dist/tools/manage-brain.js.map +1 -0
- package/dist/tools/search-channels.d.ts +4 -4
- package/dist/tools/search-transcript.d.ts +2 -2
- package/dist/tools/search-videos.d.ts +8 -8
- package/dist/utils/brain-build.d.ts +40 -0
- package/dist/utils/brain-build.d.ts.map +1 -0
- package/dist/utils/brain-build.js +211 -0
- package/dist/utils/brain-build.js.map +1 -0
- package/dist/utils/brain-chunks.d.ts +33 -0
- package/dist/utils/brain-chunks.d.ts.map +1 -0
- package/dist/utils/brain-chunks.js +87 -0
- package/dist/utils/brain-chunks.js.map +1 -0
- package/dist/utils/brain-index.d.ts +27 -0
- package/dist/utils/brain-index.d.ts.map +1 -0
- package/dist/utils/brain-index.js +100 -0
- package/dist/utils/brain-index.js.map +1 -0
- package/dist/utils/brain-ingest.d.ts +57 -0
- package/dist/utils/brain-ingest.d.ts.map +1 -0
- package/dist/utils/brain-ingest.js +127 -0
- package/dist/utils/brain-ingest.js.map +1 -0
- package/dist/utils/brain-lock.d.ts +20 -0
- package/dist/utils/brain-lock.d.ts.map +1 -0
- package/dist/utils/brain-lock.js +93 -0
- package/dist/utils/brain-lock.js.map +1 -0
- package/dist/utils/brain-lookup.d.ts +3 -0
- package/dist/utils/brain-lookup.d.ts.map +1 -0
- package/dist/utils/brain-lookup.js +62 -0
- package/dist/utils/brain-lookup.js.map +1 -0
- package/dist/utils/brain-paths.d.ts +19 -0
- package/dist/utils/brain-paths.d.ts.map +1 -0
- package/dist/utils/brain-paths.js +34 -0
- package/dist/utils/brain-paths.js.map +1 -0
- package/dist/utils/brain-phrases.d.ts +31 -0
- package/dist/utils/brain-phrases.d.ts.map +1 -0
- package/dist/utils/brain-phrases.js +116 -0
- package/dist/utils/brain-phrases.js.map +1 -0
- package/dist/utils/brain-stats.d.ts +25 -0
- package/dist/utils/brain-stats.d.ts.map +1 -0
- package/dist/utils/brain-stats.js +64 -0
- package/dist/utils/brain-stats.js.map +1 -0
- package/dist/utils/brain-storage.d.ts +28 -0
- package/dist/utils/brain-storage.d.ts.map +1 -0
- package/dist/utils/brain-storage.js +87 -0
- package/dist/utils/brain-storage.js.map +1 -0
- package/dist/utils/clips.js +4 -4
- package/dist/utils/clips.js.map +1 -1
- package/dist/utils/json-file.d.ts +36 -0
- package/dist/utils/json-file.d.ts.map +1 -0
- package/dist/utils/json-file.js +45 -0
- package/dist/utils/json-file.js.map +1 -0
- package/dist/utils/paths.d.ts +9 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +13 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/preflight.d.ts.map +1 -1
- package/dist/utils/preflight.js +14 -2
- package/dist/utils/preflight.js.map +1 -1
- package/dist/utils/search-index.d.ts +22 -7
- package/dist/utils/search-index.d.ts.map +1 -1
- package/dist/utils/search-index.js +17 -4
- package/dist/utils/search-index.js.map +1 -1
- package/dist/utils/storage.d.ts +14 -44
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/utils/storage.js +37 -80
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/transcript.d.ts +5 -4
- package/dist/utils/transcript.d.ts.map +1 -1
- package/dist/utils/transcript.js +3 -0
- package/dist/utils/transcript.js.map +1 -1
- package/dist/utils/validate.d.ts +1 -0
- package/dist/utils/validate.d.ts.map +1 -1
- package/dist/utils/validate.js +18 -0
- package/dist/utils/validate.js.map +1 -1
- package/dist/utils/youtube.d.ts +14 -0
- package/dist/utils/youtube.d.ts.map +1 -1
- package/dist/utils/youtube.js +19 -13
- package/dist/utils/youtube.js.map +1 -1
- package/dist/utils/ytdlp.d.ts.map +1 -1
- package/dist/utils/ytdlp.js +56 -6
- package/dist/utils/ytdlp.js.map +1 -1
- package/package.json +2 -2
package/dist/schemas.d.ts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Domain schemas.
|
|
4
4
|
*
|
|
5
|
-
* Every tool declares
|
|
6
|
-
* alongside the readable text rather than having to parse
|
|
7
|
-
* shapes live here because several tools return the same ones
|
|
5
|
+
* Every tool declares an output schema, so a client receives typed
|
|
6
|
+
* `structuredContent` alongside the readable text rather than having to parse
|
|
7
|
+
* prose. The shapes live here because several tools return the same ones, and
|
|
8
|
+
* because the documents this server writes to disk are read back through the
|
|
9
|
+
* same definitions — a persisted shape and the shape a tool reports are the
|
|
10
|
+
* same shape, and declaring them twice is how they drift.
|
|
8
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* A record whose unreadable values are dropped rather than failing the parse.
|
|
14
|
+
*
|
|
15
|
+
* These describe files this process wrote but does not own: they survive
|
|
16
|
+
* upgrades, get synced between machines, and are plain JSON anyone can edit. A
|
|
17
|
+
* single corrupt entry should cost that one entry, not the whole document.
|
|
18
|
+
*/
|
|
19
|
+
export declare function recordOfValid<T>(schema: z.ZodType<T, z.ZodTypeDef, unknown>): z.ZodType<Record<string, T>, z.ZodTypeDef, Record<string, unknown>>;
|
|
9
20
|
export declare const paginationShape: {
|
|
10
21
|
total: z.ZodNumber;
|
|
11
22
|
count: z.ZodNumber;
|
|
@@ -23,23 +34,23 @@ export declare const videoSummarySchema: z.ZodObject<{
|
|
|
23
34
|
viewCount: z.ZodOptional<z.ZodNumber>;
|
|
24
35
|
uploadDate: z.ZodOptional<z.ZodString>;
|
|
25
36
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
url: string;
|
|
27
|
-
title: string;
|
|
28
37
|
id: string;
|
|
29
|
-
|
|
38
|
+
title: string;
|
|
30
39
|
durationSeconds: number;
|
|
40
|
+
durationFormatted: string;
|
|
41
|
+
url: string;
|
|
31
42
|
channel?: string | undefined;
|
|
32
|
-
uploadDate?: string | undefined;
|
|
33
43
|
viewCount?: number | undefined;
|
|
44
|
+
uploadDate?: string | undefined;
|
|
34
45
|
}, {
|
|
35
|
-
url: string;
|
|
36
|
-
title: string;
|
|
37
46
|
id: string;
|
|
38
|
-
|
|
47
|
+
title: string;
|
|
39
48
|
durationSeconds: number;
|
|
49
|
+
durationFormatted: string;
|
|
50
|
+
url: string;
|
|
40
51
|
channel?: string | undefined;
|
|
41
|
-
uploadDate?: string | undefined;
|
|
42
52
|
viewCount?: number | undefined;
|
|
53
|
+
uploadDate?: string | undefined;
|
|
43
54
|
}>;
|
|
44
55
|
export declare const videoInfoSchema: z.ZodObject<{
|
|
45
56
|
id: z.ZodString;
|
|
@@ -56,33 +67,33 @@ export declare const videoInfoSchema: z.ZodObject<{
|
|
|
56
67
|
likeCount: z.ZodNumber;
|
|
57
68
|
commentCount: z.ZodNumber;
|
|
58
69
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
url: string;
|
|
60
|
-
description: string;
|
|
61
|
-
title: string;
|
|
62
70
|
id: string;
|
|
71
|
+
title: string;
|
|
72
|
+
durationSeconds: number;
|
|
73
|
+
durationFormatted: string;
|
|
74
|
+
url: string;
|
|
63
75
|
channel: string;
|
|
76
|
+
viewCount: number;
|
|
64
77
|
uploadDate: string;
|
|
65
|
-
|
|
78
|
+
description: string;
|
|
66
79
|
tags: string[];
|
|
67
|
-
|
|
68
|
-
viewCount: number;
|
|
80
|
+
thumbnailUrl: string;
|
|
69
81
|
likeCount: number;
|
|
70
82
|
commentCount: number;
|
|
71
|
-
durationSeconds: number;
|
|
72
83
|
}, {
|
|
73
|
-
url: string;
|
|
74
|
-
description: string;
|
|
75
|
-
title: string;
|
|
76
84
|
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
durationSeconds: number;
|
|
87
|
+
durationFormatted: string;
|
|
88
|
+
url: string;
|
|
77
89
|
channel: string;
|
|
90
|
+
viewCount: number;
|
|
78
91
|
uploadDate: string;
|
|
79
|
-
|
|
92
|
+
description: string;
|
|
80
93
|
tags: string[];
|
|
81
|
-
|
|
82
|
-
viewCount: number;
|
|
94
|
+
thumbnailUrl: string;
|
|
83
95
|
likeCount: number;
|
|
84
96
|
commentCount: number;
|
|
85
|
-
durationSeconds: number;
|
|
86
97
|
}>;
|
|
87
98
|
export declare const chapterSchema: z.ZodObject<{
|
|
88
99
|
title: z.ZodString;
|
|
@@ -92,15 +103,15 @@ export declare const chapterSchema: z.ZodObject<{
|
|
|
92
103
|
endFormatted: z.ZodString;
|
|
93
104
|
url: z.ZodString;
|
|
94
105
|
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
url: string;
|
|
96
106
|
title: string;
|
|
107
|
+
url: string;
|
|
97
108
|
startSeconds: number;
|
|
98
109
|
startFormatted: string;
|
|
99
110
|
endSeconds: number;
|
|
100
111
|
endFormatted: string;
|
|
101
112
|
}, {
|
|
102
|
-
url: string;
|
|
103
113
|
title: string;
|
|
114
|
+
url: string;
|
|
104
115
|
startSeconds: number;
|
|
105
116
|
startFormatted: string;
|
|
106
117
|
endSeconds: number;
|
|
@@ -112,14 +123,14 @@ export declare const commentSchema: z.ZodObject<{
|
|
|
112
123
|
likeCount: z.ZodNumber;
|
|
113
124
|
isPinned: z.ZodBoolean;
|
|
114
125
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
text: string;
|
|
116
126
|
likeCount: number;
|
|
117
127
|
author: string;
|
|
128
|
+
text: string;
|
|
118
129
|
isPinned: boolean;
|
|
119
130
|
}, {
|
|
120
|
-
text: string;
|
|
121
131
|
likeCount: number;
|
|
122
132
|
author: string;
|
|
133
|
+
text: string;
|
|
123
134
|
isPinned: boolean;
|
|
124
135
|
}>;
|
|
125
136
|
export declare const channelInfoSchema: z.ZodObject<{
|
|
@@ -132,17 +143,17 @@ export declare const channelInfoSchema: z.ZodObject<{
|
|
|
132
143
|
}, "strip", z.ZodTypeAny, {
|
|
133
144
|
description: string;
|
|
134
145
|
name: string;
|
|
135
|
-
handle: string;
|
|
136
|
-
channelUrl: string;
|
|
137
146
|
channelId: string;
|
|
147
|
+
handle: string;
|
|
138
148
|
subscriberCount: number;
|
|
149
|
+
channelUrl: string;
|
|
139
150
|
}, {
|
|
140
151
|
description: string;
|
|
141
152
|
name: string;
|
|
142
|
-
handle: string;
|
|
143
|
-
channelUrl: string;
|
|
144
153
|
channelId: string;
|
|
154
|
+
handle: string;
|
|
145
155
|
subscriberCount: number;
|
|
156
|
+
channelUrl: string;
|
|
146
157
|
}>;
|
|
147
158
|
export declare const playlistInfoSchema: z.ZodObject<{
|
|
148
159
|
id: z.ZodString;
|
|
@@ -155,25 +166,25 @@ export declare const playlistInfoSchema: z.ZodObject<{
|
|
|
155
166
|
url: z.ZodString;
|
|
156
167
|
description: z.ZodString;
|
|
157
168
|
}, "strip", z.ZodTypeAny, {
|
|
158
|
-
url: string;
|
|
159
|
-
lastModified: string;
|
|
160
|
-
description: string;
|
|
161
|
-
title: string;
|
|
162
169
|
id: string;
|
|
170
|
+
title: string;
|
|
171
|
+
url: string;
|
|
163
172
|
channel: string;
|
|
173
|
+
description: string;
|
|
164
174
|
handle: string;
|
|
165
175
|
channelUrl: string;
|
|
166
176
|
videoCount: number;
|
|
167
|
-
}, {
|
|
168
|
-
url: string;
|
|
169
177
|
lastModified: string;
|
|
170
|
-
|
|
171
|
-
title: string;
|
|
178
|
+
}, {
|
|
172
179
|
id: string;
|
|
180
|
+
title: string;
|
|
181
|
+
url: string;
|
|
173
182
|
channel: string;
|
|
183
|
+
description: string;
|
|
174
184
|
handle: string;
|
|
175
185
|
channelUrl: string;
|
|
176
186
|
videoCount: number;
|
|
187
|
+
lastModified: string;
|
|
177
188
|
}>;
|
|
178
189
|
export declare const videoFormatSchema: z.ZodObject<{
|
|
179
190
|
formatId: z.ZodString;
|
|
@@ -211,13 +222,13 @@ export declare const transcriptSegmentSchema: z.ZodObject<{
|
|
|
211
222
|
endSeconds: z.ZodNumber;
|
|
212
223
|
text: z.ZodString;
|
|
213
224
|
}, "strip", z.ZodTypeAny, {
|
|
214
|
-
text: string;
|
|
215
225
|
startSeconds: number;
|
|
216
226
|
endSeconds: number;
|
|
217
|
-
}, {
|
|
218
227
|
text: string;
|
|
228
|
+
}, {
|
|
219
229
|
startSeconds: number;
|
|
220
230
|
endSeconds: number;
|
|
231
|
+
text: string;
|
|
221
232
|
}>;
|
|
222
233
|
export declare const transcriptMatchSchema: z.ZodObject<{
|
|
223
234
|
startSeconds: z.ZodNumber;
|
|
@@ -226,14 +237,14 @@ export declare const transcriptMatchSchema: z.ZodObject<{
|
|
|
226
237
|
url: z.ZodString;
|
|
227
238
|
}, "strip", z.ZodTypeAny, {
|
|
228
239
|
url: string;
|
|
229
|
-
text: string;
|
|
230
240
|
startSeconds: number;
|
|
231
241
|
startFormatted: string;
|
|
242
|
+
text: string;
|
|
232
243
|
}, {
|
|
233
244
|
url: string;
|
|
234
|
-
text: string;
|
|
235
245
|
startSeconds: number;
|
|
236
246
|
startFormatted: string;
|
|
247
|
+
text: string;
|
|
237
248
|
}>;
|
|
238
249
|
export declare const libraryMetadataSchema: z.ZodObject<{
|
|
239
250
|
videoId: z.ZodString;
|
|
@@ -246,21 +257,21 @@ export declare const libraryMetadataSchema: z.ZodObject<{
|
|
|
246
257
|
hasSummary: z.ZodBoolean;
|
|
247
258
|
hasSkill: z.ZodBoolean;
|
|
248
259
|
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
url: string;
|
|
250
260
|
title: string;
|
|
251
|
-
|
|
261
|
+
url: string;
|
|
252
262
|
channel: string;
|
|
253
263
|
tags: string[];
|
|
264
|
+
videoId: string;
|
|
254
265
|
dateSaved: string;
|
|
255
266
|
hasTranscript: boolean;
|
|
256
267
|
hasSummary: boolean;
|
|
257
268
|
hasSkill: boolean;
|
|
258
269
|
}, {
|
|
259
|
-
url: string;
|
|
260
270
|
title: string;
|
|
261
|
-
|
|
271
|
+
url: string;
|
|
262
272
|
channel: string;
|
|
263
273
|
tags: string[];
|
|
274
|
+
videoId: string;
|
|
264
275
|
dateSaved: string;
|
|
265
276
|
hasTranscript: boolean;
|
|
266
277
|
hasSummary: boolean;
|
|
@@ -274,14 +285,14 @@ export declare const librarySearchHitSchema: z.ZodObject<{
|
|
|
274
285
|
excerpt: z.ZodString;
|
|
275
286
|
}, "strip", z.ZodTypeAny, {
|
|
276
287
|
title: string;
|
|
277
|
-
videoId: string;
|
|
278
288
|
kind: string;
|
|
289
|
+
videoId: string;
|
|
279
290
|
score: number;
|
|
280
291
|
excerpt: string;
|
|
281
292
|
}, {
|
|
282
293
|
title: string;
|
|
283
|
-
videoId: string;
|
|
284
294
|
kind: string;
|
|
295
|
+
videoId: string;
|
|
285
296
|
score: number;
|
|
286
297
|
excerpt: string;
|
|
287
298
|
}>;
|
|
@@ -294,18 +305,18 @@ export declare const clipResultSchema: z.ZodObject<{
|
|
|
294
305
|
durationSeconds: z.ZodNumber;
|
|
295
306
|
}, "strip", z.ZodTypeAny, {
|
|
296
307
|
title: string;
|
|
297
|
-
videoId: string;
|
|
298
|
-
filePath: string;
|
|
299
308
|
durationSeconds: number;
|
|
300
309
|
startSeconds: number;
|
|
301
310
|
endSeconds: number;
|
|
302
|
-
}, {
|
|
303
|
-
title: string;
|
|
304
311
|
videoId: string;
|
|
305
312
|
filePath: string;
|
|
313
|
+
}, {
|
|
314
|
+
title: string;
|
|
306
315
|
durationSeconds: number;
|
|
307
316
|
startSeconds: number;
|
|
308
317
|
endSeconds: number;
|
|
318
|
+
videoId: string;
|
|
319
|
+
filePath: string;
|
|
309
320
|
}>;
|
|
310
321
|
export declare const binaryStatusSchema: z.ZodObject<{
|
|
311
322
|
name: z.ZodString;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"A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;EAK7B,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Domain schemas.
|
|
4
4
|
*
|
|
5
|
-
* Every tool declares
|
|
6
|
-
* alongside the readable text rather than having to parse
|
|
7
|
-
* shapes live here because several tools return the same ones
|
|
5
|
+
* Every tool declares an output schema, so a client receives typed
|
|
6
|
+
* `structuredContent` alongside the readable text rather than having to parse
|
|
7
|
+
* prose. The shapes live here because several tools return the same ones, and
|
|
8
|
+
* because the documents this server writes to disk are read back through the
|
|
9
|
+
* same definitions — a persisted shape and the shape a tool reports are the
|
|
10
|
+
* same shape, and declaring them twice is how they drift.
|
|
8
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* A record whose unreadable values are dropped rather than failing the parse.
|
|
14
|
+
*
|
|
15
|
+
* These describe files this process wrote but does not own: they survive
|
|
16
|
+
* upgrades, get synced between machines, and are plain JSON anyone can edit. A
|
|
17
|
+
* single corrupt entry should cost that one entry, not the whole document.
|
|
18
|
+
*/
|
|
19
|
+
export function recordOfValid(schema) {
|
|
20
|
+
return z.record(z.string(), z.unknown()).transform((entries) => {
|
|
21
|
+
const valid = {};
|
|
22
|
+
for (const [key, value] of Object.entries(entries)) {
|
|
23
|
+
const parsed = schema.safeParse(value);
|
|
24
|
+
if (parsed.success)
|
|
25
|
+
valid[key] = parsed.data;
|
|
26
|
+
}
|
|
27
|
+
return valid;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
9
30
|
export const paginationShape = {
|
|
10
31
|
total: z.number().int().describe('Total items available'),
|
|
11
32
|
count: z.number().int().describe('Items in this response'),
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;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EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
export declare const askBrainSchema: {
|
|
4
|
+
channel: z.ZodString;
|
|
5
|
+
query: z.ZodString;
|
|
6
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
};
|
|
9
|
+
export declare const askBrainOutputSchema: {
|
|
10
|
+
total: z.ZodNumber;
|
|
11
|
+
count: z.ZodNumber;
|
|
12
|
+
offset: z.ZodNumber;
|
|
13
|
+
hasMore: z.ZodBoolean;
|
|
14
|
+
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
channelId: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
query: z.ZodString;
|
|
18
|
+
passages: z.ZodArray<z.ZodObject<{
|
|
19
|
+
videoId: z.ZodString;
|
|
20
|
+
title: z.ZodString;
|
|
21
|
+
startSeconds: z.ZodNumber;
|
|
22
|
+
startFormatted: z.ZodString;
|
|
23
|
+
endSeconds: z.ZodNumber;
|
|
24
|
+
score: z.ZodNumber;
|
|
25
|
+
text: z.ZodString;
|
|
26
|
+
url: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
title: string;
|
|
29
|
+
url: string;
|
|
30
|
+
startSeconds: number;
|
|
31
|
+
startFormatted: string;
|
|
32
|
+
endSeconds: number;
|
|
33
|
+
text: string;
|
|
34
|
+
videoId: string;
|
|
35
|
+
score: number;
|
|
36
|
+
}, {
|
|
37
|
+
title: string;
|
|
38
|
+
url: string;
|
|
39
|
+
startSeconds: number;
|
|
40
|
+
startFormatted: string;
|
|
41
|
+
endSeconds: number;
|
|
42
|
+
text: string;
|
|
43
|
+
videoId: string;
|
|
44
|
+
score: number;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Search a brain and return the moments that answer the query.
|
|
49
|
+
*
|
|
50
|
+
* This is the only route from a corpus into a model's context: a few hundred
|
|
51
|
+
* videos is tens of megabytes of transcript, and no tool here will hand that
|
|
52
|
+
* over. Every passage comes back with the second it was said and a link that
|
|
53
|
+
* opens the video there, so an answer built from these can be checked rather
|
|
54
|
+
* than trusted.
|
|
55
|
+
*/
|
|
56
|
+
export declare function askBrainHandler({ channel, query, limit, offset, }: {
|
|
57
|
+
channel: string;
|
|
58
|
+
query: string;
|
|
59
|
+
limit: number;
|
|
60
|
+
offset: number;
|
|
61
|
+
}): Promise<CallToolResult>;
|
|
62
|
+
//# sourceMappingURL=ask-brain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-brain.d.ts","sourceRoot":"","sources":["../../src/tools/ask-brain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAOzE,eAAO,MAAM,cAAc;;;;;CAmB1B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,EACpC,OAAO,EACP,KAAK,EACL,KAAK,EACL,MAAM,GACP,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,cAAc,CAAC,CAY1B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { brainPassageSchema } from '../brain-schemas.js';
|
|
3
|
+
import { searchBrain } from '../utils/brain-index.js';
|
|
4
|
+
import { resolveBrain } from '../utils/brain-lookup.js';
|
|
5
|
+
import { pageInfo, toolResult } from '../utils/format.js';
|
|
6
|
+
import { paginationShape } from '../schemas.js';
|
|
7
|
+
export const askBrainSchema = {
|
|
8
|
+
channel: z.string().describe('Channel URL, @handle, or name of a brain built with build_brain'),
|
|
9
|
+
query: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.describe('What to look for. Matched against the words actually spoken, not a summary of them'),
|
|
13
|
+
limit: z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(25)
|
|
18
|
+
.default(8)
|
|
19
|
+
.describe('How many passages to return. Default: 8'),
|
|
20
|
+
offset: z
|
|
21
|
+
.number()
|
|
22
|
+
.int()
|
|
23
|
+
.min(0)
|
|
24
|
+
.default(0)
|
|
25
|
+
.describe('Skip this many of the ranked passages, for paging. Default: 0'),
|
|
26
|
+
};
|
|
27
|
+
export const askBrainOutputSchema = {
|
|
28
|
+
channelId: z.string(),
|
|
29
|
+
name: z.string(),
|
|
30
|
+
query: z.string(),
|
|
31
|
+
passages: z.array(brainPassageSchema),
|
|
32
|
+
...paginationShape,
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Search a brain and return the moments that answer the query.
|
|
36
|
+
*
|
|
37
|
+
* This is the only route from a corpus into a model's context: a few hundred
|
|
38
|
+
* videos is tens of megabytes of transcript, and no tool here will hand that
|
|
39
|
+
* over. Every passage comes back with the second it was said and a link that
|
|
40
|
+
* opens the video there, so an answer built from these can be checked rather
|
|
41
|
+
* than trusted.
|
|
42
|
+
*/
|
|
43
|
+
export async function askBrainHandler({ channel, query, limit, offset, }) {
|
|
44
|
+
const manifest = await resolveBrain(channel);
|
|
45
|
+
const { channelId, name } = manifest.channel;
|
|
46
|
+
const { passages, total } = await searchBrain(channelId, query, limit, offset);
|
|
47
|
+
return toolResult(render(name, query, passages, total), {
|
|
48
|
+
channelId,
|
|
49
|
+
name,
|
|
50
|
+
query,
|
|
51
|
+
passages,
|
|
52
|
+
...pageInfo(total, passages.length, offset),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function render(name, query, passages, total) {
|
|
56
|
+
if (passages.length === 0) {
|
|
57
|
+
return [
|
|
58
|
+
`Nothing in ${name}'s brain matches "${query}".`,
|
|
59
|
+
'',
|
|
60
|
+
'The words are matched as spoken, so try the phrasing the creator would use.',
|
|
61
|
+
'Call get_brain_info to see how much of the channel is actually indexed.',
|
|
62
|
+
].join('\n');
|
|
63
|
+
}
|
|
64
|
+
const sections = passages.map((passage) => [`### ${passage.title} [${passage.startFormatted}]`, passage.url, '', passage.text].join('\n'));
|
|
65
|
+
const heading = passages.length === total
|
|
66
|
+
? `${total} passages from ${name} matching "${query}"`
|
|
67
|
+
: `${passages.length} of ${total} passages from ${name} matching "${query}" — pass offset to see more`;
|
|
68
|
+
return [heading, '', ...sections].join('\n\n');
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=ask-brain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-brain.js","sourceRoot":"","sources":["../../src/tools/ask-brain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAqB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAC/F,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAA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,CAAC;AACL,CAAC;AAED,SAAS,MAAM,CAAC,IAAY,EAAE,KAAa,EAAE,QAAwB,EAAE,KAAa;IAClF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO;YACL,cAAc,IAAI,qBAAqB,KAAK,IAAI;YAChD,EAAE;YACF,6EAA6E;YAC7E,yEAAyE;SAC1E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CACxC,CAAC,OAAO,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,cAAc,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/F,CAAC;IAEF,MAAM,OAAO,GACX,QAAQ,CAAC,MAAM,KAAK,KAAK;QACvB,CAAC,CAAC,GAAG,KAAK,kBAAkB,IAAI,cAAc,KAAK,GAAG;QACtD,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,OAAO,KAAK,kBAAkB,IAAI,cAAc,KAAK,6BAA6B,CAAC;IAE3G,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/tools/batch.d.ts
CHANGED
|
@@ -24,16 +24,16 @@ export declare const getTranscriptsOutputSchema: {
|
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
video: string;
|
|
26
26
|
text?: string | undefined;
|
|
27
|
-
error?: string | undefined;
|
|
28
27
|
videoId?: string | undefined;
|
|
28
|
+
error?: string | undefined;
|
|
29
29
|
language?: string | undefined;
|
|
30
30
|
truncated?: boolean | undefined;
|
|
31
31
|
totalChars?: number | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
video: string;
|
|
34
34
|
text?: string | undefined;
|
|
35
|
-
error?: string | undefined;
|
|
36
35
|
videoId?: string | undefined;
|
|
36
|
+
error?: string | undefined;
|
|
37
37
|
language?: string | undefined;
|
|
38
38
|
truncated?: boolean | undefined;
|
|
39
39
|
totalChars?: number | undefined;
|
|
@@ -74,29 +74,29 @@ export declare const digestPlaylistOutputSchema: {
|
|
|
74
74
|
transcriptWords: z.ZodOptional<z.ZodNumber>;
|
|
75
75
|
transcriptError: z.ZodOptional<z.ZodString>;
|
|
76
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
url: string;
|
|
78
|
-
title: string;
|
|
79
77
|
id: string;
|
|
78
|
+
title: string;
|
|
80
79
|
durationFormatted: string;
|
|
80
|
+
url: string;
|
|
81
|
+
viewCount?: number | undefined;
|
|
82
|
+
uploadDate?: string | undefined;
|
|
81
83
|
chapters?: {
|
|
82
84
|
title: string;
|
|
83
85
|
startSeconds: number;
|
|
84
86
|
}[] | undefined;
|
|
85
|
-
uploadDate?: string | undefined;
|
|
86
|
-
viewCount?: number | undefined;
|
|
87
87
|
transcriptWords?: number | undefined;
|
|
88
88
|
transcriptError?: string | undefined;
|
|
89
89
|
}, {
|
|
90
|
-
url: string;
|
|
91
|
-
title: string;
|
|
92
90
|
id: string;
|
|
91
|
+
title: string;
|
|
93
92
|
durationFormatted: string;
|
|
93
|
+
url: string;
|
|
94
|
+
viewCount?: number | undefined;
|
|
95
|
+
uploadDate?: string | undefined;
|
|
94
96
|
chapters?: {
|
|
95
97
|
title: string;
|
|
96
98
|
startSeconds: number;
|
|
97
99
|
}[] | undefined;
|
|
98
|
-
uploadDate?: string | undefined;
|
|
99
|
-
viewCount?: number | undefined;
|
|
100
100
|
transcriptWords?: number | undefined;
|
|
101
101
|
transcriptError?: string | undefined;
|
|
102
102
|
}>, "many">;
|
package/dist/tools/batch.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getChapters, getTranscript, getVideoInfo, listVideos } from '../utils/y
|
|
|
3
3
|
import { toolResult } from '../utils/format.js';
|
|
4
4
|
import { asYouTubeError } from '../utils/errors.js';
|
|
5
5
|
import { reportProgress, throwIfAborted } from '../utils/context.js';
|
|
6
|
-
import { formatTimestamp, segmentsToText, windowText } from '../utils/transcript.js';
|
|
6
|
+
import { countWords, formatTimestamp, segmentsToText, windowText } from '../utils/transcript.js';
|
|
7
7
|
/**
|
|
8
8
|
* Multi-video operations.
|
|
9
9
|
*
|
|
@@ -164,7 +164,7 @@ export async function digestPlaylistHandler({ url, limit, includeChapters, inclu
|
|
|
164
164
|
if (includeTranscriptStats) {
|
|
165
165
|
try {
|
|
166
166
|
const transcript = await getTranscript(video.id);
|
|
167
|
-
const words = segmentsToText(transcript.segments)
|
|
167
|
+
const words = countWords(segmentsToText(transcript.segments));
|
|
168
168
|
lines.push(`transcript: ${words.toLocaleString()} words (${transcript.language})`);
|
|
169
169
|
entry.transcriptWords = words;
|
|
170
170
|
}
|
package/dist/tools/batch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/tools/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/tools/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,E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