协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
byted-util-volcengine-cloud-detect【开发与工程】Volcengine Cloud Detect (云拨测) API integration for creating detection tasks, retrieving results, generating reports, and managing detection nodes. Use when the user wants to (1) create network detection/dialing tasks (拨测任务), (2) check task results or generate detection reports, (3) list or search detection nodes (拨测节点), (4) manage existing tasks (list…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Interact with Volcengine Cloud Detect API (云拨测) through natural language. All API calls are handled via scripts/volc_detect.py. For detailed API parameters, read references/api_docs.md.
Volcengine credentials are required:
VOLC_ACCESSKEY: Access KeyVOLC_SECRETKEY: Secret KeyBefore executing any command, check whether both credentials exist in environment variables:
test -n "$VOLC_ACCESSKEY" && test -n "$VOLC_SECRETKEY"
If either value is missing, ask the user to provide the missing AK/SK, then write them to the current shell environment and persist them to the user's shell profile:
export VOLC_ACCESSKEY="USER_PROVIDED_ACCESS_KEY"
export VOLC_SECRETKEY="USER_PROVIDED_SECRET_KEY"
SHELL_PROFILE="${ZDOTDIR:-$HOME}/.zshrc"
grep -q '^export VOLC_ACCESSKEY=' "$SHELL_PROFILE" 2>/dev/null \
&& sed -i '' 's|^export VOLC_ACCESSKEY=.*|export VOLC_ACCESSKEY="USER_PROVIDED_ACCESS_KEY"|' "$SHELL_PROFILE" \
|| printf '\nexport VOLC_ACCESSKEY="USER_PROVIDED_ACCESS_KEY"\n' >> "$SHELL_PROFILE"
grep -q '^export VOLC_SECRETKEY=' "$SHELL_PROFILE" 2>/dev/null \
&& sed -i '' 's|^export VOLC_SECRETKEY=.*|export VOLC_SECRETKEY="USER_PROVIDED_SECRET_KEY"|' "$SHELL_PROFILE" \
|| printf 'export VOLC_SECRETKEY="USER_PROVIDED_SECRET_KEY"\n' >> "$SHELL_PROFILE"
Never run scripts/volc_detect.py until both VOLC_ACCESSKEY and VOLC_SECRETKEY are available.
When user creates a task without specifying all parameters, use these defaults:
| Parameter | Default Value | Notes |
|---|---|---|
| ProjectName | default | Always use unless user specifies |
| Type | 1 (HTTP(S)) | Task type |
| Name | {current_time}_claw_detect | Format: YYYYMMDD_HHMMSS_claw_detect |
| Address | (required) | Must ask user if not provided |
| NodeCount | 5 | Samples per line |
| IntervalSeconds | 60 | Detection frequency |
| FinishTime | current_time + 90 seconds | 1.5 minutes after creation |
| LineIdList | (required) | Must obtain from ListNodes |
Task Type Mapping: 1=HTTP(S), 2=DNS, 3=PING, 5=UDP, 6=TCP, 8=Upload, 9=Download, 11=PageElement
Interval Options (seconds): 60, 120, 180, 300, 600, 900, 1200, 1800, 3600, 7200, 10800, 21600, 43200, 86400
Address (target URL). If not provided, prompt for it.list-nodes, then fuzzy-search based on user requirements.create-task with all parameters including confirmed LineIdList.When user says "create a detection task for baidu.com", respond by:
list-nodes to show available optionsfuzzy-search-nodes to filter based on user's descriptionExample user requirements to node filters:
--is-mainland true + search "电信"--is-mainland true, select diverse nodesget-result with TaskId and time range (must be <= 1 hour).generate-report to produce summary statistics.Present reports using this structure:
## Detection Report for {TaskName} (ID: {TaskId})
**Time Range**: {start} ~ {end}
**Total Samples**: {N}
**Success Rate**: {X}%
### Latency Statistics (ms)
| Metric | Value |
|--------|-------|
| Avg | {avg} |
| Min | {min} |
| Max | {max} |
| P90 | {p90} |
### Status Code Distribution
| Code | Count |
|------|-------|
| ... | ... |
### Issues
- {N} failures from {region-isp} nodes
- Top error: {error_code} ({count} occurrences)
list-tasks with optional filters (--name, --address)stop-task --task-id IDrestart-task --task-id IDdelete-task --task-id ID (confirm with user first)get-task --task-id IDlist-nodes [--is-mainland true|false]list-nodes --line-types 1,2 (1=LastMile, 2=IDC)fuzzy-search-nodes "search query"All commands use python scripts/volc_detect.py:
# Create task
python scripts/volc_detect.py create-task \
--address "https://example.com" \
--name "task_name" \
--type 1 \
--node-count 5 \
--interval-seconds 60 \
--finish-time TIMESTAMP \
--line-ids 228,229,230 \
--http-method 1
# Get results
python scripts/volc_detect.py get-result \
--task-id 12345 \
--start-time 1672531200 \
--end-time 1672534800 \
--page-size 500
# List nodes
python scripts/volc_detect.py list-nodes --is-mainland true
# Fuzzy search nodes
python scripts/volc_detect.py fuzzy-search-nodes "北京 电信 IDC"
# Generate report
python scripts/volc_detect.py generate-report \
--task-id 12345 \
--start-time 1672531200 \
--end-time 1672534800
# Task management
python scripts/volc_detect.py list-tasks --page-size 20
python scripts/volc_detect.py stop-task --task-id 12345
python scripts/volc_detect.py restart-task --task-id 12345
python scripts/volc_detect.py delete-task --task-id 12345
python scripts/volc_detect.py get-task --task-id 12345
国家-省份-城市-运营商(类型), e.g., 中国-北京-北京市-中国电信(IDC)create-task, get-result, get-task, list-tasks, stop-task, restart-task, delete-task, generate-report, list-nodes) accept an optional --project-name. create-task defaults to default; the others default to the account's default project when omitted.