engine7 7.1.96 → 7.1.106
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/dist/cli.mjs +1808 -1339
- package/dist/engine-startup.mjs +1713 -1094
- package/dist/main.mjs +1713 -1094
- package/package.json +87 -85
- package/templates/workspace/scripts/emotion_state_machine.mjs +6 -6
package/package.json
CHANGED
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "engine7",
|
|
3
|
-
"license": "Apache-2.0",
|
|
4
|
-
"version": "7.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"description": "Engine 7 — 给助手一个家 / A home for your AI assistant",
|
|
7
|
-
"main": "dist/main.mjs",
|
|
8
|
-
"bin": {
|
|
9
|
-
"engine7": "bin/engine7"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "node scripts/build.mjs",
|
|
13
|
-
"test:goal": "tsx src/goals/store.test.ts",
|
|
14
|
-
"test:goal:aim": "tsx src/goals/aim-adapter.test.ts",
|
|
15
|
-
"test:goal:task": "tsx src/goals/task-adapter.test.ts",
|
|
16
|
-
"test:goal:remote": "tsx src/goals/remote-task-adapter.test.ts",
|
|
17
|
-
"test:goal:recovery": "tsx src/goals/recovery.test.ts",
|
|
18
|
-
"test:goal:gate": "tsx src/nudge/registration-gate.test.ts",
|
|
19
|
-
"test:goal:command": "tsx src/commands/goal.test.ts",
|
|
20
|
-
"test:goal:
|
|
21
|
-
"test:goal:
|
|
22
|
-
"test:goal:
|
|
23
|
-
"test:goal:
|
|
24
|
-
"test:
|
|
25
|
-
"test:
|
|
26
|
-
"test:
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"smoke:boot
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"@types/
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"@
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"sqlite-vec-darwin-
|
|
72
|
-
"sqlite-vec-
|
|
73
|
-
"sqlite-vec-linux-
|
|
74
|
-
"sqlite-vec-
|
|
75
|
-
"
|
|
76
|
-
"@
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "engine7",
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "7.1.106",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Engine 7 — 给助手一个家 / A home for your AI assistant",
|
|
7
|
+
"main": "dist/main.mjs",
|
|
8
|
+
"bin": {
|
|
9
|
+
"engine7": "bin/engine7"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "node scripts/build.mjs",
|
|
13
|
+
"test:goal": "tsx src/goals/store.test.ts",
|
|
14
|
+
"test:goal:aim": "tsx src/goals/aim-adapter.test.ts",
|
|
15
|
+
"test:goal:task": "tsx src/goals/task-adapter.test.ts",
|
|
16
|
+
"test:goal:remote": "tsx src/goals/remote-task-adapter.test.ts",
|
|
17
|
+
"test:goal:recovery": "tsx src/goals/recovery.test.ts",
|
|
18
|
+
"test:goal:gate": "tsx src/nudge/registration-gate.test.ts",
|
|
19
|
+
"test:goal:command": "tsx src/commands/goal.test.ts",
|
|
20
|
+
"test:goal:step": "tsx src/tools/goal-step.test.ts",
|
|
21
|
+
"test:goal:all": "npm run test:goal && npm run test:goal:calendar && npm run test:goal:restart && npm run test:goal:aim && npm run test:goal:task && npm run test:goal:remote && npm run test:goal:recovery && npm run test:goal:gate && npm run test:goal:command && npm run test:goal:step && npm run test:goal:e2e",
|
|
22
|
+
"test:goal:calendar": "tsx src/goals/calendar-adapter.test.ts",
|
|
23
|
+
"test:goal:restart": "powershell -NoProfile -Command \"$d = Join-Path ([System.IO.Path]::GetTempPath()) ('engine7-goal-' + [guid]::NewGuid()); New-Item -ItemType Directory -Path $d | Out-Null; $id = (npx tsx src/goals/restart-writer.ts $d); npx tsx src/goals/restart-reader.ts $d $id; Remove-Item -Recurse -Force $d\"",
|
|
24
|
+
"test:goal:e2e": "powershell -NoProfile -Command \"$d = Join-Path ([System.IO.Path]::GetTempPath()) ('engine7-goal-e2e-' + [guid]::NewGuid()); New-Item -ItemType Directory -Path $d | Out-Null; npx tsx src/goals/e2e-phase1.ts $d; if ($LASTEXITCODE -ne 0) { Remove-Item -Recurse -Force $d; exit 1 }; npx tsx src/goals/e2e-phase2.ts $d; $code = $LASTEXITCODE; Remove-Item -Recurse -Force $d; exit $code\"",
|
|
25
|
+
"test:reload": "tsx src/reload/orchestrator.test.ts && tsx src/hooks/config.test.ts && tsx src/channels/manager.reconcile.test.ts && tsx src/engine-startup.shouldSkipReload.test.ts && tsx src/optional/voice-chat/plugin.deps.test.ts && tsx src/cron/cron-plugin.resync.test.ts && tsx src/startup/message-pipeline.test.ts && tsx src/utils/sanitize-error.test.ts",
|
|
26
|
+
"test:installer": "tsx src/cli-events.test.ts && tsx src/cli-init-config.test.ts && tsx src/cli-init-answers.test.ts && tsx src/cli-init.headless.e2e.test.ts && tsx src/cli-reconfig.test.ts && tsx src/cli-doctor.test.ts && tsx src/config/secrets-env.test.ts && tsx src/startup/api-status.test.ts && tsx src/cli-service.test.ts && tsx src/emotion-hook.test.ts && tsx src/emotion-hook.golden.test.ts && tsx src/tools/tavily-pool.test.ts",
|
|
27
|
+
"test:responses": "tsx src/models/openai-responses-provider.test.ts && tsx src/session/responses-reasoning-roundtrip.test.ts && tsx src/compact/tokenEstimate.test.ts",
|
|
28
|
+
"build:public": "node scripts/build.mjs --public",
|
|
29
|
+
"prepublishOnly": "npm run build:public",
|
|
30
|
+
"start": "node dist/main.mjs",
|
|
31
|
+
"smoke:boot": "node scripts/boot-smoke.mjs",
|
|
32
|
+
"smoke:boot:baseline": "node scripts/boot-smoke.mjs --baseline",
|
|
33
|
+
"gen:template": "tsx scripts/gen-config-template.ts",
|
|
34
|
+
"test:time": "tsx src/time/tz-matrix.test.ts && tsx src/time/time-discipline.test.ts && tsx src/time/tsc-guard.test.ts",
|
|
35
|
+
"prepack": "npm run test:time"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=22"
|
|
39
|
+
},
|
|
40
|
+
"os": [
|
|
41
|
+
"win32",
|
|
42
|
+
"linux",
|
|
43
|
+
"darwin"
|
|
44
|
+
],
|
|
45
|
+
"cpu": [
|
|
46
|
+
"x64",
|
|
47
|
+
"arm64"
|
|
48
|
+
],
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/node": "^22.19.19",
|
|
51
|
+
"@types/turndown": "^5.0.6",
|
|
52
|
+
"esbuild": "^0.25.10",
|
|
53
|
+
"tsx": "^4.22.3",
|
|
54
|
+
"typescript": "^6.0.0"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@larksuiteoapi/node-sdk": "^1.66.1",
|
|
58
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
59
|
+
"chokidar": "^5.0.0",
|
|
60
|
+
"croner": "^10.0.1",
|
|
61
|
+
"discord.js": "^14.26.4",
|
|
62
|
+
"https-proxy-agent": "^9.1.0",
|
|
63
|
+
"qrcode-terminal": "^0.12.0",
|
|
64
|
+
"sharp": "^0.34.5",
|
|
65
|
+
"sqlite-vec": "^0.1.9",
|
|
66
|
+
"turndown": "^7.2.4",
|
|
67
|
+
"typebox": "^1.1.38"
|
|
68
|
+
},
|
|
69
|
+
"optionalDependencies": {
|
|
70
|
+
"@discordjs/opus": "^0.10.0",
|
|
71
|
+
"sqlite-vec-darwin-arm64": "^0.1.9",
|
|
72
|
+
"sqlite-vec-darwin-x64": "^0.1.9",
|
|
73
|
+
"sqlite-vec-linux-arm64": "^0.1.9",
|
|
74
|
+
"sqlite-vec-linux-x64": "^0.1.9",
|
|
75
|
+
"sqlite-vec-windows-x64": "^0.1.9",
|
|
76
|
+
"@lancedb/lancedb": "^0.38.0",
|
|
77
|
+
"@engine7/lancedb-intel": "^1.0.0",
|
|
78
|
+
"@node-rs/jieba": "^2.0.3"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"dist/**/*.mjs",
|
|
82
|
+
"bin/**/*",
|
|
83
|
+
"templates/**/*",
|
|
84
|
+
"src/memory/everos/python/**/*",
|
|
85
|
+
"README.md"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -384,13 +384,13 @@ async function classifyByLlm(text, absentMin = 0, recent = null) {
|
|
|
384
384
|
const prompt = (
|
|
385
385
|
`判断${_USER_PRON}这句话对${persona}(${_PERSONA})是什么动作、是情感交流还是工作、要不要回忆更早历史。`
|
|
386
386
|
+ '只输出 JSON:{"action":"上线/调戏/挑衅/哄/正常", "mode":"emotion/work"}\n'
|
|
387
|
-
+ '
|
|
388
|
-
+ '
|
|
389
|
-
+ '
|
|
390
|
-
+ '
|
|
387
|
+
+ '【模式】只问一句:这句话是要我干活吗?要 → work,不要 → emotion。命中以下任一项就是要:\n'
|
|
388
|
+
+ '· 主体是日志/代码/报错/配置(时间戳、level=、堆栈、字段名)——里面的想你爱你之类是被讨论的数据,不是对你说的。\n'
|
|
389
|
+
+ '· 含工程对象(代码/脚本/配置/服务器/模型/接口/日志/报错/部署/数据/文档/任务),或问工程产物的情况。\n'
|
|
390
|
+
+ '· 明确派活或求助(帮我看/改/查/写/跑/装/部署/排查…),或明确催进度。'
|
|
391
391
|
+ '排查求助口语随意也判 work(工程对象+求助语气,如\'qwen3 没起来 你看下\')——是在等你干活,不是聊天。\n'
|
|
392
|
-
+ '
|
|
393
|
-
+ '
|
|
392
|
+
+ '· 昨天/上午/刚才只是时间范围,问工程产物改了啥是 work。\n'
|
|
393
|
+
+ '不加东西就是不要——打招呼、寒暄、闲聊、情绪、生活、随口一问都算 emotion。真拿不准 → work。\n'
|
|
394
394
|
+ '【动作】只判这句话对她是什么动作,不是他自己的情绪(\'理我了么\'是求关注,对她算正常对话):\n'
|
|
395
395
|
+ '调戏=逗弄(\'小笨蛋\'),她会接住或撒娇;挑衅=贬低否定她(\'你个大模型\'),会让她委屈生气;'
|
|
396
396
|
+ '哄=道歉示爱;上线=久别回来打招呼。技术讨论即使带情绪(\'被盗刷\'\'用得好快\')也是\'正常\'。\n'
|