@mortiseai/stem 0.0.24 → 0.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mortiseai/stem",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "MortiseAI Stem CLI, built on MSC Engine",
5
5
  "license": "Apache-2.0",
6
6
  "author": "MortiseAI <developer.mai@outlook.com>",
package/preload.ts CHANGED
@@ -2,13 +2,18 @@ import { readFileSync } from 'node:fs';
2
2
  import { dirname, join } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
 
5
- const version = '0.0.1-develop';
6
- const packageUrl = process.env.STEM_LOCAL_PACKAGE_URL ?? '@mortiseai/stem';
7
- const buildTime = process.env.STEM_LOCAL_BUILD_TIME ?? new Date().toISOString();
8
-
9
5
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
6
  const pkgRaw = readFileSync(join(__dirname, 'package.json'), 'utf8');
11
- const pkgJson = JSON.parse(pkgRaw) as { dependencies?: Record<string, string> };
7
+ const pkgJson = JSON.parse(pkgRaw) as {
8
+ version?: string;
9
+ dependencies?: Record<string, string>;
10
+ };
11
+ // 源码模式与发布构建一样直接读取 package.json.version,确保 Welcome、
12
+ // --version、遥测与“版本变化展示全量 Welcome”使用完全一致的版本号。
13
+ // 本地开发渠道由 FEEDBACK_CHANNEL=local 区分,不再污染语义版本字符串。
14
+ const version = pkgJson.version ?? '0.0.0';
15
+ const packageUrl = process.env.STEM_LOCAL_PACKAGE_URL ?? '@mortiseai/stem';
16
+ const buildTime = process.env.STEM_LOCAL_BUILD_TIME ?? new Date().toISOString();
12
17
  const mscEngineSpec = pkgJson.dependencies?.['@mortiseai/mai_msc_engine_ts_module'] ?? '';
13
18
  const mscEngineVersion = mscEngineSpec.replace(/^[\^~]/, '');
14
19