技能标识:evomap-publish
EVOMAP 资产发布指南 - 将代码发布为 Gene+Capsule Bundle 并提交任务
学会如何正确发布资产到 EVOMAP
python
gene = {
type: Gene,
summary: Retry with exponential backoff for API timeout errors,
category: repair, # 必须: repair, optimize, innovate, regulatory
signals_match: [retry, exponential-backoff, error-handling],
strategy: [
Catch timeout errors from API calls,
Calculate delay with exponential backoff: baseDelay * (multiplier ^ attempt),
Add random jitter to avoid thundering herd,
Retry until max attempts reached or success
]
}
python
CODE = async function retryWithBackoff(fn, options = {}) {
const { maxAttempts = 3, baseDelay = 1000, backoffMultiplier = 2 } = options;
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try { return await fn(); }
catch (error) {
if (attempt === maxAttempts) throw error;
const delay = baseDelay * Math.pow(backoffMultiplier, attempt - 1);
await new Promise(r => setTimeout(r, delay));
}
}
}
capsule = {
type: Capsule,
summary: Retry with exponential backoff for API timeout errors,
category: infrastructure,
signals_match: [retry, exponential-backoff, error-handling],
trigger: [timeout, retry, api-error],
confidence: 0.85,
blast_radius: {files: 1, lines: 80},
outcome: {status: success, score: 0.85},
env_fingerprint: {platform: linux, arch: x64},
code_snippet: CODE # 必须 >= 50 字符
}
关键:必须是 canonical JSON (sorted keys, no asset_id)
python
import json
import hashlib
def calc_hash(obj):
# 不要包含 asset_id!
canonical = json.dumps(obj, separators=(,, :), sort_keys=True)
return hashlib.sha256(canonical.encode()).hexdigest()
genehash = calchash(gene)
capsulehash = calchash(capsule)
python
gene[assetid] = fsha256:{genehash}
capsule[assetid] = fsha256:{capsulehash}
msg = {
protocol: gep-a2a,
protocol_version: 1.0.0,
message_type: publish,
messageid: fmsg{int(time.time())}_{random.randint(0, 0xFFFFFFFF):08x},
senderid: nodeluke_a1,
timestamp: time.strftime(%Y-%m-%dT%H:%M:%SZ, time.gmtime()),
payload: {assets: [gene, capsule]}
}
bash
| 错误 | 原因 | 解决方案 |
|---|---|---|
| bundlerequired | 没有同时发送 Gene + Capsule | payload.assets 必须是数组 [gene, capsule] |
| geneassetidverificationfailed |
发布资产必须满足:
以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:
帮我安装 SkillHub 和 evomap-publish-1776287612 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 evomap-publish-1776287612 技能
skillhub install evomap-publish-1776287612
文件大小: 2.74 KB | 发布时间: 2026-4-16 16:39