@lawrenceliang-btc/atel-sdk 1.1.11 → 1.1.13
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/bin/atel.mjs +17 -1
- package/package.json +1 -1
- package/skill/atel-agent/SKILL.md +2 -0
package/bin/atel.mjs
CHANGED
|
@@ -319,8 +319,9 @@ async function pushTradeNotification(eventType, payload, body) {
|
|
|
319
319
|
},
|
|
320
320
|
'milestone_verified': (p) => {
|
|
321
321
|
const desc = p.milestoneDescription ? `\n目标: ${p.milestoneDescription}` : '';
|
|
322
|
+
const content = p.resultSummary ? `\n提交内容: ${String(p.resultSummary).substring(0, 200)}` : '';
|
|
322
323
|
const progress = p.totalMilestones ? `\n进度: ${(p.milestoneIndex ?? 0) + 1}/${p.totalMilestones}` : '';
|
|
323
|
-
return `✅ 里程碑 M${p.milestoneIndex ?? '?'} 审核通过\n订单: ${p.orderId || body?.orderId || '?'}${desc}${progress}`;
|
|
324
|
+
return `✅ 里程碑 M${p.milestoneIndex ?? '?'} 审核通过\n订单: ${p.orderId || body?.orderId || '?'}${desc}${content}${progress}`;
|
|
324
325
|
},
|
|
325
326
|
'milestone_rejected': (p) => {
|
|
326
327
|
const desc = p.milestoneDescription ? `\n目标: ${p.milestoneDescription}` : '';
|
|
@@ -5631,6 +5632,21 @@ async function cmdWithdraw(amount, address, chain) {
|
|
|
5631
5632
|
}
|
|
5632
5633
|
// Smart wallet withdrawal (new flow)
|
|
5633
5634
|
chain = chain || 'base';
|
|
5635
|
+
|
|
5636
|
+
// Validate destination address
|
|
5637
|
+
const channel = 'crypto_' + chain;
|
|
5638
|
+
if (channel === 'crypto_base' || channel === 'crypto_bsc') {
|
|
5639
|
+
if (!address.match(/^0x[0-9a-fA-F]{40}$/)) {
|
|
5640
|
+
console.error('Invalid EVM address. Must be 0x followed by 40 hex characters.');
|
|
5641
|
+
process.exit(1);
|
|
5642
|
+
}
|
|
5643
|
+
} else if (channel === 'crypto_solana') {
|
|
5644
|
+
if (!address.match(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)) {
|
|
5645
|
+
console.error('Invalid Solana address.');
|
|
5646
|
+
process.exit(1);
|
|
5647
|
+
}
|
|
5648
|
+
}
|
|
5649
|
+
|
|
5634
5650
|
try {
|
|
5635
5651
|
const data = await signedFetch('POST', '/trade/v1/wallet/withdraw', {
|
|
5636
5652
|
amount: parseFloat(amount),
|
package/package.json
CHANGED
|
@@ -162,6 +162,8 @@ cd ~/atel-workspace
|
|
|
162
162
|
atel order <executor-DID> general <金额> --desc "任务描述"
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
+
⚠️ **`--desc` 是必填的,必须把用户的完整任务需求传进去。** 执行方只能通过 `--desc` 了解任务内容。如果不传或传空,执行方不知道要做什么,订单会失败。把用户说的任务要求(主题、字数、格式、具体要求等)全部写进 `--desc`。
|
|
166
|
+
|
|
165
167
|
发单前确保钱包有 USDC(`atel balance` 查看)。
|
|
166
168
|
|
|
167
169
|
⚠️ 双链说明:
|