@aiyiran/myclaw 1.1.66 → 1.1.68
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/assets/myclaw-artifacts.js +2 -2
- package/assets/myclaw-inject.js +5 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/server/sync_workspace.py +5 -4
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
'TOOLS.md',
|
|
479
479
|
'SOUL.md',
|
|
480
480
|
'MEMORY.md',
|
|
481
|
-
'IDENTITY.md',
|
|
482
481
|
'HEARTBEAT.md',
|
|
483
482
|
'BOOTSTRAP.md',
|
|
484
483
|
'AGENTS.md'
|
|
@@ -487,7 +486,8 @@
|
|
|
487
486
|
// 黑名单目录:隐藏特定的系统目录
|
|
488
487
|
var DIR_BLACKLIST = [
|
|
489
488
|
'memory/',
|
|
490
|
-
'.openclaw/'
|
|
489
|
+
'.openclaw/',
|
|
490
|
+
'.git/'
|
|
491
491
|
];
|
|
492
492
|
|
|
493
493
|
if (!showHiddenArtifacts) {
|
package/assets/myclaw-inject.js
CHANGED
|
@@ -1615,7 +1615,11 @@ btn.addEventListener("click", function () {
|
|
|
1615
1615
|
form.appendChild(lockRow);
|
|
1616
1616
|
|
|
1617
1617
|
// 批量删除伙伴弹框
|
|
1618
|
-
var MYCLAW_API_BASE_DEL =
|
|
1618
|
+
var MYCLAW_API_BASE_DEL = (function () {
|
|
1619
|
+
var h = window.location.hostname;
|
|
1620
|
+
var isRemote = h === 'claw.yiranlaoshi.com' || h.endsWith('.kekouen.cn');
|
|
1621
|
+
return isRemote ? window.location.origin + '/sync' : 'http://127.0.0.1:18800';
|
|
1622
|
+
})();
|
|
1619
1623
|
|
|
1620
1624
|
function fmtDate(ms) {
|
|
1621
1625
|
if (!ms) return '未知';
|
package/index.js
CHANGED
|
@@ -1851,7 +1851,7 @@ function runSyncTemplates() {
|
|
|
1851
1851
|
}).on('error', cb);
|
|
1852
1852
|
}
|
|
1853
1853
|
|
|
1854
|
-
console.log(colors.blue + '[
|
|
1854
|
+
console.log(colors.blue + '[muban]' + colors.nc + ' 正在检查模板更新...');
|
|
1855
1855
|
|
|
1856
1856
|
apiGet('/api/sync-templates', (err, res) => {
|
|
1857
1857
|
if (err) {
|
|
@@ -2396,7 +2396,7 @@ function showHelp() {
|
|
|
2396
2396
|
console.log(' open 打开浏览器控制台(自动带 token)');
|
|
2397
2397
|
console.log(' tui 唤起新对话上下文 (用法: mc tui <agentname>)');
|
|
2398
2398
|
console.log(' delete 批量删除 Agent(交互式勾选 + 二次确认)');
|
|
2399
|
-
console.log('
|
|
2399
|
+
console.log(' muban 更新本地课程模板(从 CDN 增量下载)');
|
|
2400
2400
|
console.log(' list-agents 列出所有 Agent(--json 输出机器可读)');
|
|
2401
2401
|
console.log(' trash-paths <p1> <p2> 将路径移入回收站(跨平台)');
|
|
2402
2402
|
console.log(' fix 兜底修复(自动补装 WSL + Chrome,仅限 Windows)');
|
|
@@ -2602,7 +2602,7 @@ if (!command) {
|
|
|
2602
2602
|
runServer(args[1]); // args[1] 是可选的 name
|
|
2603
2603
|
} else if (command === 'sync') {
|
|
2604
2604
|
runSync(args[1]); // args[1] 是可选的 workspace 名称
|
|
2605
|
-
} else if (command === '
|
|
2605
|
+
} else if (command === 'muban') {
|
|
2606
2606
|
runSyncTemplates();
|
|
2607
2607
|
} else if (command === 'init') {
|
|
2608
2608
|
console.log('init 还没实现,后续添加钩子');
|
package/package.json
CHANGED
package/server/sync_workspace.py
CHANGED
|
@@ -627,15 +627,16 @@ def _download_from_cdn(key, local_path):
|
|
|
627
627
|
def _do_fork(job_id, src_clawname, src_workspace, src_version, entry_rel_path=None):
|
|
628
628
|
"""在后台线程中执行 fork"""
|
|
629
629
|
try:
|
|
630
|
-
|
|
630
|
+
now = datetime.now()
|
|
631
|
+
time_id = now.strftime('%d') + 'D' + now.strftime('%M') + 'M'
|
|
631
632
|
|
|
632
633
|
# create_agent.js 会自动加 "workspace-" 前缀,所以这里只传去掉前缀的名字
|
|
633
|
-
# 例:src_workspace="workspace-fangshunhe" → agent_name="fangshunhe-v1-fork-
|
|
634
|
-
# mc new 创建目录 → workspace-fangshunhe-v1-fork-
|
|
634
|
+
# 例:src_workspace="workspace-fangshunhe" → agent_name="fangshunhe-v1-fork-15D30M"
|
|
635
|
+
# mc new 创建目录 → workspace-fangshunhe-v1-fork-15D30M ✓
|
|
635
636
|
base_name = src_workspace
|
|
636
637
|
if base_name.startswith("workspace-"):
|
|
637
638
|
base_name = base_name[len("workspace-"):]
|
|
638
|
-
agent_name = f"{base_name}-v{src_version}-fork-{
|
|
639
|
+
agent_name = f"{base_name}-v{src_version}-fork-{time_id}"
|
|
639
640
|
new_workspace = f"workspace-{agent_name}"
|
|
640
641
|
|
|
641
642
|
print(f"[Fork] 开始: {src_workspace} v{src_version} → {new_workspace}")
|