jingliao-ds 0.0.1 → 0.0.3
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/lib/proc-commands.js +5 -22
- package/package.json +2 -2
- package/vendor/dsAgent/bridge/index.js +14 -3
package/lib/proc-commands.js
CHANGED
|
@@ -26,36 +26,19 @@ export const PROC_DEFAULTS = [
|
|
|
26
26
|
args: [],
|
|
27
27
|
builtin: 'health',
|
|
28
28
|
},
|
|
29
|
-
{
|
|
30
|
-
id: 'release.preflight',
|
|
31
|
-
name: '发版预检',
|
|
32
|
-
desc: '发版前自检:changelog / perf / tag / 插件版本号 / 身份与配置闸门,缺什么直接报出来',
|
|
33
|
-
danger: 'low',
|
|
34
|
-
timeoutMs: 120_000,
|
|
35
|
-
args: [{ name: 'version', label: '版本号', required: true, pattern: '^\\d+\\.\\d+\\.\\d+$' }],
|
|
36
|
-
script: {
|
|
37
|
-
rel: 'scripts/release-preflight.py',
|
|
38
|
-
exec: 'python3',
|
|
39
|
-
argv: ['--version', '{version}'],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
29
|
{
|
|
43
30
|
id: 'release.publish',
|
|
44
31
|
name: '发版',
|
|
45
|
-
desc: '
|
|
32
|
+
desc: '一条命令发版:算版本 → 硬校验 → 构建 → 发布(约 3–6 分钟,不可取消)',
|
|
46
33
|
danger: 'high',
|
|
47
34
|
confirmText:
|
|
48
|
-
'发版会构建 APK
|
|
49
|
-
'前提:changelog/perf 文案已审、tag 已打(可先跑「发版预检」)。',
|
|
35
|
+
'发版会构建 APK 并发布到 Gitee Release(插件有改动时同时发 npm),约 3–6 分钟且不可取消。',
|
|
50
36
|
timeoutMs: 900_000,
|
|
51
|
-
args: [
|
|
52
|
-
{ name: 'version', label: '版本号', required: true, pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
53
|
-
{ name: 'code', label: 'versionCode', required: true, pattern: '^\\d+$' },
|
|
54
|
-
],
|
|
37
|
+
args: [{ name: 'note', label: '给用户看的一句话', required: true, pattern: '^.{1,120}$' }],
|
|
55
38
|
script: {
|
|
56
|
-
rel: 'scripts/release
|
|
39
|
+
rel: 'scripts/release.sh',
|
|
57
40
|
exec: 'bash',
|
|
58
|
-
argv: ['--
|
|
41
|
+
argv: ['--note', '{note}'],
|
|
59
42
|
},
|
|
60
43
|
},
|
|
61
44
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jingliao-ds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "鲸聊 - 不只是手机遥控操作电脑,而是将电脑级的Agent能力装进手机",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "git+https://gitee.com/
|
|
21
|
+
"url": "git+https://gitee.com/deepsuper/jingliao.git",
|
|
22
22
|
"directory": "jingliao-ds"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
@@ -296,7 +296,11 @@ export function createDsAgentEngine({
|
|
|
296
296
|
const workspaceRegistry = () => ctx.get?.('workspaceRegistry') ?? ctx.workspaceRegistry;
|
|
297
297
|
const systemPrompt = () => ctx.get?.('systemPrompt') ?? ctx.systemPrompt;
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
// 目录名 = 鲸聊号(200-0000-0001)。老实体的 UUID 目录原样兼容,不改名(2026-12-01 定)。
|
|
300
|
+
const dirNameFor = (id) => (/^\d{11}$/.test(String(id))
|
|
301
|
+
? `${String(id).slice(0, 3)}-${String(id).slice(3, 7)}-${String(id).slice(7)}`
|
|
302
|
+
: String(id));
|
|
303
|
+
const entityDir = (id) => join(workspacesDir, dirNameFor(id));
|
|
300
304
|
|
|
301
305
|
const deletedFile = join(baseDir, 'deleted.json');
|
|
302
306
|
/** @type {Map<string, { id: string, dir: string, deletedAt: number }>} */
|
|
@@ -452,7 +456,8 @@ export function createDsAgentEngine({
|
|
|
452
456
|
const dir = join(workspacesDir, entry.name);
|
|
453
457
|
try {
|
|
454
458
|
const manifest = await readManifest(dir);
|
|
455
|
-
|
|
459
|
+
// 目录名 = 鲸聊号(200-0000-0001);老实体仍是 UUID 目录,两种都认
|
|
460
|
+
if (manifest && dirNameFor(manifest.id) === entry.name) {
|
|
456
461
|
|
|
457
462
|
if (deleted.has(manifest.id)) continue;
|
|
458
463
|
entities.set(manifest.id, manifest);
|
|
@@ -873,8 +878,12 @@ export function createDsAgentEngine({
|
|
|
873
878
|
async function createEntity(payload = {}) {
|
|
874
879
|
await start();
|
|
875
880
|
const name = safeName(payload.name);
|
|
881
|
+
const number = String(payload.number ?? '').trim();
|
|
882
|
+
if (!/^\d{11}$/.test(number)) {
|
|
883
|
+
throw new Error('缺少鲸聊号(11 位数字):请联网创建,由手机侧向服务端申领后再创建');
|
|
884
|
+
}
|
|
876
885
|
if (findByName(name) !== undefined) throw new Error(`已经有叫「${name}」的实体`);
|
|
877
|
-
const id =
|
|
886
|
+
const id = number;
|
|
878
887
|
const dir = entityDir(id);
|
|
879
888
|
const entity = {
|
|
880
889
|
v: DSS_AGENT_VERSION,
|
|
@@ -2749,6 +2758,8 @@ export function createDsAgentEngine({
|
|
|
2749
2758
|
dispose,
|
|
2750
2759
|
get rootDir() { return baseDir; },
|
|
2751
2760
|
get workspacesDir() { return workspacesDir; },
|
|
2761
|
+
/** 实体的工作区目录(目录名 = 鲸聊号 200-0000-0001;老实体的 UUID 目录原样)。 */
|
|
2762
|
+
entityPath: (id) => entityDir(id),
|
|
2752
2763
|
get viewingSessionId() { return viewingSessionId; },
|
|
2753
2764
|
};
|
|
2754
2765
|
}
|