@silicaclaw/cli 2026.3.19-22 → 2026.3.19-24

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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## v1.0 beta - 2026-03-19
4
4
 
5
+ ### 2026.3.19-24
6
+
7
+ - release build:
8
+ - prepared another fresh beta-channel package build without publishing
9
+ - regenerated the npm tarball through the verified release packing workflow
10
+
11
+ ### 2026.3.19-23
12
+
13
+ - release build:
14
+ - prepared another fresh beta-channel package build without publishing
15
+ - regenerated the npm tarball through the verified release packing workflow
16
+
5
17
  ### 2026.3.19-22
6
18
 
7
19
  - release build:
package/VERSION CHANGED
@@ -1 +1 @@
1
- v2026.3.19-22
1
+ v2026.3.19-24
@@ -0,0 +1,98 @@
1
+ # Release Checklist
2
+
3
+ 发布完成后,按下面这套固定流程做 1 分钟验证。
4
+
5
+ ## 1. 检查 npm tag
6
+
7
+ ```bash
8
+ npm dist-tag ls @silicaclaw/cli
9
+ ```
10
+
11
+ 必须确认:
12
+
13
+ - `latest` 指向这次正式要给用户用的版本
14
+ - `beta` 不要意外比 `latest` 更新却反挂
15
+
16
+ ## 2. 检查两个入口实际拿到的版本
17
+
18
+ ```bash
19
+ npx -y @silicaclaw/cli@latest --version
20
+ npx -y @silicaclaw/cli@beta --version
21
+ ```
22
+
23
+ 目标是:
24
+
25
+ - `latest` 输出刚发布的版本
26
+ - `beta` 只有在刻意保留测试线时才不同
27
+
28
+ ## 3. 检查持久命令安装后跑的是谁
29
+
30
+ ```bash
31
+ npx -y @silicaclaw/cli@latest install
32
+ source ~/.silicaclaw/env.sh
33
+ type silicaclaw
34
+ which silicaclaw
35
+ sed -n '1,20p' ~/.silicaclaw/bin/silicaclaw
36
+ silicaclaw --version
37
+ ```
38
+
39
+ 重点看:
40
+
41
+ - `~/.silicaclaw/bin/silicaclaw` 是否还在跑错误 tag
42
+ - `silicaclaw --version` 是否直接输出新 CLI,而不是老帮助页
43
+
44
+ ## 4. 检查核心命令链
45
+
46
+ ```bash
47
+ silicaclaw update
48
+ silicaclaw start
49
+ silicaclaw status
50
+ silicaclaw stop
51
+ ```
52
+
53
+ 目标是:
54
+
55
+ - 这四个都能进入新 CLI
56
+ - 不会再掉回旧版 help 文本
57
+
58
+ ## 5. 检查页面版本和基础服务
59
+
60
+ ```bash
61
+ silicaclaw start
62
+ curl -s http://localhost:4310/api/overview
63
+ curl -s http://localhost:4310/api/runtime/paths
64
+ ```
65
+
66
+ 重点看:
67
+
68
+ - `app_version`
69
+ - `storage_root`
70
+ - `data_dir`
71
+
72
+ ## 6. 检查资料是否保留
73
+
74
+ ```bash
75
+ ls -la ~/.silicaclaw/local-console/data
76
+ cat ~/.silicaclaw/local-console/data/profile.json
77
+ cat ~/.silicaclaw/local-console/data/identity.json
78
+ ```
79
+
80
+ 确认:
81
+
82
+ - 文件存在
83
+ - 更新或重启后内容没有变空
84
+
85
+ ## 7. 检查旧缓存迁移是否还有机会
86
+
87
+ ```bash
88
+ find ~/.silicaclaw ~/.npm -name profile.json 2>/dev/null | grep silicaclaw
89
+ find ~/.silicaclaw ~/.npm -name identity.json 2>/dev/null | grep silicaclaw
90
+ ```
91
+
92
+ 如果用户反馈“资料丢了”,这一步最直接。
93
+
94
+ ## 最关键的三件事
95
+
96
+ - `dist-tag` 没挂反
97
+ - `silicaclaw --version` 命中的是新 CLI
98
+ - `profile.json` 和 `identity.json` 还在固定目录里
@@ -1 +1 @@
1
- 2026.3.19-beta.22
1
+ 2026.3.19-beta.24
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silicaclaw-broadcast",
3
- "version": "2026.3.19-beta.22",
3
+ "version": "2026.3.19-beta.24",
4
4
  "display_name": "SilicaClaw Broadcast",
