@aiyiran/myclaw 1.1.59 → 1.1.61
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.
|
@@ -2340,7 +2340,7 @@
|
|
|
2340
2340
|
if (deploy.agent && deploy.session) {
|
|
2341
2341
|
var sessionParam = 'agent:' + deploy.agent + ':' + deploy.session;
|
|
2342
2342
|
setTimeout(function () {
|
|
2343
|
-
window.
|
|
2343
|
+
window.location.href = '/chat?session=' + encodeURIComponent(sessionParam);
|
|
2344
2344
|
}, 10000);
|
|
2345
2345
|
}
|
|
2346
2346
|
} else if (res.code === 'not_ready') {
|
package/index.js
CHANGED
|
@@ -1395,6 +1395,17 @@ function runMain() {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
1397
|
writeConfig(config, configPath);
|
|
1398
|
+
console.log('');
|
|
1399
|
+
|
|
1400
|
+
// 发送初始化消息激活 main agent
|
|
1401
|
+
const { execSync } = require('child_process');
|
|
1402
|
+
console.log('[mc main] 发送激活消息...');
|
|
1403
|
+
try {
|
|
1404
|
+
execSync('openclaw agent --agent main --message "你好!"', { stdio: 'inherit' });
|
|
1405
|
+
} catch (err) {
|
|
1406
|
+
console.error('[警告] 发送消息失败: ' + err.message);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1398
1409
|
console.log('');
|
|
1399
1410
|
console.log('[mc main] 完成');
|
|
1400
1411
|
console.log('');
|
package/package.json
CHANGED
|
@@ -143,7 +143,18 @@ def choose_entry_file(target_dir: Path):
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
def build_instance_name(source_dir: Path, remix_dir: Path):
|
|
146
|
-
|
|
146
|
+
import re
|
|
147
|
+
# source_dir 可能是版本子目录(如 v1/),拆出业务名和版本号
|
|
148
|
+
if re.match(r'^v\d+$', source_dir.name):
|
|
149
|
+
folder_name = source_dir.parent.name
|
|
150
|
+
version_str = source_dir.name
|
|
151
|
+
else:
|
|
152
|
+
folder_name = source_dir.name
|
|
153
|
+
version_str = ''
|
|
154
|
+
now = datetime.now()
|
|
155
|
+
base = f"{now.strftime('%m%d')}_{folder_name}_{now.strftime('%H%M')}"
|
|
156
|
+
if version_str:
|
|
157
|
+
base = f"{base}_{version_str}"
|
|
147
158
|
candidate = base
|
|
148
159
|
suffix = 2
|
|
149
160
|
while (remix_dir / candidate).exists():
|