screenhand 0.1.1 → 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/README.md +193 -109
- package/bin/darwin-arm64/macos-bridge +0 -0
- package/dist/mcp-desktop.js +5876 -0
- package/dist/scripts/codex-monitor-daemon.js +335 -0
- package/dist/scripts/export-help-center.js +112 -0
- package/dist/scripts/marketing-loop.js +117 -0
- package/dist/scripts/observer-daemon.js +288 -0
- package/dist/scripts/orchestrator-daemon.js +399 -0
- package/dist/scripts/supervisor-daemon.js +272 -0
- package/dist/scripts/threads-campaign.js +208 -0
- package/dist/scripts/worker-daemon.js +228 -0
- package/dist/src/agent/cli.js +82 -0
- package/dist/src/agent/loop.js +274 -0
- package/dist/src/community/fetcher.js +109 -0
- package/dist/src/community/index.js +6 -0
- package/dist/src/community/publisher.js +191 -0
- package/dist/src/community/remote-api.js +121 -0
- package/dist/src/community/types.js +3 -0
- package/dist/src/community/validator.js +95 -0
- package/{src/config.ts → dist/src/config.js} +5 -10
- package/dist/src/context-tracker.js +489 -0
- package/{src/index.ts → dist/src/index.js} +32 -52
- package/dist/src/ingestion/coverage-auditor.js +233 -0
- package/dist/src/ingestion/doc-parser.js +164 -0
- package/dist/src/ingestion/index.js +8 -0
- package/dist/src/ingestion/menu-scanner.js +152 -0
- package/dist/src/ingestion/reference-merger.js +186 -0
- package/dist/src/ingestion/shortcut-extractor.js +180 -0
- package/dist/src/ingestion/tutorial-extractor.js +170 -0
- package/dist/src/ingestion/types.js +3 -0
- package/dist/src/jobs/manager.js +305 -0
- package/dist/src/jobs/runner.js +806 -0
- package/dist/src/jobs/store.js +102 -0
- package/dist/src/jobs/types.js +30 -0
- package/dist/src/jobs/worker.js +97 -0
- package/dist/src/learning/engine.js +356 -0
- package/dist/src/learning/index.js +9 -0
- package/dist/src/learning/locator-policy.js +120 -0
- package/dist/src/learning/pattern-policy.js +89 -0
- package/dist/src/learning/recovery-policy.js +116 -0
- package/dist/src/learning/sensor-policy.js +115 -0
- package/dist/src/learning/timing-model.js +204 -0
- package/dist/src/learning/topology-policy.js +90 -0
- package/dist/src/learning/types.js +9 -0
- package/dist/src/logging/timeline-logger.js +48 -0
- package/dist/src/mcp/mcp-stdio-server.js +464 -0
- package/dist/src/mcp/server.js +363 -0
- package/dist/src/mcp-entry.js +60 -0
- package/dist/src/memory/playbook-seeds.js +200 -0
- package/dist/src/memory/recall.js +222 -0
- package/dist/src/memory/research.js +104 -0
- package/dist/src/memory/seeds.js +101 -0
- package/dist/src/memory/service.js +446 -0
- package/dist/src/memory/session.js +169 -0
- package/dist/src/memory/store.js +451 -0
- package/{src/runtime/locator-cache.ts → dist/src/memory/types.js} +1 -17
- package/dist/src/monitor/codex-monitor.js +382 -0
- package/dist/src/monitor/task-queue.js +97 -0
- package/dist/src/monitor/types.js +62 -0
- package/dist/src/native/bridge-client.js +412 -0
- package/{src/native/macos-bridge-client.ts → dist/src/native/macos-bridge-client.js} +0 -1
- package/dist/src/observer/state.js +199 -0
- package/dist/src/observer/types.js +43 -0
- package/dist/src/orchestrator/state.js +68 -0
- package/dist/src/orchestrator/types.js +22 -0
- package/dist/src/perception/ax-source.js +162 -0
- package/dist/src/perception/cdp-source.js +162 -0
- package/dist/src/perception/coordinator.js +771 -0
- package/dist/src/perception/frame-differ.js +287 -0
- package/dist/src/perception/index.js +22 -0
- package/dist/src/perception/manager.js +199 -0
- package/dist/src/perception/types.js +47 -0
- package/dist/src/perception/vision-source.js +399 -0
- package/dist/src/planner/deterministic.js +298 -0
- package/dist/src/planner/executor.js +870 -0
- package/dist/src/planner/goal-store.js +92 -0
- package/dist/src/planner/index.js +21 -0
- package/dist/src/planner/planner.js +520 -0
- package/dist/src/planner/tool-registry.js +71 -0
- package/dist/src/planner/types.js +22 -0
- package/dist/src/platform/explorer.js +213 -0
- package/dist/src/platform/help-center-markdown.js +527 -0
- package/dist/src/platform/learner.js +257 -0
- package/dist/src/playbook/engine.js +486 -0
- package/dist/src/playbook/index.js +20 -0
- package/dist/src/playbook/mcp-recorder.js +204 -0
- package/dist/src/playbook/recorder.js +536 -0
- package/dist/src/playbook/runner.js +408 -0
- package/dist/src/playbook/store.js +312 -0
- package/dist/src/playbook/types.js +17 -0
- package/dist/src/recovery/detectors.js +156 -0
- package/dist/src/recovery/engine.js +327 -0
- package/dist/src/recovery/index.js +20 -0
- package/dist/src/recovery/strategies.js +274 -0
- package/dist/src/recovery/types.js +20 -0
- package/dist/src/runtime/accessibility-adapter.js +430 -0
- package/dist/src/runtime/app-adapter.js +64 -0
- package/dist/src/runtime/applescript-adapter.js +305 -0
- package/dist/src/runtime/ax-role-map.js +96 -0
- package/dist/src/runtime/browser-adapter.js +52 -0
- package/dist/src/runtime/cdp-chrome-adapter.js +521 -0
- package/dist/src/runtime/composite-adapter.js +221 -0
- package/dist/src/runtime/execution-contract.js +159 -0
- package/dist/src/runtime/executor.js +286 -0
- package/dist/src/runtime/locator-cache.js +50 -0
- package/dist/src/runtime/planning-loop.js +63 -0
- package/dist/src/runtime/service.js +432 -0
- package/dist/src/runtime/session-manager.js +63 -0
- package/dist/src/runtime/state-observer.js +121 -0
- package/dist/src/runtime/vision-adapter.js +225 -0
- package/dist/src/state/app-map-types.js +72 -0
- package/dist/src/state/app-map.js +1974 -0
- package/dist/src/state/entity-tracker.js +108 -0
- package/dist/src/state/fusion.js +96 -0
- package/dist/src/state/index.js +21 -0
- package/dist/src/state/ladder-generator.js +236 -0
- package/dist/src/state/persistence.js +156 -0
- package/dist/src/state/types.js +17 -0
- package/dist/src/state/world-model.js +1456 -0
- package/dist/src/supervisor/locks.js +186 -0
- package/dist/src/supervisor/supervisor.js +403 -0
- package/dist/src/supervisor/types.js +30 -0
- package/dist/src/test-mcp-protocol.js +154 -0
- package/dist/src/types.js +17 -0
- package/dist/src/util/atomic-write.js +133 -0
- package/dist/src/util/sanitize.js +146 -0
- package/dist-app-maps/com.figma.Desktop.json +959 -0
- package/dist-app-maps/com.hnc.Discord.json +1146 -0
- package/dist-app-maps/notion.id.json +2831 -0
- package/dist-playbooks/canva-screenhand-carousel.json +445 -0
- package/dist-playbooks/codex-desktop.json +76 -0
- package/dist-playbooks/competitor-research-stack.json +122 -0
- package/dist-playbooks/davinci-color-grade.json +153 -0
- package/dist-playbooks/davinci-edit-timeline.json +162 -0
- package/dist-playbooks/davinci-render.json +114 -0
- package/dist-playbooks/devto.json +52 -0
- package/dist-playbooks/discord.json +41 -0
- package/dist-playbooks/google-flow-create-project.json +59 -0
- package/dist-playbooks/google-flow-edit-image.json +90 -0
- package/dist-playbooks/google-flow-edit-video.json +90 -0
- package/dist-playbooks/google-flow-generate-image.json +68 -0
- package/dist-playbooks/google-flow-generate-video.json +191 -0
- package/dist-playbooks/google-flow-open-project.json +48 -0
- package/dist-playbooks/google-flow-open-scenebuilder.json +64 -0
- package/dist-playbooks/google-flow-search-assets.json +64 -0
- package/dist-playbooks/instagram.json +57 -0
- package/dist-playbooks/linkedin.json +52 -0
- package/dist-playbooks/n8n.json +43 -0
- package/dist-playbooks/reddit.json +52 -0
- package/dist-playbooks/threads.json +59 -0
- package/dist-playbooks/x-twitter.json +59 -0
- package/dist-playbooks/youtube.json +59 -0
- package/dist-references/canva.json +646 -0
- package/dist-references/codex-desktop.json +305 -0
- package/dist-references/davinci-resolve-keyboard.json +594 -0
- package/dist-references/davinci-resolve-menu-map.json +1139 -0
- package/dist-references/davinci-resolve-menus-batch1.json +116 -0
- package/dist-references/davinci-resolve-menus-batch2.json +372 -0
- package/dist-references/davinci-resolve-menus-batch3.json +330 -0
- package/dist-references/davinci-resolve-menus-batch4.json +297 -0
- package/dist-references/davinci-resolve-shortcuts.json +333 -0
- package/dist-references/devto.json +317 -0
- package/dist-references/discord.json +549 -0
- package/dist-references/figma.json +1186 -0
- package/dist-references/finder.json +146 -0
- package/dist-references/google-ads-transparency.json +95 -0
- package/dist-references/google-flow.json +649 -0
- package/dist-references/instagram.json +341 -0
- package/dist-references/linkedin.json +324 -0
- package/dist-references/meta-ad-library.json +86 -0
- package/dist-references/n8n.json +387 -0
- package/dist-references/notes.json +27 -0
- package/dist-references/notion.json +163 -0
- package/dist-references/reddit.json +341 -0
- package/dist-references/threads.json +337 -0
- package/dist-references/x-twitter.json +403 -0
- package/dist-references/youtube.json +373 -0
- package/native/macos-bridge/Package.swift +1 -0
- package/native/macos-bridge/Sources/AccessibilityBridge.swift +257 -36
- package/native/macos-bridge/Sources/AppManagement.swift +212 -2
- package/native/macos-bridge/Sources/CoreGraphicsBridge.swift +348 -53
- package/native/macos-bridge/Sources/StreamCapture.swift +136 -0
- package/native/macos-bridge/Sources/VisionBridge.swift +165 -7
- package/native/macos-bridge/Sources/main.swift +169 -16
- package/native/windows-bridge/Program.cs +5 -0
- package/native/windows-bridge/ScreenCapture.cs +124 -0
- package/package.json +29 -4
- package/scripts/postinstall.cjs +127 -0
- package/.claude/commands/automate.md +0 -28
- package/.claude/commands/debug-ui.md +0 -19
- package/.claude/commands/screenshot.md +0 -15
- package/.github/FUNDING.yml +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.mcp.json +0 -8
- package/DESKTOP_MCP_GUIDE.md +0 -92
- package/SECURITY.md +0 -44
- package/docs/architecture.md +0 -47
- package/install-skills.sh +0 -19
- package/mcp-bridge.ts +0 -271
- package/mcp-desktop.ts +0 -1221
- package/playbooks/instagram.json +0 -41
- package/playbooks/instagram_v2.json +0 -201
- package/playbooks/x_v1.json +0 -211
- package/scripts/devpost-live-loop.mjs +0 -421
- package/src/logging/timeline-logger.ts +0 -55
- package/src/mcp/server.ts +0 -449
- package/src/memory/recall.ts +0 -191
- package/src/memory/research.ts +0 -146
- package/src/memory/seeds.ts +0 -123
- package/src/memory/session.ts +0 -201
- package/src/memory/store.ts +0 -434
- package/src/memory/types.ts +0 -69
- package/src/native/bridge-client.ts +0 -239
- package/src/runtime/accessibility-adapter.ts +0 -487
- package/src/runtime/app-adapter.ts +0 -169
- package/src/runtime/applescript-adapter.ts +0 -376
- package/src/runtime/ax-role-map.ts +0 -102
- package/src/runtime/browser-adapter.ts +0 -129
- package/src/runtime/cdp-chrome-adapter.ts +0 -676
- package/src/runtime/composite-adapter.ts +0 -274
- package/src/runtime/executor.ts +0 -396
- package/src/runtime/planning-loop.ts +0 -81
- package/src/runtime/service.ts +0 -448
- package/src/runtime/session-manager.ts +0 -50
- package/src/runtime/state-observer.ts +0 -136
- package/src/runtime/vision-adapter.ts +0 -297
- package/src/types.ts +0 -297
- package/tests/bridge-client.test.ts +0 -176
- package/tests/browser-stealth.test.ts +0 -210
- package/tests/composite-adapter.test.ts +0 -64
- package/tests/mcp-server.test.ts +0 -151
- package/tests/memory-recall.test.ts +0 -339
- package/tests/memory-research.test.ts +0 -159
- package/tests/memory-seeds.test.ts +0 -120
- package/tests/memory-store.test.ts +0 -392
- package/tests/types.test.ts +0 -92
- package/tsconfig.check.json +0 -17
- package/tsconfig.json +0 -19
- package/vitest.config.ts +0 -8
- /package/{playbooks → dist-references}/devpost.json +0 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "youtube",
|
|
3
|
+
"name": "YouTube Automation",
|
|
4
|
+
"description": "Battle-tested playbook for YouTube browser automation via CDP. Covers channel management, video upload, search, like, comment, subscribe, and YouTube Studio operations.",
|
|
5
|
+
"platform": "youtube",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"urlPatterns": [
|
|
8
|
+
"*youtube.com*",
|
|
9
|
+
"*studio.youtube.com*"
|
|
10
|
+
],
|
|
11
|
+
"tags": [
|
|
12
|
+
"youtube",
|
|
13
|
+
"video",
|
|
14
|
+
"browser",
|
|
15
|
+
"cdp",
|
|
16
|
+
"google"
|
|
17
|
+
],
|
|
18
|
+
"successCount": 0,
|
|
19
|
+
"failCount": 0,
|
|
20
|
+
"urls": {
|
|
21
|
+
"home": "https://www.youtube.com/",
|
|
22
|
+
"studio": "https://studio.youtube.com/",
|
|
23
|
+
"studio_content": "https://studio.youtube.com/channel/{channelId}/videos",
|
|
24
|
+
"studio_community": "https://studio.youtube.com/channel/{channelId}/community",
|
|
25
|
+
"studio_analytics": "https://studio.youtube.com/channel/{channelId}/analytics",
|
|
26
|
+
"channel": "https://www.youtube.com/@{handle}",
|
|
27
|
+
"video": "https://www.youtube.com/watch?v={videoId}",
|
|
28
|
+
"shorts": "https://www.youtube.com/shorts/{videoId}",
|
|
29
|
+
"search": "https://www.youtube.com/results?search_query={query}",
|
|
30
|
+
"upload": "https://www.youtube.com/upload",
|
|
31
|
+
"subscriptions": "https://www.youtube.com/feed/subscriptions",
|
|
32
|
+
"trending": "https://www.youtube.com/feed/trending"
|
|
33
|
+
},
|
|
34
|
+
"selectors": {
|
|
35
|
+
"nav": {
|
|
36
|
+
"home": "a[href='/']",
|
|
37
|
+
"shorts": "a[href='/shorts']",
|
|
38
|
+
"subscriptions": "a[href='/feed/subscriptions']",
|
|
39
|
+
"you": "a[href='/feed/you']",
|
|
40
|
+
"search": "input#search",
|
|
41
|
+
"search_button": "button#search-icon-legacy",
|
|
42
|
+
"create": "[aria-label='Create']",
|
|
43
|
+
"notifications": "[aria-label='Notifications']",
|
|
44
|
+
"account": "button#avatar-btn"
|
|
45
|
+
},
|
|
46
|
+
"video_page": {
|
|
47
|
+
"like_button": "like-button-view-model button, segmented-like-dislike-button-view-model button:first-child",
|
|
48
|
+
"dislike_button": "dislike-button-view-model button, segmented-like-dislike-button-view-model button:last-child",
|
|
49
|
+
"subscribe_button": "ytd-subscribe-button-renderer button, [aria-label*='Subscribe']",
|
|
50
|
+
"share_button": "[aria-label='Share']",
|
|
51
|
+
"save_button": "[aria-label='Save to playlist']",
|
|
52
|
+
"comment_input": "#contenteditable-root, #placeholder-area",
|
|
53
|
+
"comment_submit": "#submit-button",
|
|
54
|
+
"video_title": "h1.ytd-watch-metadata yt-formatted-string",
|
|
55
|
+
"channel_name": "#channel-name a",
|
|
56
|
+
"description": "#description-inner",
|
|
57
|
+
"view_count": "ytd-watch-info-text .view-count",
|
|
58
|
+
"comments_section": "#comments"
|
|
59
|
+
},
|
|
60
|
+
"feed": {
|
|
61
|
+
"video_renderer": "ytd-rich-item-renderer, ytd-video-renderer",
|
|
62
|
+
"video_title": "#video-title",
|
|
63
|
+
"channel_name": "#channel-name, ytd-channel-name",
|
|
64
|
+
"video_thumbnail": "ytd-thumbnail a",
|
|
65
|
+
"chip_bar": "yt-chip-cloud-chip-renderer"
|
|
66
|
+
},
|
|
67
|
+
"search_results": {
|
|
68
|
+
"video_renderer": "ytd-video-renderer",
|
|
69
|
+
"channel_renderer": "ytd-channel-renderer",
|
|
70
|
+
"filter_menu": "ytd-search-filter-group-renderer"
|
|
71
|
+
},
|
|
72
|
+
"channel_page": {
|
|
73
|
+
"subscribe_button": "#subscribe-button button, [aria-label*='Subscribe']",
|
|
74
|
+
"tabs": "yt-tab-shape, [role='tab']",
|
|
75
|
+
"videos_tab": "yt-tab-shape:nth-child(2)",
|
|
76
|
+
"about_section": "#right-column",
|
|
77
|
+
"channel_header": "#channel-header"
|
|
78
|
+
},
|
|
79
|
+
"create_menu": {
|
|
80
|
+
"upload_video": "tp-yt-paper-item:has-text('Upload video')",
|
|
81
|
+
"go_live": "tp-yt-paper-item:has-text('Go live')"
|
|
82
|
+
},
|
|
83
|
+
"studio": {
|
|
84
|
+
"dashboard": "a:has-text('Dashboard')",
|
|
85
|
+
"content": "a:has-text('Content')",
|
|
86
|
+
"analytics": "a:has-text('Analytics')",
|
|
87
|
+
"community": "a:has-text('Community')",
|
|
88
|
+
"subtitles": "a:has-text('Subtitles')",
|
|
89
|
+
"customization": "a:has-text('Customization')",
|
|
90
|
+
"settings": "a:has-text('Settings')"
|
|
91
|
+
},
|
|
92
|
+
"upload_dialog": {
|
|
93
|
+
"file_input": "input[type='file']",
|
|
94
|
+
"select_files": "button:has-text('Select files')",
|
|
95
|
+
"title_input": "#textbox[aria-label*='title']",
|
|
96
|
+
"description_input": "#textbox[aria-label*='Tell viewers']",
|
|
97
|
+
"kids_no": "tp-yt-paper-radio-button:has-text('No, it\\'s not made for kids')",
|
|
98
|
+
"visibility_public": "tp-yt-paper-radio-button:has-text('Public')",
|
|
99
|
+
"visibility_unlisted": "tp-yt-paper-radio-button:has-text('Unlisted')",
|
|
100
|
+
"visibility_private": "tp-yt-paper-radio-button:has-text('Private')",
|
|
101
|
+
"next_button": "ytcp-button:has-text('Next')",
|
|
102
|
+
"publish_button": "ytcp-button:has-text('Publish')",
|
|
103
|
+
"save_button": "ytcp-button:has-text('Save')"
|
|
104
|
+
},
|
|
105
|
+
"auto_discovered": {
|
|
106
|
+
"auto_mmlqct6w_t3h": "[role='textbox'][contenteditable='true'][data-slate-editor='true']",
|
|
107
|
+
"auto_mmlqj53g_yjg": "[role='textbox'][contenteditable='true'][data-slate-editor='true']",
|
|
108
|
+
"auto_mmltynml_8tr": "#radix-\\:rj\\:",
|
|
109
|
+
"auto_mmnbaf7v_pif": "[role='listbox'], [role='option']",
|
|
110
|
+
"auto_mmohtdue_1j6": "[data-sh-target=\"trial1-span\"]",
|
|
111
|
+
"auto_mmoi2jgn_rp8": ".ql-editor",
|
|
112
|
+
"auto_mmoi8jv6_agz": ".ql-editor",
|
|
113
|
+
"auto_mmoif5z4_r41": ".ql-editor"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"detection": {
|
|
117
|
+
"is_logged_in": "!!document.querySelector('button#avatar-btn, [aria-label=\"Account\"]')",
|
|
118
|
+
"is_home": "window.location.pathname === '/'",
|
|
119
|
+
"is_video": "window.location.pathname === '/watch'",
|
|
120
|
+
"is_shorts": "window.location.pathname.startsWith('/shorts/')",
|
|
121
|
+
"is_channel": "window.location.pathname.startsWith('/@')",
|
|
122
|
+
"is_search": "window.location.pathname === '/results'",
|
|
123
|
+
"is_studio": "window.location.hostname === 'studio.youtube.com'",
|
|
124
|
+
"has_upload_dialog": "!!document.querySelector('#textbox[aria-label*=\"title\"]')"
|
|
125
|
+
},
|
|
126
|
+
"flows": {
|
|
127
|
+
"upload_video": {
|
|
128
|
+
"steps": [
|
|
129
|
+
"Navigate to studio.youtube.com or click Create → Upload video",
|
|
130
|
+
"Wait for upload dialog to open",
|
|
131
|
+
"Find file input: input[type='file']",
|
|
132
|
+
"Create File from blob via DataTransfer API and set on file input",
|
|
133
|
+
"Dispatch 'change' event on file input",
|
|
134
|
+
"Wait 3s for upload to process and title/description fields to appear",
|
|
135
|
+
"Type title into #textbox[aria-label*='title'] via browser_fill_form",
|
|
136
|
+
"Type description into #textbox[aria-label*='Tell viewers'] via browser_fill_form",
|
|
137
|
+
"Select 'No, it's not made for kids' radio button",
|
|
138
|
+
"Click Next 3 times (Details → Video elements → Checks → Visibility)",
|
|
139
|
+
"Select visibility: Public/Unlisted/Private radio",
|
|
140
|
+
"Click Publish (or Save for private)",
|
|
141
|
+
"Wait 3s for confirmation with video link"
|
|
142
|
+
],
|
|
143
|
+
"guards": [
|
|
144
|
+
"Must be logged in as channel owner",
|
|
145
|
+
"File must be valid video format"
|
|
146
|
+
],
|
|
147
|
+
"why": "Upload uses DataTransfer API to set files on hidden input. YouTube auto-detects Shorts (vertical, <60s). Upload dialog has 4 steps: Details, Video elements, Checks, Visibility."
|
|
148
|
+
},
|
|
149
|
+
"generate_video_in_browser": {
|
|
150
|
+
"steps": [
|
|
151
|
+
"Create canvas element (1080x1920 for Shorts, 1920x1080 for regular)",
|
|
152
|
+
"Use canvas.captureStream(30) to get MediaStream",
|
|
153
|
+
"Create MediaRecorder with 'video/webm;codecs=vp9' mimeType",
|
|
154
|
+
"Draw frames with requestAnimationFrame (30fps, 3s = 90 frames)",
|
|
155
|
+
"Stop recorder after animation completes",
|
|
156
|
+
"Store blob as window._screenhandVideoBlob for upload flow"
|
|
157
|
+
],
|
|
158
|
+
"guards": [
|
|
159
|
+
"Browser must support MediaRecorder and WebM VP9"
|
|
160
|
+
],
|
|
161
|
+
"why": "No ffmpeg needed. Canvas + MediaRecorder generates valid WebM videos directly in Chrome. 3 seconds at 1080x1920 produces ~500KB file."
|
|
162
|
+
},
|
|
163
|
+
"like_video": {
|
|
164
|
+
"steps": [
|
|
165
|
+
"Navigate to youtube.com/watch?v={videoId}",
|
|
166
|
+
"Wait 2s for video page to load",
|
|
167
|
+
"Find Like button: like-button-view-model button or segmented-like-dislike-button-view-model first button",
|
|
168
|
+
"Click Like button via browser_human_click",
|
|
169
|
+
"Verify: button aria-pressed changes to 'true'"
|
|
170
|
+
],
|
|
171
|
+
"guards": [
|
|
172
|
+
"Must be logged in"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"comment_on_video": {
|
|
176
|
+
"steps": [
|
|
177
|
+
"Navigate to youtube.com/watch?v={videoId}",
|
|
178
|
+
"Scroll down to comments section (#comments)",
|
|
179
|
+
"Click on comment placeholder: #placeholder-area",
|
|
180
|
+
"Wait 1s for contenteditable to activate",
|
|
181
|
+
"Type comment into #contenteditable-root via browser_fill_form",
|
|
182
|
+
"Click submit button: #submit-button",
|
|
183
|
+
"Wait 2s for comment to post"
|
|
184
|
+
],
|
|
185
|
+
"guards": [
|
|
186
|
+
"Must be logged in",
|
|
187
|
+
"Comments must be enabled on video"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"subscribe_to_channel": {
|
|
191
|
+
"steps": [
|
|
192
|
+
"Navigate to youtube.com/@{handle} or video page",
|
|
193
|
+
"Find Subscribe button: ytd-subscribe-button-renderer button",
|
|
194
|
+
"Click Subscribe via browser_human_click",
|
|
195
|
+
"Verify button text changes to 'Subscribed'"
|
|
196
|
+
],
|
|
197
|
+
"guards": [
|
|
198
|
+
"Must be logged in",
|
|
199
|
+
"Must not already be subscribed"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"search_videos": {
|
|
203
|
+
"steps": [
|
|
204
|
+
"Navigate to youtube.com/results?search_query={query}",
|
|
205
|
+
"Wait 2s for results to load",
|
|
206
|
+
"Extract video results from ytd-video-renderer elements",
|
|
207
|
+
"Get title from #video-title, channel from ytd-channel-name, views/date from metadata"
|
|
208
|
+
],
|
|
209
|
+
"guards": [
|
|
210
|
+
"Must be logged in"
|
|
211
|
+
],
|
|
212
|
+
"why": "Direct URL navigation is more reliable than typing in search input."
|
|
213
|
+
},
|
|
214
|
+
"view_channel": {
|
|
215
|
+
"steps": [
|
|
216
|
+
"Navigate to youtube.com/@{handle}",
|
|
217
|
+
"Wait 2s for channel page to load",
|
|
218
|
+
"Extract channel name, subscriber count, description",
|
|
219
|
+
"Click Videos tab to see uploads",
|
|
220
|
+
"Extract video list from grid"
|
|
221
|
+
],
|
|
222
|
+
"guards": []
|
|
223
|
+
},
|
|
224
|
+
"scroll_and_extract_feed": {
|
|
225
|
+
"steps": [
|
|
226
|
+
"Navigate to youtube.com",
|
|
227
|
+
"Wait 2s for feed to load",
|
|
228
|
+
"Extract video cards from ytd-rich-item-renderer (title, channel, views, thumbnail)",
|
|
229
|
+
"Scroll down for more videos",
|
|
230
|
+
"Wait 1s for lazy-loaded content"
|
|
231
|
+
],
|
|
232
|
+
"guards": []
|
|
233
|
+
},
|
|
234
|
+
"share_video": {
|
|
235
|
+
"steps": [
|
|
236
|
+
"Navigate to video page",
|
|
237
|
+
"Click Share button: [aria-label='Share']",
|
|
238
|
+
"Wait 1s for share dialog",
|
|
239
|
+
"Click 'Copy' to copy video link",
|
|
240
|
+
"Or click specific platform icon (Twitter, Facebook, etc.)"
|
|
241
|
+
],
|
|
242
|
+
"guards": []
|
|
243
|
+
},
|
|
244
|
+
"studio_analytics": {
|
|
245
|
+
"steps": [
|
|
246
|
+
"Navigate to studio.youtube.com/channel/{channelId}/analytics",
|
|
247
|
+
"Wait 2s for analytics dashboard to load",
|
|
248
|
+
"Extract views, watch time, subscribers data",
|
|
249
|
+
"Click tabs for different time ranges"
|
|
250
|
+
],
|
|
251
|
+
"guards": [
|
|
252
|
+
"Must be logged in as channel owner"
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"errors": [
|
|
257
|
+
{
|
|
258
|
+
"error": "Login required / not signed in",
|
|
259
|
+
"context": "Any action requiring authentication",
|
|
260
|
+
"solution": "Log in manually first via Google account.",
|
|
261
|
+
"severity": "high"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"error": "Community posts not available",
|
|
265
|
+
"context": "New channels don't have community tab access",
|
|
266
|
+
"solution": "YouTube requires eligibility (subscriber threshold) for community posts. Use video uploads or Shorts instead.",
|
|
267
|
+
"severity": "medium"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"error": "Upload dialog shows 'Oops, something went wrong'",
|
|
271
|
+
"context": "File format or size issue",
|
|
272
|
+
"solution": "Use video/webm with VP9 codec. Ensure file is under 256GB and valid duration.",
|
|
273
|
+
"severity": "medium"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"error": "Create menu only shows 'Upload video' and 'Go live'",
|
|
277
|
+
"context": "New channels have limited create options",
|
|
278
|
+
"solution": "Community posts, Shorts creation, and other options unlock as channel grows.",
|
|
279
|
+
"severity": "low"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"error": "browser_fill_form doesn't work on YouTube Studio textboxes",
|
|
283
|
+
"context": "YouTube Studio uses contenteditable divs with id='textbox'",
|
|
284
|
+
"solution": "Use browser_fill_form with selector #textbox[aria-label*='title'] — the aria-label differentiates title from description.",
|
|
285
|
+
"severity": "medium"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"error": "Video created as Short instead of regular video",
|
|
289
|
+
"context": "YouTube auto-classifies vertical videos under 60s as Shorts",
|
|
290
|
+
"solution": "Use 1920x1080 (landscape) canvas and >60s duration for regular videos.",
|
|
291
|
+
"severity": "low"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"error": "Frontmost app switches to VS Code when approving tool calls",
|
|
295
|
+
"context": "AccessibilityAdapter attaches to frontmost app",
|
|
296
|
+
"solution": "Use CDP browser tools — they work regardless of which app is frontmost.",
|
|
297
|
+
"severity": "high"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"error": "Object couldn't be returned by value",
|
|
301
|
+
"context": "tool: browser_js, domain: labs.google",
|
|
302
|
+
"solution": "No resolution yet — investigate and update this entry",
|
|
303
|
+
"severity": "medium"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"error": "Chrome not running with --remote-debugging-port. Launch with: /Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug",
|
|
307
|
+
"context": "tool: browser_tabs, domain: native:com.google.Chrome",
|
|
308
|
+
"solution": "No resolution yet — investigate and update this entry",
|
|
309
|
+
"severity": "medium"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"policyNotes": {
|
|
313
|
+
"rate_limits": [
|
|
314
|
+
"Video uploads: ~15/day (100 max with verification)",
|
|
315
|
+
"Comments: ~50/day",
|
|
316
|
+
"Likes: no strict limit but don't spam",
|
|
317
|
+
"Subscriptions: ~75/day"
|
|
318
|
+
],
|
|
319
|
+
"safety": [
|
|
320
|
+
"Never automate login (Google account)",
|
|
321
|
+
"Respect YouTube Terms of Service",
|
|
322
|
+
"Don't upload copyrighted content",
|
|
323
|
+
"Add delays between actions",
|
|
324
|
+
"Use browser_fill_form for text inputs",
|
|
325
|
+
"Use browser_human_click for like/subscribe buttons"
|
|
326
|
+
],
|
|
327
|
+
"tool_preferences": [
|
|
328
|
+
"browser_human_click — for Like, Subscribe, Share buttons",
|
|
329
|
+
"browser_fill_form — for title, description, comments, search",
|
|
330
|
+
"browser_js — for DataTransfer file upload, extracting video data, radio button selection",
|
|
331
|
+
"browser_navigate — for search (direct URL), channel/video navigation"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"steps": [
|
|
335
|
+
{
|
|
336
|
+
"action": "navigate",
|
|
337
|
+
"url": "https://www.youtube.com/",
|
|
338
|
+
"description": "Open YouTube home feed"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"action": "wait",
|
|
342
|
+
"ms": 2000,
|
|
343
|
+
"description": "Wait for feed to load"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"action": "extract",
|
|
347
|
+
"target": "ytd-rich-item-renderer",
|
|
348
|
+
"format": "text",
|
|
349
|
+
"description": "Extract visible video cards"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"action": "scroll",
|
|
353
|
+
"direction": "down",
|
|
354
|
+
"amount": 5,
|
|
355
|
+
"description": "Scroll for more videos"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"action": "wait",
|
|
359
|
+
"ms": 1000,
|
|
360
|
+
"description": "Wait for lazy-loaded videos"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"action": "extract",
|
|
364
|
+
"target": "ytd-rich-item-renderer",
|
|
365
|
+
"format": "text",
|
|
366
|
+
"description": "Extract videos after scroll"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"action": "screenshot",
|
|
370
|
+
"description": "Capture current feed state"
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
}
|