Highlight Manifest 示例(Electron v0.1)
版本:0.1
状态:示例
说明:本示例展示 Highlight 这类本地 API 服务如何以zip + manifest.yaml交付给 FlowyAIPC Electron v0.1 安装器。配置模板位于 Skill 的assets/目录,安装后 Skill 可通过相对路径assets/config.json直接读取;服务启动由 Agent 根据 Skill 文档自行执行。
目录结构
text
highlight/
manifest.yaml
payload/
AGENTS.md
SOUL.md
TOOLS.md
IDENTITY.md
USER.md
MEMORY.md
HEARTBEAT.md
service.exe
llama-server/
llama-server.exe
models/
model-Q4_K_M.gguf
mmproj-F16.gguf
skills/
highlight/
SKILL.md
assets/
config.example.json
references/
workflow-start-recording.md
workflow-fetch-highlights.md
docs/
openapi.yaml
integration.md
error-codes.md
privacy.mdmanifest.yaml
yaml
spec_version: 0.1
package_name: highlight
package_version: 1.0.0
type: api-skill
agent:
id: highlight-agent
name: "足球精彩时刻检测"
summary: "本地足球精彩时刻检测服务"
display_name:
zh: "精彩时刻检测"
en: "Highlight Detection"
jp: "ハイライト検出"
description:
zh: "本地足球精彩时刻检测服务,实时录制屏幕并 AI 检测进球"
en: "Local soccer highlight detection service with real-time AI goal detection"
jp: "ローカルサッカーハイライト検出サービス"
runtime:
mode: managed
entrypoint: payload/service.exe
working_dir: payload
config_template: payload/skills/highlight/assets/config.example.json
generated_config: payload/skills/highlight/assets/config.json
health_check:
method: GET
path: /health
ready_check:
method: GET
path: /health
ready_field: status
ready_value: ready
stop:
kind: api
method: DELETE
path: /api/v1/sessions/{session_id}
artifacts:
- id: highlight-service
kind: binary
name: service.exe
required: true
source:
kind: embedded
path: payload/service.exe
target: "{install_dir}/payload/service.exe"
- id: ffmpeg-win32
kind: archive
name: ffmpeg
required: true
version: "6.1"
source:
kind: download
url: https://example.com/ffmpeg-release-full.zip
archive: zip
extract: true
strip_components: 0
checksum:
algorithm: sha256
value: "<sha256>"
target: "{package_shared_dir}/bin/ffmpeg"
bins:
- ffmpeg.exe
- id: llama-server
kind: binary
name: llama-server.exe
required: true
source:
kind: embedded
path: payload/llama-server/llama-server.exe
target: "{install_dir}/payload/llama-server/llama-server.exe"
- id: model-q4
kind: file
name: model-Q4_K_M.gguf
required: true
source:
kind: embedded
path: payload/models/model-Q4_K_M.gguf
target: "{package_shared_dir}/models/model-Q4_K_M.gguf"
- id: mmproj
kind: file
name: mmproj-F16.gguf
required: true
source:
kind: embedded
path: payload/models/mmproj-F16.gguf
target: "{package_shared_dir}/models/mmproj-F16.gguf"
config:
template: payload/skills/highlight/assets/config.example.json
output: payload/skills/highlight/assets/config.json
placeholders:
http_host: "127.0.0.1"
http_port: 8088
auth_token: "{generated_secret}"
service_path: "{artifact:highlight-service:path}"
ffmpeg_path: "{artifact:ffmpeg-win32:bin:ffmpeg.exe}"
llama_server_path: "{artifact:llama-server:path}"
llama_model: "{artifact:model-q4:path}"
llama_mmproj: "{artifact:mmproj:path}"
output_dir: "{package_shared_dir}/output"
log_dir: "{package_shared_dir}/logs"
resources:
scheduling_class: gpu-exclusive
gpu:
required: true
vendor: intel
min_vram_gb: 8
memory:
min_gb: 16
disk:
min_free_gb: 20
growth_hint: "3.6 GB/hour"
ports:
- port: 8088
protocol: tcp
required: true
purpose: api
- port: 18080
protocol: tcp
required: true
purpose: internal_llama_server
permissions:
screen_capture: required
audio_capture: required
file_read:
- user_selected_source
file_write:
- "{package_shared_dir}/output"
- "{package_shared_dir}/logs"
network:
local_only: true
process_spawn: required
gpu_compute: required
model_download: none
privacy:
local_processing: true
reads:
- screen_content
- system_audio
stores:
- video_clips
- session_metadata
llm_allowed_fields:
- event_count
- event_timestamp
- short_summary
llm_blocked_fields:
- raw_frame
- screenshot
- full_video
- absolute_file_path
- auth_token
model:
mode: local
provider: llama.cpp
default_model: model-q4
timeout_seconds: 60
skills:
- path: payload/skills/highlight/SKILL.md
compatibility:
min_flowyaipc_version: 0.8.0
protocol_version: api-v1
platform:
os: [win32]
arch: [x64]
install:
mode: managed
steps:
- id: resolve-artifacts
kind: resolve-artifacts
artifacts:
- highlight-service
- ffmpeg-win32
- llama-server
- model-q4
- mmproj
- id: render-config
kind: render-config
template: payload/skills/highlight/assets/config.example.json
output: payload/skills/highlight/assets/config.json
- id: scan-skills
kind: scan-skills
path: payload/skills
uninstall:
preserve_user_data: true
remove_paths: []
keep_paths:
- sharedpayload/skills/highlight/assets/config.example.json
config.placeholders 中的值会替换 JSON 字符串值。数组和对象应直接写在 JSON 模板中,不要作为 placeholder 值声明。
json
{
"http": {
"host": "{http_host}",
"port": "{http_port}",
"allowed_origins": [
"http://127.0.0.1:8088",
"http://localhost:8088"
]
},
"auth": {
"token": "{auth_token}"
},
"paths": {
"service": "{service_path}",
"ffmpeg": "{ffmpeg_path}",
"llama_server": "{llama_server_path}",
"llama_model": "{llama_model}",
"llama_mmproj": "{llama_mmproj}",
"output_dir": "{output_dir}",
"log_dir": "{log_dir}"
}
}payload/skills/highlight/SKILL.md
Skill 通过 skills.load.extraDirs 引用包内 skills 目录被发现。安装器不写入 marker 文件。
markdown
---
name: highlight
description: "通过 Highlight 服务管理录屏、检测和视频片段生成。"
metadata:
openclaw:
os: [win32]
requires:
bins:
- ffmpeg.exe
config:
- configPath
---
# Highlight
使用 manifest 中 `agent` 字段的配置和 `assets/config.json` 中的生成配置调用 Highlight 服务或启动相关流程。Skill 目录通过 `skills.load.extraDirs` 被 OpenClaw 加载。说明
- 顶层 package zip 的 sha256 来自后端分发元数据,不写在包内 manifest 中。
ffmpeg-win32使用archive,平台负责下载、校验、解压和定位ffmpeg.exe。model-q4和mmproj使用file,示例中表示模型随包提供。- 如果模型希望单独下载,可把
source.kind改成download并提供 HTTPSurl与 sha256checksum。 - Skill 注册由顶层
skills字段驱动,不通过 directory artifact 的post_install驱动。 - artifact 落地路径通过
{artifact:<id>:path}/{artifact:<id>:bin:<name>}在config.placeholders中引用。 - Electron v0.1 安装器不会执行
launch、health-check、ready-checkinstall step。 - Electron v0.1 安装器会写
openclaw.json(agents.list+skills.load.extraDirs)。