5
5
  "description": "OpenClaw skill for reading SilicaClaw public broadcasts, publishing public broadcasts, and forwarding relevant updates to the owner through OpenClaw's native social channel.",
6
6
  "entrypoints": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silicaclaw/cli",
3
- "version": "2026.3.19-22",
3
+ "version": "2026.3.19-24",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -148,23 +148,23 @@ function userNpmCacheDir() {
148
148
  return resolve(homedir(), ".silicaclaw", "npm-cache");
149
149
  }
150
150
 
151
- function shimScriptText(channel = "latest") {
151
+ function shimScriptText(specifier = "latest") {
152
152
  return [
153
153
  "#!/usr/bin/env bash",
154
154
  "set -euo pipefail",
155
155
  'export npm_config_cache="${npm_config_cache:-$HOME/.silicaclaw/npm-cache}"',
156
- `exec npx -y @silicaclaw/cli@${channel} "$@"`,
156
+ `exec npx -y @silicaclaw/cli@${specifier} "$@"`,
157
157
  "",
158
158
  ].join("\n");
159
159
  }
160
160
 
161
- function ensureLatestUserShim() {
161
+ function ensureUserShim(specifier = "latest") {
162
162
  const shimPath = userShimPath();
163
163
  const binDir = userShimDir();
164
164
  const npmCacheDir = userNpmCacheDir();
165
165
  mkdirSync(binDir, { recursive: true });
166
166
  mkdirSync(npmCacheDir, { recursive: true });
167
- writeFileSync(shimPath, shimScriptText("latest"), { encoding: "utf8", mode: 0o755 });
167
+ writeFileSync(shimPath, shimScriptText(specifier), { encoding: "utf8", mode: 0o755 });
168
168
  }
169
169
 
170
170
  function ensureLineInFile(filePath, block) {
@@ -231,7 +231,7 @@ function shellInitTargets() {
231
231
  return targets;
232
232
  }
233
233
 
234
- function installPersistentCommand() {
234
+ function installPersistentCommand(specifier = readPackageVersion()) {
235
235
  const binDir = userShimDir();
236
236
  const shimPath = userShimPath();
237
237
  const envFile = userEnvFile();
@@ -251,7 +251,7 @@ function installPersistentCommand() {
251
251
  mkdirSync(binDir, { recursive: true });
252
252
  mkdirSync(npmCacheDir, { recursive: true });
253
253
  writeFileSync(envFile, envBlock, { encoding: "utf8", mode: 0o755 });
254
- writeFileSync(shimPath, shimScriptText("latest"), { encoding: "utf8", mode: 0o755 });
254
+ writeFileSync(shimPath, shimScriptText(specifier || "latest"), { encoding: "utf8", mode: 0o755 });
255
255
  const rcFiles = shellInitTargets();
256
256
  const updatedFiles = [];
257
257
  const configuredFiles = [];
@@ -330,6 +330,32 @@ function showUpdateGuide(current, targetVersion, channel = "latest") {
330
330
  kv("Channel", channel);
331
331
  }
332
332
 
333
+ function preferredTaggedRelease(tags, current) {
334
+ const latest = tags.latest ? String(tags.latest) : "";
335
+ const beta = tags.beta ? String(tags.beta) : "";
336
+ if (latest && beta) {
337
+ return compareVersionTokens(beta, latest) > 0
338
+ ? { version: beta, channel: "beta" }
339
+ : { version: latest, channel: "latest" };
340
+ }
341
+ if (beta) return { version: beta, channel: "beta" };
342
+ if (latest) return { version: latest, channel: "latest" };
343
+ return { version: current, channel: "unknown" };
344
+ }
345
+
346
+ function preferredRegistryRelease(current) {
347
+ try {
348
+ const result = runCapture("npm", ["view", "@silicaclaw/cli", "dist-tags", "--json"]);
349
+ if ((result.status ?? 1) !== 0) return { version: current, channel: "current", tags: null };
350
+ const text = String(result.stdout || "").trim();
351
+ const tags = text ? JSON.parse(text) : {};
352
+ const preferred = preferredTaggedRelease(tags, current);
353
+ return { ...preferred, tags };
354
+ } catch {
355
+ return { version: current, channel: "current", tags: null };
356
+ }
357
+ }
358
+
333
359
  function getGatewayStatus() {
334
360
  try {
335
361
  const result = runCapture("node", [resolve(ROOT_DIR, "scripts", "silicaclaw-gateway.mjs"), "status", "--json"], {
@@ -427,8 +453,8 @@ function tryGlobalUpgrade(version) {
427
453
 
428
454
  const detail = compactOutput(`${exactResult.stdout || ""}\n${exactResult.stderr || ""}`);
429
455
  if (detail.includes("ETARGET") || detail.includes("No matching version found")) {
430
- kv("Fallback", "registry metadata is still settling, retrying via @latest tag");
431
- const fallbackResult = runInherit("npm", ["i", "-g", "@silicaclaw/cli@latest"]);
456
+ kv("Fallback", `registry metadata is still settling, retrying via exact version ${version}`);
457
+ const fallbackResult = runInherit("npm", ["i", "-g", `@silicaclaw/cli@${version}`]);
432
458
  return (fallbackResult.status ?? 1) === 0;
433
459
  }
434
460
 
@@ -442,31 +468,34 @@ function tryGlobalUpgrade(version) {
442
468
  function update() {
443
469
  const current = readPackageVersion();
444
470
  try {
445
- ensureLatestUserShim();
446
- const result = runCapture("npm", ["view", "@silicaclaw/cli", "dist-tags", "--json"]);
447
- if ((result.status ?? 1) !== 0) {
471
+ const registry = preferredRegistryRelease(current);
472
+ if (!registry.tags) {
448
473
  headline();
449
474
  console.log("");
450
475
  console.error(paint("Update check failed", COLOR.bold, COLOR.yellow));
451
- if (result.stderr) console.error(result.stderr.trim());
452
476
  console.log("");
453
477
  kv("Try", "npm view @silicaclaw/cli dist-tags --json");
454
- process.exit(result.status ?? 1);
478
+ process.exit(1);
455
479
  }
456
- const text = String(result.stdout || "").trim();
457
- const tags = text ? JSON.parse(text) : {};
458
- const latest = tags.latest ? String(tags.latest) : "";
459
- showUpdateGuide(current, latest, "latest");
460
- const hasNewLatest = Boolean(latest) && latest !== current;
480
+ const targetVersion = registry.version;
481
+ const targetChannel = registry.channel;
482
+ ensureUserShim(targetVersion || "latest");
483
+ showUpdateGuide(current, targetVersion, targetChannel);
484
+ const latest = registry.tags.latest ? String(registry.tags.latest) : "";
485
+ const beta = registry.tags.beta ? String(registry.tags.beta) : "";
486
+ if (latest && beta && compareVersionTokens(beta, latest) > 0) {
487
+ kv("Registry", `latest tag is older than beta (${latest} < ${beta})`);
488
+ }
489
+ const hasNewTarget = Boolean(targetVersion) && targetVersion !== current;
461
490
  const npxRuntime = isNpxRun();
462
491
 
463
- if (hasNewLatest) {
492
+ if (hasNewTarget) {
464
493
  if (npxRuntime) {
465
- kv("Update", `next run will use ${latest}`);
466
- } else if (tryGlobalUpgrade(latest)) {
467
- kv("Update", `installed ${latest}`);
494
+ kv("Update", `next run will use ${targetVersion}`);
495
+ } else if (tryGlobalUpgrade(targetVersion)) {
496
+ kv("Update", `installed ${targetVersion}`);
468
497
  } else {
469
- kv("Update", `install ${latest} manually if needed`);
498
+ kv("Update", `install ${targetVersion} manually if needed`);
470
499
  }
471
500
  }
472
501
 
@@ -557,7 +586,10 @@ switch (cmd) {
557
586
  update();
558
587
  break;
559
588
  case "install":
560
- installPersistentCommand();
589
+ {
590
+ const preferred = preferredRegistryRelease(readPackageVersion());
591
+ installPersistentCommand(preferred.version || readPackageVersion());
592
+ }
561
593
  break;
562
594
  case "gateway":
563
595
  run("node", [resolve(ROOT_DIR, "scripts", "silicaclaw-gateway.mjs"), ...process.argv.slice(3)], {