@lawrenceliang-btc/atel-sdk 1.1.15 → 1.1.16
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 +6 -1
- package/package.json +1 -1
package/bin/atel.mjs
CHANGED
|
@@ -3086,7 +3086,8 @@ ${callbackFailed}
|
|
|
3086
3086
|
function sanitizeHookSessionId(value) {
|
|
3087
3087
|
const raw = String(value || '').trim();
|
|
3088
3088
|
if (!raw) return `atel-hook-${Date.now()}`;
|
|
3089
|
-
|
|
3089
|
+
// Replace colons with dashes — openclaw rejects colons in session IDs
|
|
3090
|
+
const cleaned = raw.replace(/:/g, '-').replace(/[^a-zA-Z0-9._-]+/g, '-').replace(/^-+|-+$/g, '');
|
|
3090
3091
|
return (cleaned || `atel-hook-${Date.now()}`).slice(0, 120);
|
|
3091
3092
|
}
|
|
3092
3093
|
|
|
@@ -5768,6 +5769,10 @@ async function cmdTradeTask(capability, description) {
|
|
|
5768
5769
|
|
|
5769
5770
|
async function cmdOrder(executorDid, capType, price) {
|
|
5770
5771
|
if (!executorDid || !capType || !price) { console.error('Usage: atel order <executorDid> <capabilityType> <price> [--desc "task description"]'); process.exit(1); }
|
|
5772
|
+
// Resolve @alias to full DID
|
|
5773
|
+
if (executorDid.startsWith('@')) {
|
|
5774
|
+
try { executorDid = resolveDID(executorDid); } catch (e) { console.error(e.message); process.exit(1); }
|
|
5775
|
+
}
|
|
5771
5776
|
const description = rawArgs.find((a, i) => rawArgs[i-1] === '--desc') || '';
|
|
5772
5777
|
const id = requireIdentity();
|
|
5773
5778
|
|