@bohuyeshan/openagent-labforge-core 3.11.2 → 3.11.4
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.ja.md +34 -27
- package/README.ko.md +34 -27
- package/README.md +244 -187
- package/README.ru.md +28 -21
- package/README.zh-cn.md +244 -187
- package/bin/platform.test.ts +21 -20
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gemini.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/bio-methodologist.d.ts +1 -1
- package/dist/agents/bio-pipeline-operator.d.ts +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -0
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/prometheus/gemini.d.ts +1 -1
- package/dist/agents/prometheus/gpt.d.ts +1 -1
- package/dist/agents/prometheus/interview-mode.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/cli/config-manager/bun-install.d.ts +6 -1
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +1 -1
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +763 -467
- package/dist/cli/install-validators.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +1 -0
- package/dist/cli/openai-only-model-catalog.d.ts +3 -0
- package/dist/cli/run/index.d.ts +1 -0
- package/dist/cli/run/model-resolver.d.ts +4 -0
- package/dist/cli/run/types.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema/agent-names.d.ts +3 -1
- package/dist/config/schema/background-task.d.ts +2 -0
- package/dist/config/schema/git-env-prefix.d.ts +5 -0
- package/dist/config/schema/git-master.d.ts +1 -0
- package/dist/config/schema/hooks.d.ts +2 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +54 -1
- package/dist/config/schema.d.ts +1 -0
- package/dist/create-hooks.d.ts +13 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +16 -1
- package/dist/features/background-agent/constants.d.ts +1 -1
- package/dist/features/background-agent/manager.d.ts +20 -4
- package/dist/features/background-agent/process-cleanup.d.ts +1 -1
- package/dist/features/background-agent/remove-task-toast-tracking.d.ts +1 -0
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +23 -0
- package/dist/features/background-agent/task-history.d.ts +1 -0
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +4 -0
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +4 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -3
- package/dist/features/claude-code-agent-loader/types.d.ts +8 -1
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/types.d.ts +1 -1
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -1
- package/dist/features/skill-mcp-manager/types.d.ts +4 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/manager.d.ts +5 -0
- package/dist/features/tmux-subagent/pane-state-parser.d.ts +8 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +8 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/atlas/boulder-session-lineage.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-approval-gate.d.ts +4 -0
- package/dist/hooks/atlas/idle-event.d.ts +8 -0
- package/dist/hooks/atlas/resolve-active-boulder-session.d.ts +11 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +2 -0
- package/dist/hooks/atlas/types.d.ts +2 -0
- package/dist/hooks/atlas/verification-reminders.d.ts +4 -0
- package/dist/hooks/auto-slash-command/hook.d.ts +7 -0
- package/dist/hooks/auto-slash-command/processed-command-store.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +3 -1
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/comment-checker/downloader.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/constants.d.ts +5 -0
- package/dist/hooks/compaction-context-injector/hook.d.ts +5 -1
- package/dist/hooks/compaction-context-injector/recovery-prompt-config.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/recovery.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/session-id.d.ts +2 -0
- package/dist/hooks/compaction-context-injector/session-prompt-config-resolver.d.ts +16 -0
- package/dist/hooks/compaction-context-injector/tail-monitor.d.ts +13 -0
- package/dist/hooks/compaction-context-injector/types.d.ts +43 -0
- package/dist/hooks/compaction-context-injector/validated-model.d.ts +13 -0
- package/dist/hooks/context-window-monitor.d.ts +2 -5
- package/dist/hooks/delegate-task-english-directive/hook.d.ts +14 -0
- package/dist/hooks/delegate-task-english-directive/index.d.ts +1 -0
- package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +23 -0
- package/dist/hooks/gpt-permission-continuation/constants.d.ts +4 -0
- package/dist/hooks/gpt-permission-continuation/detector.d.ts +1 -0
- package/dist/hooks/gpt-permission-continuation/handler.d.ts +12 -0
- package/dist/hooks/gpt-permission-continuation/index.d.ts +13 -0
- package/dist/hooks/gpt-permission-continuation/session-state.d.ts +15 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/keyword-detector/hook.d.ts +1 -0
- package/dist/hooks/preemptive-compaction.d.ts +2 -5
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +16 -0
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
- package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +2 -3
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +1 -2
- package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +7 -0
- package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
- package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
- package/dist/hooks/runtime-fallback/types.d.ts +57 -3
- package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
- package/dist/hooks/session-notification-content.d.ts +30 -0
- package/dist/hooks/session-notification-scheduler.d.ts +5 -3
- package/dist/hooks/session-notification.d.ts +2 -0
- package/dist/hooks/start-work/index.d.ts +1 -1
- package/dist/hooks/start-work/worktree-detector.d.ts +7 -0
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +6 -2
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +10 -1
- package/dist/hooks/todo-continuation-enforcer/stagnation-detection.d.ts +6 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +5 -0
- package/dist/hooks/tool-output-truncator.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10638 -7240
- package/dist/openagent-labforge.schema.json +70 -4
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/normalize-tool-arg-schemas.d.ts +2 -0
- package/dist/plugin/ultrawork-model-override.d.ts +1 -15
- package/dist/plugin/ultrawork-variant-availability.d.ts +6 -0
- package/dist/plugin-dispose.d.ts +10 -0
- package/dist/plugin-handlers/agent-override-protection.d.ts +3 -0
- package/dist/plugin-state.d.ts +5 -0
- package/dist/shared/compaction-agent-config-checkpoint.d.ts +11 -0
- package/dist/shared/context-limit-resolver.d.ts +5 -0
- package/dist/shared/data-path.d.ts +2 -2
- package/dist/shared/dynamic-truncator.d.ts +4 -7
- package/dist/shared/external-plugin-detector.d.ts +1 -1
- package/dist/shared/fallback-chain-from-models.d.ts +3 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/model-error-classifier.d.ts +2 -1
- package/dist/shared/opencode-command-dirs.d.ts +3 -0
- package/dist/shared/plugin-identity.d.ts +7 -0
- package/dist/shared/question-denied-session-permission.d.ts +6 -0
- package/dist/shared/retry-status-utils.d.ts +2 -0
- package/dist/shared/session-model-state.d.ts +4 -0
- package/dist/shared/system-directive.d.ts +6 -5
- package/dist/shared/vision-capable-models-cache.d.ts +4 -0
- package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/call-omo-agent/sync-executor.d.ts +11 -3
- package/dist/tools/call-omo-agent/tools.d.ts +2 -1
- package/dist/tools/delegate-task/cancel-unstable-agent-task.d.ts +2 -0
- package/dist/tools/delegate-task/model-selection.d.ts +1 -0
- package/dist/tools/delegate-task/model-string-parser.d.ts +1 -3
- package/dist/tools/look-at/multimodal-fallback-chain.d.ts +4 -0
- package/dist/tools/lsp/constants.d.ts +1 -0
- package/dist/tools/lsp/directory-diagnostics.d.ts +1 -0
- package/dist/tools/lsp/lsp-client-transport.d.ts +4 -2
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +2 -1
- package/dist/tools/lsp/server-path-bases.d.ts +1 -0
- package/generated/skills-bundles/catalog.json +282 -39
- package/generated/skills-bundles/full/INDEX.md +38 -10
- package/generated/skills-bundles/full/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
- package/generated/skills-bundles/full/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
- package/generated/skills-bundles/full/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
- package/generated/skills-bundles/full/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
- package/generated/skills-bundles/full/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
- package/generated/skills-bundles/full/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
- package/generated/skills-bundles/full/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
- package/generated/skills-bundles/full/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
- package/generated/skills-bundles/paper/INDEX.md +40 -0
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
- package/generated/skills-bundles/paper/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
- package/generated/skills-bundles/paper/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
- package/generated/skills-bundles/paper/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
- package/generated/skills-bundles/paper/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
- package/generated/skills-bundles/paper/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
- package/generated/skills-bundles/paper/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
- package/package.json +21 -21
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/LICENSE.txt +0 -21
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/SKILL.md +0 -615
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/_meta.json +0 -11
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/scripts/virtualbox-utils.ts +0 -586
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/.clawhubsafe +0 -0
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/LICENSE +0 -21
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/README.md +0 -127
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SECURITY.md +0 -68
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SKILL.md +0 -141
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/_meta.json +0 -11
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/speak.sh +0 -52
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/transcribe.sh +0 -50
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/LICENSE.txt +0 -21
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/SKILL.md +0 -416
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/_meta.json +0 -11
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "skills-main/youtube-search"
|
|
3
|
-
description: "YouTube Search API via AIsa unified endpoint. Search YouTube videos, channels, and playlists with a single AIsa API key — no Google API key or OAuth required. Use this skill when users want to search YouTube content. For other AIsa capabilities (LLM, financial data, Twitter, web search), see the aisa-core skill.\n"
|
|
4
|
-
compatibility: "Requires network access and valid AIsa API key"
|
|
5
|
-
metadata:
|
|
6
|
-
author: "aisa-one"
|
|
7
|
-
version: "1.0.1"
|
|
8
|
-
openclaw: {"emoji":"🎬","requires":{"env":["AISA_API_KEY"]}}
|
|
9
|
-
category: "research/media-search"
|
|
10
|
-
---
|
|
11
|
-
# YouTube Search (via AIsa)
|
|
12
|
-
|
|
13
|
-
Search YouTube videos, channels, and playlists through AIsa's unified API. No Google API key or OAuth setup needed — just your AIsa API key.
|
|
14
|
-
|
|
15
|
-
## Quick Start
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# Search for videos (using requests — recommended)
|
|
19
|
-
python <<'EOF'
|
|
20
|
-
import os, json, requests
|
|
21
|
-
results = requests.get(
|
|
22
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
23
|
-
headers={'Authorization': f'Bearer {os.environ["AISA_API_KEY"]}'},
|
|
24
|
-
params={'engine': 'youtube', 'q': 'coding tutorial'}
|
|
25
|
-
).json()
|
|
26
|
-
print(json.dumps(results, indent=2))
|
|
27
|
-
EOF
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Base URL
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
https://api.aisa.one/apis/v1/youtube/search
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
All YouTube search requests go through this single endpoint. AIsa handles authentication with the underlying YouTube data source — you only need your AIsa API key.
|
|
37
|
-
|
|
38
|
-
## Authentication
|
|
39
|
-
|
|
40
|
-
All requests require the AIsa API key in the Authorization header:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Authorization: Bearer $AISA_API_KEY
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Environment Variable:** Set your API key as `AISA_API_KEY`:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
export AISA_API_KEY="YOUR_AISA_API_KEY"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Getting Your API Key
|
|
53
|
-
|
|
54
|
-
1. Sign in or create an account at [AIsa Marketplace](https://marketplace.aisa.one)
|
|
55
|
-
2. Navigate to your Dashboard
|
|
56
|
-
3. Copy your API key
|
|
57
|
-
|
|
58
|
-
## API Reference
|
|
59
|
-
|
|
60
|
-
### YouTube Search
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
GET /apis/v1/youtube/search
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### Query Parameters
|
|
67
|
-
|
|
68
|
-
| Parameter | Type | Required | Description |
|
|
69
|
-
|-----------|------|----------|-------------|
|
|
70
|
-
| `engine` | string | Yes | Must be `youtube` |
|
|
71
|
-
| `q` | string | Yes | Search query (same syntax as YouTube search box) |
|
|
72
|
-
| `sp` | string | No | YouTube filter token for pagination or advanced filters |
|
|
73
|
-
| `gl` | string | No | Country code for localized results (e.g., `us`, `jp`, `gb`). Not all country codes are supported — see notes below |
|
|
74
|
-
| `hl` | string | No | Interface language (e.g., `en`, `zh`, `ja`) |
|
|
75
|
-
|
|
76
|
-
#### Example: Basic Search
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
curl -s -X GET "https://api.aisa.one/apis/v1/youtube/search?engine=youtube&q=machine+learning+tutorial" \
|
|
80
|
-
-H "Authorization: Bearer $AISA_API_KEY"
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### Example: Search with Country & Language
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
curl -s -X GET "https://api.aisa.one/apis/v1/youtube/search?engine=youtube&q=AI+news&gl=us&hl=en" \
|
|
87
|
-
-H "Authorization: Bearer $AISA_API_KEY"
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
#### Example: Pagination with `sp` Token
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# Use the sp token from a previous response to get the next page
|
|
94
|
-
curl -s -X GET "https://api.aisa.one/apis/v1/youtube/search?engine=youtube&q=python+tutorial&sp=EgIQAQ%3D%3D" \
|
|
95
|
-
-H "Authorization: Bearer $AISA_API_KEY"
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
#### Response
|
|
99
|
-
|
|
100
|
-
The API returns structured YouTube search results including video metadata, channel info, thumbnails, and pagination tokens.
|
|
101
|
-
|
|
102
|
-
**Note:** The response structure may vary by query language. English queries typically return results in the `videos` array. Some non-English queries may return results grouped in a `sections` array instead. Always check for both fields.
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"search_metadata": {
|
|
107
|
-
"status": "Success",
|
|
108
|
-
"total_time_taken": 1.2
|
|
109
|
-
},
|
|
110
|
-
"search_parameters": {
|
|
111
|
-
"engine": "youtube",
|
|
112
|
-
"q": "machine learning tutorial"
|
|
113
|
-
},
|
|
114
|
-
"next_page_token": "CBQQABoCEgA%3D",
|
|
115
|
-
"videos": [
|
|
116
|
-
{
|
|
117
|
-
"position_on_page": 1,
|
|
118
|
-
"title": "Machine Learning Full Course for Beginners",
|
|
119
|
-
"link": "https://www.youtube.com/watch?v=abc123xyz",
|
|
120
|
-
"channel": {
|
|
121
|
-
"name": "Tech Academy",
|
|
122
|
-
"link": "https://www.youtube.com/channel/UCxyz123",
|
|
123
|
-
"thumbnail": "https://yt3.ggpht.com/..."
|
|
124
|
-
},
|
|
125
|
-
"published_date": "2 months ago",
|
|
126
|
-
"views": 1500000,
|
|
127
|
-
"length": "3:45:20",
|
|
128
|
-
"description": "Complete machine learning tutorial...",
|
|
129
|
-
"thumbnail": {
|
|
130
|
-
"static": "https://i.ytimg.com/vi/abc123xyz/hq720.jpg",
|
|
131
|
-
"rich": "https://i.ytimg.com/an_webp/abc123xyz/mqdefault_6s.webp"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**Alternate response structure (non-English / some queries):**
|
|
139
|
-
|
|
140
|
-
Some queries return results grouped in `sections` instead of a flat `videos` array:
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"sections": [
|
|
145
|
-
{
|
|
146
|
-
"title": "搜索结果",
|
|
147
|
-
"videos": [
|
|
148
|
-
{
|
|
149
|
-
"title": "编程教程...",
|
|
150
|
-
"link": "https://www.youtube.com/watch?v=...",
|
|
151
|
-
...
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Parsing both formats:**
|
|
160
|
-
|
|
161
|
-
```python
|
|
162
|
-
# Handle both response structures
|
|
163
|
-
videos = results.get('videos', [])
|
|
164
|
-
if not videos and 'sections' in results:
|
|
165
|
-
for section in results['sections']:
|
|
166
|
-
videos.extend(section.get('videos', []))
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Advanced Search Tips
|
|
170
|
-
|
|
171
|
-
YouTube's `q` parameter supports the same search syntax as the YouTube search box:
|
|
172
|
-
|
|
173
|
-
| Search Syntax | Description | Example |
|
|
174
|
-
|---------------|-------------|---------|
|
|
175
|
-
| Basic keywords | Standard search | `q=python tutorial` |
|
|
176
|
-
| Exact phrase | Quote for exact match | `q="machine learning basics"` |
|
|
177
|
-
| Channel filter | Search within a channel | `q=channel:GoogleDevelopers python` |
|
|
178
|
-
| Duration hint | Combine with keywords | `q=python tutorial long` |
|
|
179
|
-
|
|
180
|
-
### Using the `sp` Filter Token
|
|
181
|
-
|
|
182
|
-
The `sp` parameter accepts YouTube's encoded filter tokens. Common values:
|
|
183
|
-
|
|
184
|
-
| Filter | `sp` Value | Description |
|
|
185
|
-
|--------|-----------|-------------|
|
|
186
|
-
| Videos only | `EgIQAQ%3D%3D` | Filter to video results only |
|
|
187
|
-
| Channels only | `EgIQAg%3D%3D` | Filter to channel results only |
|
|
188
|
-
| Playlists only | `EgIQAw%3D%3D` | Filter to playlist results only |
|
|
189
|
-
| Live now | `EgJAAQ%3D%3D` | Currently live streams |
|
|
190
|
-
| This week | `EgIIAw%3D%3D` | Uploaded this week |
|
|
191
|
-
| This month | `EgIIBA%3D%3D` | Uploaded this month |
|
|
192
|
-
| Short (<4 min) | `EgIYAQ%3D%3D` | Short duration videos |
|
|
193
|
-
| Long (>20 min) | `EgIYAg%3D%3D` | Long duration videos |
|
|
194
|
-
|
|
195
|
-
You can also obtain `sp` tokens from the `next_page_token` field in previous API responses for pagination.
|
|
196
|
-
|
|
197
|
-
#### Pagination
|
|
198
|
-
|
|
199
|
-
Use the `next_page_token` from a response to fetch the next page of results:
|
|
200
|
-
|
|
201
|
-
```python
|
|
202
|
-
# First page
|
|
203
|
-
results = requests.get(
|
|
204
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
205
|
-
headers=headers,
|
|
206
|
-
params={'engine': 'youtube', 'q': 'python tutorial'}
|
|
207
|
-
).json()
|
|
208
|
-
|
|
209
|
-
# Get next page token
|
|
210
|
-
next_token = results.get('next_page_token')
|
|
211
|
-
if next_token:
|
|
212
|
-
page2 = requests.get(
|
|
213
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
214
|
-
headers=headers,
|
|
215
|
-
params={'engine': 'youtube', 'q': 'python tutorial', 'sp': next_token}
|
|
216
|
-
).json()
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## Code Examples
|
|
220
|
-
|
|
221
|
-
### JavaScript
|
|
222
|
-
|
|
223
|
-
```javascript
|
|
224
|
-
const headers = {
|
|
225
|
-
'Authorization': `Bearer ${process.env.AISA_API_KEY}`
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
// Basic YouTube search
|
|
229
|
-
const results = await fetch(
|
|
230
|
-
'https://api.aisa.one/apis/v1/youtube/search?engine=youtube&q=AI+agents+tutorial',
|
|
231
|
-
{ headers }
|
|
232
|
-
).then(r => r.json());
|
|
233
|
-
|
|
234
|
-
console.log(results.videos);
|
|
235
|
-
|
|
236
|
-
// Search with filters
|
|
237
|
-
const filtered = await fetch(
|
|
238
|
-
'https://api.aisa.one/apis/v1/youtube/search?engine=youtube&q=deep+learning&gl=us&hl=en&sp=EgIQAQ%3D%3D',
|
|
239
|
-
{ headers }
|
|
240
|
-
).then(r => r.json());
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Python
|
|
244
|
-
|
|
245
|
-
```python
|
|
246
|
-
import os
|
|
247
|
-
import requests
|
|
248
|
-
|
|
249
|
-
headers = {'Authorization': f'Bearer {os.environ["AISA_API_KEY"]}'}
|
|
250
|
-
|
|
251
|
-
# Basic YouTube search
|
|
252
|
-
results = requests.get(
|
|
253
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
254
|
-
headers=headers,
|
|
255
|
-
params={'engine': 'youtube', 'q': 'AI agents tutorial'}
|
|
256
|
-
).json()
|
|
257
|
-
|
|
258
|
-
for video in results.get('videos', []):
|
|
259
|
-
print(f"{video['title']} - {video.get('views', 'N/A')} views")
|
|
260
|
-
|
|
261
|
-
# Search with country and language
|
|
262
|
-
results_jp = requests.get(
|
|
263
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
264
|
-
headers=headers,
|
|
265
|
-
params={'engine': 'youtube', 'q': 'プログラミング', 'gl': 'jp', 'hl': 'ja'}
|
|
266
|
-
).json()
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### Python (urllib, no dependencies)
|
|
270
|
-
|
|
271
|
-
> **Note:** `urllib` may encounter 403 errors due to its default User-Agent. Using `requests` (above) is recommended. If you must use `urllib`, always set a custom User-Agent header.
|
|
272
|
-
|
|
273
|
-
```python
|
|
274
|
-
import urllib.request, urllib.parse, os, json
|
|
275
|
-
|
|
276
|
-
def youtube_search(query, gl=None, hl=None, sp=None):
|
|
277
|
-
"""Search YouTube via AIsa API."""
|
|
278
|
-
params = {'engine': 'youtube', 'q': query}
|
|
279
|
-
if gl: params['gl'] = gl
|
|
280
|
-
if hl: params['hl'] = hl
|
|
281
|
-
if sp: params['sp'] = sp
|
|
282
|
-
|
|
283
|
-
url = f'https://api.aisa.one/apis/v1/youtube/search?{urllib.parse.urlencode(params)}'
|
|
284
|
-
req = urllib.request.Request(url)
|
|
285
|
-
req.add_header('Authorization', f'Bearer {os.environ["AISA_API_KEY"]}')
|
|
286
|
-
req.add_header('User-Agent', 'AIsa-Skill/1.0')
|
|
287
|
-
return json.load(urllib.request.urlopen(req))
|
|
288
|
-
|
|
289
|
-
# Search
|
|
290
|
-
results = youtube_search('OpenClaw tutorial', gl='us', hl='en')
|
|
291
|
-
|
|
292
|
-
# Handle both response formats
|
|
293
|
-
videos = results.get('videos', [])
|
|
294
|
-
if not videos and 'sections' in results:
|
|
295
|
-
for section in results['sections']:
|
|
296
|
-
videos.extend(section.get('videos', []))
|
|
297
|
-
|
|
298
|
-
print(json.dumps(videos[:3], indent=2))
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
## Combining with Other AIsa APIs
|
|
302
|
-
|
|
303
|
-
One of the key advantages of AIsa is the **unified API key**. Use the same `AISA_API_KEY` to combine YouTube search with other AIsa capabilities:
|
|
304
|
-
|
|
305
|
-
### YouTube Search + LLM Summary
|
|
306
|
-
|
|
307
|
-
```python
|
|
308
|
-
import os, requests, json
|
|
309
|
-
|
|
310
|
-
headers = {'Authorization': f'Bearer {os.environ["AISA_API_KEY"]}'}
|
|
311
|
-
|
|
312
|
-
# 1. Search YouTube
|
|
313
|
-
yt_results = requests.get(
|
|
314
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
315
|
-
headers=headers,
|
|
316
|
-
params={'engine': 'youtube', 'q': 'latest AI developments 2026'}
|
|
317
|
-
).json()
|
|
318
|
-
|
|
319
|
-
# 2. Summarize with LLM (same API key!)
|
|
320
|
-
video_titles = [v['title'] for v in yt_results.get('videos', [])[:5]]
|
|
321
|
-
summary = requests.post(
|
|
322
|
-
'https://api.aisa.one/v1/chat/completions',
|
|
323
|
-
headers={**headers, 'Content-Type': 'application/json'},
|
|
324
|
-
json={
|
|
325
|
-
'model': 'qwen3-flash',
|
|
326
|
-
'messages': [
|
|
327
|
-
{'role': 'user', 'content': f'Summarize the trending AI topics based on these YouTube videos: {json.dumps(video_titles)}'}
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
).json()
|
|
331
|
-
|
|
332
|
-
print(summary['choices'][0]['message']['content'])
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### YouTube Search + Web Search
|
|
336
|
-
|
|
337
|
-
```python
|
|
338
|
-
# Search both YouTube and the web for comprehensive research
|
|
339
|
-
yt_results = requests.get(
|
|
340
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
341
|
-
headers=headers,
|
|
342
|
-
params={'engine': 'youtube', 'q': 'AI agent frameworks 2026'}
|
|
343
|
-
).json()
|
|
344
|
-
|
|
345
|
-
web_results = requests.get(
|
|
346
|
-
'https://api.aisa.one/apis/v1/search/smart',
|
|
347
|
-
headers=headers,
|
|
348
|
-
params={'q': 'AI agent frameworks 2026'}
|
|
349
|
-
).json()
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## Notes
|
|
353
|
-
|
|
354
|
-
- All requests are **pay-per-use** through your AIsa balance — no separate YouTube API quota management
|
|
355
|
-
- The `engine` parameter must always be set to `youtube`
|
|
356
|
-
- Video URLs follow the format `https://www.youtube.com/watch?v={videoId}`
|
|
357
|
-
- Channel URLs follow the format `https://www.youtube.com/channel/{channelId}`
|
|
358
|
-
- Use `next_page_token` from previous responses as the `sp` value for pagination
|
|
359
|
-
- The `gl` (country) parameter does **not** support all ISO country codes. Known unsupported values include `cn` (China). If you get `Unsupported value` errors, try omitting `gl` or use a different country code
|
|
360
|
-
- Non-English queries may return results in a `sections` array instead of a flat `videos` array — always handle both formats
|
|
361
|
-
- IMPORTANT: Python `urllib` may return 403 errors due to its default User-Agent. Use the `requests` library instead, or add a custom `User-Agent` header
|
|
362
|
-
- IMPORTANT: When using curl commands, ensure environment variables like `$AISA_API_KEY` are properly expanded
|
|
363
|
-
- IMPORTANT: When piping curl output to `jq`, use `-s` flag and ensure the API key is set
|
|
364
|
-
|
|
365
|
-
## Error Handling
|
|
366
|
-
|
|
367
|
-
| Status | Meaning |
|
|
368
|
-
|--------|---------|
|
|
369
|
-
| 200 | Successful search response |
|
|
370
|
-
| 400 | Invalid request parameters (missing `engine` or `q`) |
|
|
371
|
-
| 401 | Unauthorized — invalid or missing AIsa API key |
|
|
372
|
-
| 429 | Rate limited |
|
|
373
|
-
| 500 | Internal server error |
|
|
374
|
-
|
|
375
|
-
### Troubleshooting: API Key Issues
|
|
376
|
-
|
|
377
|
-
1. Check that the `AISA_API_KEY` environment variable is set:
|
|
378
|
-
|
|
379
|
-
```bash
|
|
380
|
-
echo $AISA_API_KEY
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
2. Verify the API key works with a simple test:
|
|
384
|
-
|
|
385
|
-
```bash
|
|
386
|
-
python <<'EOF'
|
|
387
|
-
import os, json, requests
|
|
388
|
-
try:
|
|
389
|
-
result = requests.get(
|
|
390
|
-
'https://api.aisa.one/apis/v1/youtube/search',
|
|
391
|
-
headers={'Authorization': f'Bearer {os.environ["AISA_API_KEY"]}'},
|
|
392
|
-
params={'engine': 'youtube', 'q': 'test'}
|
|
393
|
-
).json()
|
|
394
|
-
videos = result.get('videos', [])
|
|
395
|
-
print(f"✅ API key is valid. Results: {len(videos)} videos found")
|
|
396
|
-
except Exception as e:
|
|
397
|
-
print(f"❌ Error: {e}")
|
|
398
|
-
EOF
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Troubleshooting: No Results
|
|
402
|
-
|
|
403
|
-
1. Verify your query is not empty
|
|
404
|
-
2. Try a broader search term
|
|
405
|
-
3. If using `gl`, verify the country code is supported — not all ISO codes work (e.g., `cn` is unsupported). Try omitting `gl` to test
|
|
406
|
-
4. Ensure `engine=youtube` is included in every request
|
|
407
|
-
5. Check if results are in `sections` instead of `videos` (common for non-English queries)
|
|
408
|
-
|
|
409
|
-
## Resources
|
|
410
|
-
|
|
411
|
-
- [AIsa API Documentation](https://docs.aisa.one)
|
|
412
|
-
- [AIsa Dashboard / Marketplace](https://marketplace.aisa.one)
|
|
413
|
-
- [YouTube Search API Reference](https://docs.aisa.one/reference/get_youtube-search)
|
|
414
|
-
- [AIsa Smart Search API](https://docs.aisa.one/reference/get_search-smart)
|
|
415
|
-
- [AIsa Chat Completions API](https://docs.aisa.one/reference/createchatcompletion)
|
|
416
|
-
- [OpenClaw Skills](https://clawhub.ai)
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"owner": "0xjordansg-yolo",
|
|
3
|
-
"slug": "openclaw-aisa-youtube",
|
|
4
|
-
"displayName": "Search YouTube videos, channels, and playlists",
|
|
5
|
-
"latest": {
|
|
6
|
-
"version": "1.0.0",
|
|
7
|
-
"publishedAt": 1771258169983,
|
|
8
|
-
"commit": "https://github.com/openclaw/skills/commit/2e5b4e013beac468c141a603216d236c855a9406"
|
|
9
|
-
},
|
|
10
|
-
"history": []
|
|
11
|
-
}
|