@mkterswingman/5mghost-yonder 0.0.34 → 0.0.36
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/dist/cli/index.js
CHANGED
|
@@ -92,7 +92,15 @@ async function main() {
|
|
|
92
92
|
}
|
|
93
93
|
case "setup-cookies": {
|
|
94
94
|
const { runSetupCookies, parseSetupCookiesArgs } = await import("./setupCookies.js");
|
|
95
|
-
|
|
95
|
+
try {
|
|
96
|
+
parseSetupCookiesArgs(process.argv.slice(3));
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
100
|
+
console.error(msg);
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
await runSetupCookies({});
|
|
96
104
|
break;
|
|
97
105
|
}
|
|
98
106
|
case "uninstall": {
|
|
@@ -51,10 +51,6 @@ export interface SetupCookiesDeps {
|
|
|
51
51
|
runManualCookieSetup: typeof runManualCookieSetup;
|
|
52
52
|
log: (message: string) => void;
|
|
53
53
|
}
|
|
54
|
-
export interface SetupCookiesOptions {
|
|
55
|
-
importOnly?: boolean;
|
|
56
|
-
headed?: boolean;
|
|
57
|
-
}
|
|
58
54
|
export declare class BrowserProfileLockedError extends Error {
|
|
59
55
|
constructor(message?: string);
|
|
60
56
|
}
|
|
@@ -83,6 +79,6 @@ export declare function runManualCookieSetup(chromium: SetupCookiesChromium, dep
|
|
|
83
79
|
/**
|
|
84
80
|
* Interactive cookie setup — opens a visible browser for user to log in.
|
|
85
81
|
*/
|
|
86
|
-
export declare function parseSetupCookiesArgs(argv: string[]):
|
|
87
|
-
export declare function runSetupCookies(overrides?: Partial<SetupCookiesDeps
|
|
82
|
+
export declare function parseSetupCookiesArgs(argv: string[]): void;
|
|
83
|
+
export declare function runSetupCookies(overrides?: Partial<SetupCookiesDeps>): Promise<void>;
|
|
88
84
|
export {};
|
package/dist/cli/setupCookies.js
CHANGED
|
@@ -413,17 +413,13 @@ export async function runManualCookieSetup(chromium, deps) {
|
|
|
413
413
|
* Interactive cookie setup — opens a visible browser for user to log in.
|
|
414
414
|
*/
|
|
415
415
|
export function parseSetupCookiesArgs(argv) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
};
|
|
416
|
+
for (const arg of argv) {
|
|
417
|
+
throw new Error(`Unknown option for setup-cookies: ${arg}. setup-cookies accepts no options.`);
|
|
418
|
+
}
|
|
420
419
|
}
|
|
421
|
-
export async function runSetupCookies(overrides = {}
|
|
420
|
+
export async function runSetupCookies(overrides = {}) {
|
|
422
421
|
const deps = buildSetupCookiesDeps(overrides);
|
|
423
422
|
deps.log("\n🍪 YouTube Cookie Setup\n");
|
|
424
|
-
if (options.importOnly && !options.headed) {
|
|
425
|
-
throw new Error("setup-cookies --import-only mode is no longer supported. Use headed login instead.");
|
|
426
|
-
}
|
|
427
423
|
deps.ensureConfigDir();
|
|
428
424
|
let chromium;
|
|
429
425
|
try {
|
|
@@ -81,10 +81,9 @@ async function tryPlaywrightRefresh() {
|
|
|
81
81
|
*/
|
|
82
82
|
async function tryHeadedManualLogin() {
|
|
83
83
|
try {
|
|
84
|
-
// Why:
|
|
85
|
-
// to manual Playwright login, which creates browser-profile for future Tier 1 use.
|
|
84
|
+
// Why: setup-cookies now only supports the dedicated manual Playwright login flow.
|
|
86
85
|
const { runSetupCookies } = await import("../cli/setupCookies.js");
|
|
87
|
-
await runSetupCookies({}
|
|
86
|
+
await runSetupCookies({});
|
|
88
87
|
return hasSIDCookies(PATHS.cookiesTxt);
|
|
89
88
|
}
|
|
90
89
|
catch {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-yt-mcp
|
|
3
3
|
preamble-tier: 3
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
description: |
|
|
6
6
|
Use when the user wants YouTube analysis through yt-mcp: channel performance,
|
|
7
7
|
video stats, subtitles, comments, trending, or batch YouTube data work.
|
|
@@ -44,6 +44,7 @@ Focus on YouTube analysis with yt-mcp MCP tools. Answer the analysis question fi
|
|
|
44
44
|
| List channel uploads | `list_channel_uploads` |
|
|
45
45
|
| Trending videos | `get_trending` |
|
|
46
46
|
| Local download | `start_download_job` -> `poll_download_job` |
|
|
47
|
+
| Summarize a video | `get_video_stats` -> `get_subtitles` -> `get_comments` (see Video Summary workflow) |
|
|
47
48
|
|
|
48
49
|
All tools are prefixed `mcp__yt-mcp__` in actual calls.
|
|
49
50
|
|
|
@@ -87,11 +88,57 @@ Default output:
|
|
|
87
88
|
| 直播回放 | 3 | 345,678 | 115,226 | 200,000 | 45,678 |
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
### Video Summary
|
|
91
|
+
### Video Summary (Multi-Source)
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Fuse metadata + subtitles + comments into a rich summary with automatic segmentation.
|
|
94
|
+
|
|
95
|
+
**Phase 1 — Metadata**
|
|
96
|
+
1. `get_video_stats(videos=[video_id])` → title, description, duration, view/like/comment counts, published_at
|
|
97
|
+
2. Parse description for chapter markers (`0:00 Title` lines). If found, use them as segment anchors in Phase 4.
|
|
98
|
+
|
|
99
|
+
**Phase 2 — Subtitles**
|
|
100
|
+
3. `get_subtitles(video, format="csv")` → timestamped transcript
|
|
101
|
+
- If it fails or returns empty, call `list_available_subtitles(video)` and retry with the best available language.
|
|
102
|
+
- If no subtitles exist at all, proceed with metadata + comments only and note the limitation.
|
|
103
|
+
|
|
104
|
+
**Phase 3 — Comments**
|
|
105
|
+
4. `get_comments(video, max_comments=100, order="relevance")`
|
|
106
|
+
- For long videos (>20 min) or videos with >1,000 comments, increase to `max_comments=200`.
|
|
107
|
+
|
|
108
|
+
**Phase 4 — Generate Summary**
|
|
109
|
+
|
|
110
|
+
Synthesize all three sources into this output structure:
|
|
111
|
+
|
|
112
|
+
```md
|
|
113
|
+
## 📺 {Video Title}
|
|
114
|
+
|
|
115
|
+
**基本信息**: {duration} | {view_count} 播放 | {like_count} 赞 | {comment_count} 条评论 | {published_at}
|
|
116
|
+
|
|
117
|
+
### 核心观点
|
|
118
|
+
(2-3 sentences capturing the video's central theme and conclusion)
|
|
119
|
+
|
|
120
|
+
### 分段总结
|
|
121
|
+
|
|
122
|
+
**[00:00] {Segment Topic}**
|
|
123
|
+
{Key points of this segment, 2-3 sentences}
|
|
124
|
+
|
|
125
|
+
**[05:23] {Segment Topic}**
|
|
126
|
+
{Key points of this segment, 2-3 sentences}
|
|
127
|
+
|
|
128
|
+
...
|
|
129
|
+
|
|
130
|
+
### 观众反馈
|
|
131
|
+
- **主流观点**: top recurring sentiment from high-liked comments
|
|
132
|
+
- **争议/补充**: notable disagreements or additions (if any)
|
|
133
|
+
- **精选评论**: quote 2-3 representative comments with like counts
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Segmentation rules**:
|
|
137
|
+
- If description contains chapter markers, use them as primary segment boundaries.
|
|
138
|
+
- Otherwise, detect topic shifts from the transcript automatically.
|
|
139
|
+
- Target 3-8 segments: short videos (<10 min) → 3-4, medium (10-30 min) → 4-6, long (>30 min) → 6-8.
|
|
140
|
+
- Each segment heading includes the start timestamp.
|
|
141
|
+
- Follow the user's language for the summary body.
|
|
95
142
|
|
|
96
143
|
### Comment Analysis
|
|
97
144
|
|