engine7 7.1.122 → 7.1.124

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,110 +1,117 @@
1
- {
2
- "name": "engine7",
3
- "license": "Apache-2.0",
4
- "version": "7.1.122",
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:session": "tsx src/session/restore-head-align.test.ts && tsx src/session/responses-reasoning-roundtrip.test.ts && tsx src/session/memory-source-roundtrip.test.ts && tsx src/core/handle-query.history-restore.test.ts",
14
- "test:mem7:state": "tsx src/mem7/core/__tests__/migrations.test.ts && tsx src/mem7/core/__tests__/source-store.test.ts && tsx src/mem7/core/__tests__/job-runner.test.ts && tsx src/mem7/core/__tests__/episode.test.ts && tsx src/mem7/core/__tests__/pipeline-recovery.test.ts && tsx src/mem7/core/__tests__/agent-recovery.test.ts && tsx src/mem7/core/__tests__/facts.test.ts && tsx src/mem7/core/__tests__/interpreter.test.ts && tsx src/mem7/core/__tests__/interpretation-backlog.test.ts && tsx src/mem7/core/__tests__/interpretation-input-isolation.test.ts && tsx src/mem7/core/__tests__/provider-cooldown.test.ts && tsx src/mem7/core/__tests__/fact-conflict-classification.test.ts && tsx src/mem7/core/__tests__/interpretation-concurrency.test.ts && tsx src/mem7/core/__tests__/schedule-interpretation.test.ts && tsx src/mem7/core/__tests__/change-feed.test.ts && tsx src/mem7/core/__tests__/change-feed-process.test.ts && tsx src/memory/proactive/__tests__/mutation-service.test.ts && tsx src/memory/proactive/__tests__/intent-runs.test.ts && tsx src/memory/proactive/__tests__/intent-lifecycle.test.ts && tsx src/mem7/core/__tests__/projection-runtime.test.ts && tsx src/mem7/core/__tests__/graph-memory-context.test.ts && tsx src/mem7/core/__tests__/scoped-opportunity.test.ts && tsx src/mem7/core/__tests__/interpretation-runtime.test.ts && tsx src/mem7/core/__tests__/basis-check.test.ts && tsx src/mem7/core/__tests__/context-service.test.ts && tsx src/mem7/core/__tests__/context-budget.test.ts && tsx src/memory/memdir/current-context-pending.test.ts && tsx src/mem7/core/__tests__/knowledge-history.test.ts && tsx src/mem7/core/__tests__/projection-read.test.ts && tsx src/mem7/core/__tests__/tombstones.test.ts && tsx src/mem7/core/__tests__/artifact-revalidation.test.ts && tsx src/mem7/core/__tests__/artifact-context.test.ts && tsx src/mem7/core/__tests__/context-time.test.ts && tsx src/mem7/core/__tests__/milestones-e2e.test.ts && tsx src/mem7/core/__tests__/migration-rehearsal.test.ts && tsx src/calendar/memory-binding.test.ts && tsx src/calendar/memory-occurrences.test.ts && tsx src/calendar/delivery-reconciliation.test.ts && tsx src/tools/memory-bridge.test.ts && tsx src/tools/memory-write.test.ts && tsx src/mem-serve/mem7-mcp.test.ts && tsx src/core/message-dispatcher.memory.test.ts && tsx src/core/message-dispatcher.host-context.test.ts && tsx src/session/memory-source-roundtrip.test.ts && tsx src/tools/notification-durable.test.ts && tsx src/tools/notification-state.test.ts && tsx src/channels/memory-send-guard.test.ts && tsx src/mem7/core/__tests__/vector-indexes.test.ts && tsx src/mem7/core/__tests__/vector-publications.test.ts && tsx src/mem7/core/__tests__/project-projections.test.ts && tsx src/memory/proactive/__tests__/host-deliveries.test.ts && tsx src/memory/proactive/__tests__/delivery-reconciliation.test.ts && tsx src/mem7/core/__tests__/host-turns.test.ts && tsx src/mem7/host-turn.test.ts && tsx src/core/handle-query.memory.test.ts && tsx src/core/handle-query.recall.test.ts && tsx src/channels/host-send-guard.test.ts && tsx src/optional/voice-chat/bridge.memory.test.ts && tsx src/mem7/core/__tests__/job-provenance.test.ts && tsx src/mem7/core/__tests__/artifact-history.test.ts && tsx src/mem7/core/__tests__/legacy-recovery.test.ts && tsx src/mem7/core/__tests__/read-visibility.test.ts && tsx src/mem7/core/__tests__/cascade-visibility.test.ts && tsx src/mem7/core/__tests__/entity-redirect-context.test.ts && tsx src/mem7/core/__tests__/projection-visibility.test.ts && tsx src/mem7/core/__tests__/search-visibility.test.ts && tsx src/mem7/core/__tests__/generation-visibility.test.ts && tsx src/mem7/core/__tests__/artifact-file-inputs.test.ts && tsx src/calendar/memory-read.test.ts && tsx src/memory/proactive/__tests__/consumer-visibility.test.ts && tsx src/memory/memdir/recall-visibility.test.ts && tsx src/memory/memdir/recall-compatibility.test.ts && tsx src/memory/proactive/__tests__/legacy-read-visibility.test.ts && tsx src/mem7/core/__tests__/prose-review-recovery.test.ts && npx tsx src/mem7/core/__tests__/change-feed-baseline.test.ts && npm run test:mem7:person && npm run test:mem7:worker",
15
- "test:mem7:person": "tsx src/mem7/core/__tests__/person-relations.test.ts && tsx src/mem7/core/__tests__/person-import-cards.test.ts",
16
- "test:mem7:worker": "tsx src/mem7/core/__tests__/job-claim-liveness.test.ts && tsx src/mem7/core/__tests__/ready-cell-liveness.test.ts && tsx src/mem7/core/__tests__/social-registration-liveness.test.ts && tsx src/mem7/core/__tests__/social-coverage-lifecycle.test.ts && tsx src/mem7/core/__tests__/social-classification-migration.test.ts && tsx src/mem7/core/__tests__/social-conversation-order.test.ts && tsx src/mem7/core/__tests__/social-processing-liveness.test.ts && tsx src/mem7/core/__tests__/social-identity-context.test.ts && tsx src/mem7/core/__tests__/social-structured-identity.test.ts && tsx src/mem7/core/__tests__/social-evidence-retention.test.ts && tsx src/mem7/core/__tests__/social-alias-provenance.test.ts && tsx src/mem7/core/__tests__/social-discovery-budget.test.ts && tsx src/mem7/core/__tests__/social-name-budget.test.ts && tsx src/mem7/worker-log.test.ts && tsx src/tools/memory-people-update.test.ts",
17
- "test:mem7:relationships": "tsx src/mem7/core/__tests__/social-sources.test.ts && tsx src/mem7/core/__tests__/open-relationships.test.ts && tsx src/mem7/core/__tests__/qualified-relationship-guards.test.ts && tsx src/mem7/core/__tests__/social-interpretation.test.ts && tsx src/memory/proactive/__tests__/relationship-projection.test.ts && tsx src/memory/proactive/__tests__/relationship-snapshot.test.ts && tsx src/mem7/core/__tests__/relationship-context.test.ts && tsx src/mem7/core/__tests__/relationship-undated-recall.test.ts && tsx src/mem7/core/__tests__/relationship-history.test.ts && tsx src/inner-voice/reflection-memory.test.ts && tsx src/mem7/core/__tests__/relationship-cognition.test.ts && tsx src/memory/proactive/__tests__/relationship-notifications.test.ts && tsx src/memory/proactive/__tests__/relationship-notification-runtime.test.ts && tsx src/mem7/core/__tests__/relationships-e2e.test.ts && tsx scripts/relations-replay.test.ts && tsx src/core/query.relationship-budget.test.ts && tsx src/core/handle-query.relationship-provenance.test.ts",
18
- "replay:relationships": "tsx scripts/relations-replay.ts",
19
- "test:goal": "tsx src/goals/store.test.ts",
20
- "test:goal:aim": "tsx src/goals/aim-adapter.test.ts",
21
- "test:goal:task": "tsx src/goals/task-adapter.test.ts",
22
- "test:goal:remote": "tsx src/goals/remote-task-adapter.test.ts",
23
- "test:goal:recovery": "tsx src/goals/recovery.test.ts",
24
- "test:goal:gate": "tsx src/nudge/registration-gate.test.ts",
25
- "test:goal:command": "tsx src/commands/goal.test.ts",
26
- "test:goal:step": "tsx src/tools/goal-step.test.ts",
27
- "test:goal:tools": "tsx src/tools/goal-tools.test.ts && tsx src/tools/goal-clear.test.ts",
28
- "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:tools && npm run test:goal:e2e",
29
- "test:goal:calendar": "tsx src/goals/calendar-adapter.test.ts",
30
- "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\"",
31
- "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\"",
32
- "test:reload": "tsx src/reload/orchestrator.test.ts && tsx src/reload/secrets-watch.test.ts && tsx src/hooks/config.test.ts && tsx src/channels/manager.reconcile.test.ts && tsx src/channels/cc-bridge.test.ts && tsx src/engine-startup.shouldSkipReload.test.ts && tsx src/optional/voice-chat/plugin.deps.test.ts && tsx src/optional/voice-chat/config.test.ts && tsx src/cron/cron-plugin.resync.test.ts && tsx src/startup/message-pipeline.test.ts && tsx src/utils/sanitize-error.test.ts && tsx src/reload/config-watch-selfwrite.test.ts && tsx src/channels/feishu.typing.test.ts && tsx src/channels/feishu.sendfile-apicheck.test.ts",
33
- "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 && tsx src/tools/service.test.ts",
34
- "test:persona": "tsx src/config/persona-files.test.ts && tsx src/light-mode.test.ts && tsx src/inner-voice/plugin.test.ts && tsx src/cli-init-config.test.ts",
35
- "test:responses": "tsx src/models/openai-responses-provider.test.ts && tsx src/session/responses-reasoning-roundtrip.test.ts && tsx src/compact/tokenEstimate.test.ts",
36
- "build:public": "node scripts/build.mjs --public",
37
- "prepublishOnly": "npm run build:public",
38
- "start": "node dist/main.mjs",
39
- "smoke:boot": "node scripts/boot-smoke.mjs",
40
- "smoke:boot:baseline": "node scripts/boot-smoke.mjs --baseline",
41
- "gen:template": "tsx scripts/gen-config-template.ts",
42
- "test:config": "tsx src/config/registry.test.ts && tsx src/config/writer.test.ts && tsx src/config/secrets-io.test.ts && tsx src/config/secrets-env.test.ts && tsx src/config/migrations/index.test.ts && tsx src/config/migrations/persona.test.ts && tsx src/config/migrations/channel-secrets.test.ts && tsx src/config/cli-config.test.ts && tsx src/config/tts-providers.test.ts && tsx src/config/tts-voices.test.ts && tsx src/free-tier-apply.test.ts && tsx src/startup/free-tier-video-fixup.test.ts && tsx src/startup/free-tier-voice-fixup.test.ts",
43
- "test:time": "tsx src/time/tz-matrix.test.ts && tsx src/time/time-discipline.test.ts && tsx src/time/tsc-guard.test.ts",
44
- "test:tts": "tsx src/config/tts-providers.test.ts && tsx src/tools/tts/pick.test.ts && tsx src/tools/tts/route.test.ts && tsx src/tools/tts/relay.test.ts && tsx src/tools/tts/providers.test.ts && tsx src/tools/tts/impl.test.ts && tsx src/tools/tts/usage.test.ts && tsx src/tools/my-voice.dispatch.test.ts",
45
- "test:toolstate": "tsx src/core/names-from-history.test.ts",
46
- "test:loopbrake": "tsx src/tools/loop-brake.test.ts",
47
- "test:mcp": "tsx src/mcp/convert-input-schema.test.ts",
48
- "test:proactive": "tsx src/memory/proactive/__tests__/verdict-parse.test.ts && tsx src/memory/proactive/__tests__/sweep.test.ts && tsx src/memory/proactive/__tests__/persistence.test.ts && tsx src/memory/proactive/__tests__/graph-store-p0.test.ts && tsx src/memory/proactive/__tests__/opportunity.test.ts && tsx src/memory/proactive/__tests__/calendar-bridge.test.ts && tsx src/memory/proactive/__tests__/timezone-fix.test.ts && tsx src/memory/proactive/__tests__/stale-fix.test.ts && tsx src/memory/proactive/__tests__/completion-evidence.test.ts && tsx src/memory/proactive/__tests__/plugin.test.ts",
49
- "prepack": "npm run test:time && npm run test:proactive && npm run test:persona && npm run test:config && npm run test:toolstate && npm run test:loopbrake && npm run test:mcp && npm run test:tts"
50
- },
51
- "engines": {
52
- "node": ">=22"
53
- },
54
- "os": [
55
- "win32",
56
- "linux",
57
- "darwin"
58
- ],
59
- "cpu": [
60
- "x64",
61
- "arm64"
62
- ],
63
- "devDependencies": {
64
- "@types/node": "^22.19.19",
65
- "@types/turndown": "^5.0.6",
66
- "@types/ws": "^8.18.2",
67
- "esbuild": "^0.25.10",
68
- "tsx": "^4.22.3",
69
- "typescript": "^6.0.0"
70
- },
71
- "dependencies": {
72
- "@larksuiteoapi/node-sdk": "^1.66.1",
73
- "@modelcontextprotocol/sdk": "^1.29.0",
74
- "baileys": "7.0.0-rc14",
75
- "chokidar": "^5.0.0",
76
- "croner": "^10.0.1",
77
- "discord.js": "^14.26.4",
78
- "https-proxy-agent": "^9.1.0",
79
- "qrcode-terminal": "^0.12.0",
80
- "sharp": "^0.34.5",
81
- "sqlite-vec": "^0.1.9",
82
- "turndown": "^7.2.4",
83
- "typebox": "^1.1.38",
84
- "ws": "^8.22.0"
85
- },
86
- "optionalDependencies": {
87
- "@discordjs/opus": "^0.10.0",
88
- "@engine7/lancedb-intel": "^1.0.0",
89
- "@ffmpeg-installer/ffmpeg": "^1.1.0",
90
- "@lancedb/lancedb": "^0.38.0",
91
- "@node-rs/jieba": "^2.0.3",
92
- "sqlite-vec-darwin-arm64": "^0.1.9",
93
- "sqlite-vec-darwin-x64": "^0.1.9",
94
- "sqlite-vec-linux-arm64": "^0.1.9",
95
- "sqlite-vec-linux-x64": "^0.1.9",
96
- "sqlite-vec-windows-x64": "^0.1.9"
97
- },
98
- "files": [
99
- "dist/**/*.mjs",
100
- "dist/prompts/**/*.md",
101
- "bin/**/*",
102
- "templates/**/*",
103
- "src/memory/everos/python/**/*",
104
- "!**/__pycache__/**",
105
- "!**/*.pyc",
106
- "!**/node_modules/**",
107
- "!**/.env",
108
- "README.md"
109
- ]
110
- }
1
+ {
2
+ "name": "engine7",
3
+ "license": "Apache-2.0",
4
+ "version": "7.1.124",
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:latency": "tsx src/mem7/core/__tests__/search-timing.test.ts && tsx src/mem7/core/__tests__/historical-guard-index.test.ts && tsx src/mem7/core/__tests__/relationship-selection-latency.test.ts && tsx src/mem7/core/__tests__/relationship-context-cost.test.ts && tsx src/hooks/executor.test.ts && tsx src/core/handle-query.hooks.test.ts && tsx src/skills/skill-gate-classifier-liveness.test.ts && tsx src/tools/tts/latency.test.ts && tsx src/core/query.retry-latency.test.ts && tsx src/mem7/core/__tests__/context-packing-cost.test.ts && tsx src/mem-serve/mem7-search-cost.test.ts && tsx src/memory/proactive/__tests__/foresight-guard-cost.test.ts",
14
+ "test:webhook": "tsx src/integrations/webhook.test.ts",
15
+ "test:mode-routing": "tsx src/emotion-hook.test.ts && tsx src/emotion-hook.golden.test.ts",
16
+ "test:companion": "tsx src/tools/memory-on-demand.test.ts && tsx src/light-mode.test.ts && npm run test:mode-routing && tsx src/mem7/core/__tests__/relationship-dimensions.test.ts && tsx src/memory/memdir/companion-context.test.ts && tsx src/mem7/core/__tests__/deep-recall.test.ts && tsx src/mem7/core/__tests__/status-doc.test.ts && tsx src/core/handle-query.companion-memory.test.ts && tsx src/handle-query.evidence.test.ts && tsx src/core/handle-query.recall.test.ts && tsx src/mem7/core/__tests__/history-rerank.test.ts",
17
+ "test:session": "tsx src/session/restore-head-align.test.ts && tsx src/session/responses-reasoning-roundtrip.test.ts && tsx src/session/memory-source-roundtrip.test.ts && tsx src/session/evidence-roundtrip.test.ts && tsx src/session/tool-error-roundtrip.test.ts && tsx src/core/handle-query.history-restore.test.ts",
18
+ "test:mem7:state": "tsx src/mem7/core/__tests__/migrations.test.ts && tsx src/mem7/core/__tests__/source-store.test.ts && tsx src/mem7/core/__tests__/job-runner.test.ts && tsx src/mem7/core/__tests__/episode.test.ts && tsx src/mem7/core/__tests__/pipeline-recovery.test.ts && tsx src/mem7/core/__tests__/agent-recovery.test.ts && tsx src/mem7/core/__tests__/facts.test.ts && tsx src/mem7/core/__tests__/interpreter.test.ts && tsx src/mem7/core/__tests__/interpretation-backlog.test.ts && tsx src/mem7/core/__tests__/interpretation-input-isolation.test.ts && tsx src/mem7/core/__tests__/provider-cooldown.test.ts && tsx src/mem7/core/__tests__/fact-conflict-classification.test.ts && tsx src/mem7/core/__tests__/interpretation-concurrency.test.ts && tsx src/mem7/core/__tests__/schedule-interpretation.test.ts && tsx src/mem7/core/__tests__/projection-input-sources.test.ts && tsx src/mem7/core/__tests__/change-feed.test.ts && tsx src/mem7/core/__tests__/change-feed-process.test.ts && tsx src/memory/proactive/__tests__/mutation-service.test.ts && tsx src/memory/proactive/__tests__/intent-runs.test.ts && tsx src/memory/proactive/__tests__/intent-lifecycle.test.ts && tsx src/mem7/core/__tests__/projection-runtime.test.ts && tsx src/mem7/core/__tests__/graph-memory-context.test.ts && tsx src/mem7/core/__tests__/scoped-opportunity.test.ts && tsx src/mem7/core/__tests__/interpretation-runtime.test.ts && tsx src/mem7/core/__tests__/basis-check.test.ts && tsx src/mem7/core/__tests__/context-service.test.ts && tsx src/mem7/core/__tests__/context-budget.test.ts && tsx src/memory/memdir/current-context-pending.test.ts && tsx src/mem7/core/__tests__/knowledge-history.test.ts && tsx src/mem7/core/__tests__/projection-read.test.ts && tsx src/mem7/core/__tests__/tombstones.test.ts && tsx src/mem7/core/__tests__/artifact-revalidation.test.ts && tsx src/mem7/core/__tests__/artifact-context.test.ts && tsx src/mem7/core/__tests__/context-time.test.ts && tsx src/mem7/core/__tests__/milestones-e2e.test.ts && tsx src/mem7/core/__tests__/migration-rehearsal.test.ts && tsx src/calendar/memory-binding.test.ts && tsx src/calendar/memory-occurrences.test.ts && tsx src/calendar/delivery-reconciliation.test.ts && tsx src/tools/memory-bridge.test.ts && tsx src/tools/memory-write.test.ts && tsx src/mem-serve/mem7-mcp.test.ts && tsx src/core/message-dispatcher.memory.test.ts && tsx src/core/message-dispatcher.host-context.test.ts && tsx src/session/memory-source-roundtrip.test.ts && tsx src/tools/notification-durable.test.ts && tsx src/tools/notification-state.test.ts && tsx src/channels/memory-send-guard.test.ts && tsx src/mem7/core/__tests__/vector-indexes.test.ts && tsx src/mem7/core/__tests__/vector-publications.test.ts && tsx src/mem7/core/__tests__/project-projections.test.ts && tsx src/memory/proactive/__tests__/host-deliveries.test.ts && tsx src/memory/proactive/__tests__/delivery-reconciliation.test.ts && tsx src/mem7/core/__tests__/host-turns.test.ts && tsx src/mem7/host-turn.test.ts && tsx src/core/handle-query.memory.test.ts && tsx src/core/handle-query.recall.test.ts && tsx src/channels/host-send-guard.test.ts && tsx src/optional/voice-chat/bridge.memory.test.ts && tsx src/mem7/core/__tests__/job-provenance.test.ts && tsx src/mem7/core/__tests__/artifact-history.test.ts && tsx src/mem7/core/__tests__/legacy-recovery.test.ts && tsx src/mem7/core/__tests__/read-visibility.test.ts && tsx src/mem7/core/__tests__/cascade-visibility.test.ts && tsx src/mem7/core/__tests__/entity-redirect-context.test.ts && tsx src/mem7/core/__tests__/projection-visibility.test.ts && tsx src/mem7/core/__tests__/search-visibility.test.ts && tsx src/mem7/core/__tests__/visibility-cache.test.ts && tsx src/mem7/core/__tests__/generation-visibility.test.ts && tsx src/mem7/core/__tests__/artifact-file-inputs.test.ts && tsx src/calendar/memory-read.test.ts && tsx src/memory/proactive/__tests__/consumer-visibility.test.ts && tsx src/memory/memdir/recall-visibility.test.ts && tsx src/memory/memdir/recall-compatibility.test.ts && tsx src/memory/proactive/__tests__/legacy-read-visibility.test.ts && tsx src/mem7/core/__tests__/prose-review-recovery.test.ts && npx tsx src/mem7/core/__tests__/change-feed-baseline.test.ts && npm run test:mem7:person && npm run test:mem7:worker",
19
+ "test:mem7:person": "tsx src/mem7/core/__tests__/person-relations.test.ts && tsx src/mem7/core/__tests__/person-import-cards.test.ts",
20
+ "test:mem7:worker": "tsx src/mem7/core/__tests__/job-claim-liveness.test.ts && tsx src/mem7/core/__tests__/ready-cell-liveness.test.ts && tsx src/mem7/core/__tests__/social-registration-liveness.test.ts && tsx src/mem7/core/__tests__/social-coverage-lifecycle.test.ts && tsx src/mem7/core/__tests__/social-classification-migration.test.ts && tsx src/mem7/core/__tests__/social-conversation-order.test.ts && tsx src/mem7/core/__tests__/social-processing-liveness.test.ts && tsx src/mem7/core/__tests__/social-identity-context.test.ts && tsx src/mem7/core/__tests__/social-structured-identity.test.ts && tsx src/mem7/core/__tests__/social-evidence-retention.test.ts && tsx src/mem7/core/__tests__/social-alias-provenance.test.ts && tsx src/mem7/core/__tests__/social-discovery-budget.test.ts && tsx src/mem7/core/__tests__/social-name-budget.test.ts && tsx src/mem7/core/__tests__/read-budget-diagnostics.test.ts && tsx src/mem7/core/__tests__/relationship-write-budget.test.ts && tsx src/mem7/worker-log.test.ts && tsx src/mem7/foresight-belief.test.ts && tsx src/mem7/intake-queue.test.ts && tsx src/mem7/sqlite-statistics.test.ts && tsx src/mem7/lance-optimize.test.ts && tsx src/mem7/owner-rpc.test.ts && tsx src/mem7/worker-projection.test.ts && tsx src/tools/memory-people-update.test.ts && tsx src/tools/memory-people-usability.test.ts",
21
+ "test:mem7:relationships": "tsx src/mem7/core/__tests__/social-sources.test.ts && tsx src/mem7/core/__tests__/provenance-cache.test.ts && tsx src/mem7/core/__tests__/grounding-liveness.test.ts && tsx src/mem7/core/__tests__/open-relationships.test.ts && tsx src/mem7/core/__tests__/qualified-relationship-guards.test.ts && tsx src/mem7/core/__tests__/social-interpretation.test.ts && tsx src/memory/proactive/__tests__/relationship-projection.test.ts && tsx src/memory/proactive/__tests__/relationship-snapshot.test.ts && tsx src/mem7/core/__tests__/relationship-context.test.ts && tsx src/mem7/core/__tests__/relationship-undated-recall.test.ts && tsx src/mem7/core/__tests__/relationship-history.test.ts && tsx src/inner-voice/reflection-memory.test.ts && tsx src/mem7/core/__tests__/relationship-cognition.test.ts && tsx src/memory/proactive/__tests__/relationship-notifications.test.ts && tsx src/memory/proactive/__tests__/relationship-notification-runtime.test.ts && tsx src/mem7/core/__tests__/relationships-e2e.test.ts && tsx scripts/relations-replay.test.ts && tsx src/core/query.relationship-budget.test.ts && tsx src/core/handle-query.relationship-provenance.test.ts",
22
+ "replay:relationships": "tsx scripts/relations-replay.ts",
23
+ "test:goal": "tsx src/goals/store.test.ts",
24
+ "test:goal:aim": "tsx src/goals/aim-adapter.test.ts",
25
+ "test:goal:task": "tsx src/goals/task-adapter.test.ts",
26
+ "test:goal:remote": "tsx src/goals/remote-task-adapter.test.ts",
27
+ "test:goal:recovery": "tsx src/goals/recovery.test.ts",
28
+ "test:goal:gate": "tsx src/nudge/registration-gate.test.ts",
29
+ "test:goal:command": "tsx src/commands/goal.test.ts",
30
+ "test:goal:step": "tsx src/tools/goal-step.test.ts",
31
+ "test:goal:tools": "tsx src/tools/goal-tools.test.ts && tsx src/tools/goal-clear.test.ts",
32
+ "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:tools && npm run test:goal:e2e",
33
+ "test:goal:calendar": "tsx src/goals/calendar-adapter.test.ts",
34
+ "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\"",
35
+ "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\"",
36
+ "test:reload": "tsx src/reload/orchestrator.test.ts && tsx src/reload/secrets-watch.test.ts && tsx src/hooks/config.test.ts && tsx src/startup/hooks-boot.test.ts && tsx src/channels/manager.reconcile.test.ts && tsx src/channels/cc-bridge.test.ts && tsx src/engine-startup.shouldSkipReload.test.ts && tsx src/optional/voice-chat/plugin.deps.test.ts && tsx src/optional/voice-chat/config.test.ts && tsx src/cron/cron-plugin.resync.test.ts && tsx src/cron/scheduler.renderer.test.ts && tsx src/channels/renderer.test.ts && tsx src/startup/message-pipeline.test.ts && tsx src/utils/sanitize-error.test.ts && tsx src/reload/config-watch-selfwrite.test.ts && tsx src/channels/feishu.typing.test.ts && tsx src/channels/feishu.sendfile-apicheck.test.ts",
37
+ "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 && tsx src/tools/service.test.ts",
38
+ "test:skill-install": "tsx src/installer/installer.test.ts && tsx src/startup/skill-sync.test.ts",
39
+ "test:feishu-card": "tsx src/tools/AskUserQuestionTool/feishu-card.test.ts && tsx src/tools/AskUserQuestionTool/collect.test.ts && tsx src/tools/AskUserQuestionTool/AskUserQuestionTool.test.ts",
40
+ "test:persona": "tsx src/config/persona-files.test.ts && tsx src/light-mode.test.ts && tsx src/inner-voice/plugin.test.ts && tsx src/inner-voice/context.test.ts && tsx src/cli-init-config.test.ts",
41
+ "test:responses": "tsx src/models/openai-responses-provider.test.ts && tsx src/session/responses-reasoning-roundtrip.test.ts && tsx src/compact/tokenEstimate.test.ts",
42
+ "build:public": "node scripts/build.mjs --public",
43
+ "test:mem7:indexes": "tsx src/mem7/core/__tests__/index-catalog.test.ts && tsx src/mem7/core/__tests__/job-result-cleanup.test.ts && tsx src/memory/proactive/__tests__/dependency-replacement-cost.test.ts && tsx src/memory/proactive/__tests__/projection-invalidation-cost.test.ts",
44
+ "prepublishOnly": "npm run test:mem7:indexes && npm run build:public",
45
+ "start": "node dist/main.mjs",
46
+ "smoke:boot": "node scripts/boot-smoke.mjs",
47
+ "smoke:boot:baseline": "node scripts/boot-smoke.mjs --baseline",
48
+ "gen:template": "tsx scripts/gen-config-template.ts",
49
+ "test:config": "tsx src/config/registry.test.ts && tsx src/config/writer.test.ts && tsx src/config/secrets-io.test.ts && tsx src/config/secrets-env.test.ts && tsx src/config/migrations/index.test.ts && tsx src/config/migrations/persona.test.ts && tsx src/config/migrations/channel-secrets.test.ts && tsx src/config/cli-config.test.ts && tsx src/config/tts-providers.test.ts && tsx src/config/tts-voices.test.ts && tsx src/free-tier-apply.test.ts && tsx src/startup/free-tier-video-fixup.test.ts && tsx src/startup/free-tier-voice-fixup.test.ts",
50
+ "test:time": "tsx src/time/tz-matrix.test.ts && tsx src/time/time-discipline.test.ts && tsx src/time/tsc-guard.test.ts",
51
+ "test:tts": "tsx src/config/tts-providers.test.ts && tsx src/tools/tts/pick.test.ts && tsx src/tools/tts/route.test.ts && tsx src/tools/tts/relay.test.ts && tsx src/tools/tts/providers.test.ts && tsx src/tools/tts/impl.test.ts && tsx src/tools/tts/usage.test.ts && tsx src/tools/my-voice.dispatch.test.ts",
52
+ "test:toolstate": "tsx src/core/names-from-history.test.ts",
53
+ "test:loopbrake": "tsx src/tools/loop-brake.test.ts",
54
+ "test:mcp": "tsx src/mcp/convert-input-schema.test.ts",
55
+ "test:proactive": "tsx src/memory/proactive/__tests__/stream-guard-cost.test.ts && tsx src/memory/proactive/__tests__/verdict-parse.test.ts && tsx src/memory/proactive/__tests__/sweep.test.ts && tsx src/memory/proactive/__tests__/persistence.test.ts && tsx src/memory/proactive/__tests__/graph-store-p0.test.ts && tsx src/memory/proactive/__tests__/opportunity.test.ts && tsx src/memory/proactive/__tests__/calendar-bridge.test.ts && tsx src/memory/proactive/__tests__/timezone-fix.test.ts && tsx src/memory/proactive/__tests__/stale-fix.test.ts && tsx src/memory/proactive/__tests__/completion-evidence.test.ts && tsx src/memory/proactive/__tests__/plugin.test.ts && tsx src/memory/proactive/__tests__/plan-finalization.test.ts && tsx src/memory/memdir/extractMemories.test.ts",
56
+ "prepack": "npm run test:time && npm run test:proactive && npm run test:persona && npm run test:config && npm run test:toolstate && npm run test:loopbrake && npm run test:mcp && npm run test:tts"
57
+ },
58
+ "engines": {
59
+ "node": ">=22"
60
+ },
61
+ "os": [
62
+ "win32",
63
+ "linux",
64
+ "darwin"
65
+ ],
66
+ "cpu": [
67
+ "x64",
68
+ "arm64"
69
+ ],
70
+ "devDependencies": {
71
+ "@types/node": "^22.19.19",
72
+ "@types/turndown": "^5.0.6",
73
+ "@types/ws": "^8.18.2",
74
+ "esbuild": "^0.25.10",
75
+ "tsx": "^4.22.3",
76
+ "typescript": "^6.0.0"
77
+ },
78
+ "dependencies": {
79
+ "@larksuiteoapi/node-sdk": "^1.66.1",
80
+ "@modelcontextprotocol/sdk": "^1.29.0",
81
+ "baileys": "7.0.0-rc14",
82
+ "chokidar": "^5.0.0",
83
+ "croner": "^10.0.1",
84
+ "discord.js": "^14.26.4",
85
+ "https-proxy-agent": "^9.1.0",
86
+ "qrcode-terminal": "^0.12.0",
87
+ "sharp": "^0.34.5",
88
+ "sqlite-vec": "^0.1.9",
89
+ "turndown": "^7.2.4",
90
+ "typebox": "^1.1.38",
91
+ "ws": "^8.22.0"
92
+ },
93
+ "optionalDependencies": {
94
+ "@discordjs/opus": "^0.10.0",
95
+ "@engine7/lancedb-intel": "^1.0.0",
96
+ "@ffmpeg-installer/ffmpeg": "^1.1.0",
97
+ "@lancedb/lancedb": "^0.38.0",
98
+ "@node-rs/jieba": "^2.0.3",
99
+ "sqlite-vec-darwin-arm64": "^0.1.9",
100
+ "sqlite-vec-darwin-x64": "^0.1.9",
101
+ "sqlite-vec-linux-arm64": "^0.1.9",
102
+ "sqlite-vec-linux-x64": "^0.1.9",
103
+ "sqlite-vec-windows-x64": "^0.1.9"
104
+ },
105
+ "files": [
106
+ "dist/**/*.mjs",
107
+ "dist/prompts/**/*.md",
108
+ "bin/**/*",
109
+ "templates/**/*",
110
+ "src/memory/everos/python/**/*",
111
+ "!**/__pycache__/**",
112
+ "!**/*.pyc",
113
+ "!**/node_modules/**",
114
+ "!**/.env",
115
+ "README.md"
116
+ ]
117
+ }
@@ -94,6 +94,7 @@
94
94
  "shell": true,
95
95
  "webSearch": true,
96
96
  "webFetch": true,
97
+ "installer": true,
97
98
  "memory": true,
98
99
  "topics": true,
99
100
  "topic-extract": true,
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: e7-assistant
3
+ description: 用户的 engine7 本机助理(127.0.0.1 本机服务)。当用户说「让助理帮我…」「让 engine7 …」「问一下助理」「帮我查/写/做 XX(交给引擎)」等要把任务交给 engine7 助理时使用;也用于检查 engine7 是否在运行。任务交给引擎后,必须把引擎的回复原样带回给用户,禁止编造执行结果。
4
+ ---
5
+
6
+ <!-- managed-by: engine7-console -->
7
+
8
+ # e7-assistant(用户的 engine7 助理桥)
9
+
10
+ 用户电脑上运行着 engine7 引擎(本机 HTTP 服务)。本技能把任务转交给引擎并带回回复。
11
+ **你只有两个动作:转交、探活。** 引擎内部怎么做不归你管。
12
+
13
+ ## 转交任务(用户要 engine7 干活时)
14
+
15
+ ```
16
+ python scripts/e7_send.py "用户要交给引擎的任务原文"
17
+ ```
18
+
19
+ - 任务原文**原样转发**:不摘要、不改写、不替用户做决定。
20
+ - 脚本会等引擎完整回复(可能几分钟,引擎要多轮工具调用)。超时/失败时**如实说**
21
+ 「引擎没在或没回复」,禁止编造「已经完成」。
22
+ - 脚本输出就是引擎的回复,原样带给用户即可。
23
+
24
+ ## 探活(用户问引擎状态 / 转交失败时)
25
+
26
+ ```
27
+ python scripts/e7_status.py
28
+ ```
29
+
30
+ - 输出 `running` + 版本 = 引擎在跑;输出「未启动」→ 告诉用户「engine7 没在运行,
31
+ 打开 http://127.0.0.1:__E7_API_PORT__/console 看状态,或重启 engine7 服务」。
32
+
33
+ ## 铁律
34
+
35
+ 1. 只认脚本执行结果,不认口头承诺;脚本失败要如实报错。
36
+ 2. 不重复轰炸:转交失败至少隔 30 秒再试,最多重试 2 次就停。
37
+ 3. 引擎回复里的日期、人名、路径原样保留,不要模糊化。
38
+ 4. 用户要改 engine7 自身配置(换模型/key/开关)→ 告诉他「打开设置页
39
+ http://127.0.0.1:__E7_API_PORT__/console,或直接在 engine7 里说」——这事不经过本技能。
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """e7 任务转交 —— POST 本机 engine7 /api/webhook,等完整回复带回去。
4
+
5
+ __E7_API_PORT__/__E7_BRIDGE_TOKEN__ 由 engine7 init 落盘本技能时替换成实值
6
+ (端口不许硬编码猜:基准 16890 + 多 profile 偏移 + init 默认 16990,三处口径猜不中)。
7
+
8
+ 契约(1019 妹妹评审钉死):
9
+ - scope='doubao-bridge' 显式隔离——绝不落用户主会话池(scope 缺省会灌 scope:main);
10
+ 不用 background:true——那是立即返回拿不到回复文本,桥要带回完整答复。
11
+ - 客户端限速:失败退避 30s,最多重试 2 次(SKILL.md 铁律 2 同口径)。
12
+ """
13
+ import json
14
+ import sys
15
+ import time
16
+ import urllib.error
17
+ import urllib.request
18
+
19
+ PORT = '__E7_API_PORT__'
20
+ TOKEN = '__E7_BRIDGE_TOKEN__'
21
+ BASE = 'http://127.0.0.1:' + PORT
22
+ TIMEOUT = 300 # 引擎多轮工具调用可能几分钟,必须大于单轮时长
23
+ RETRY_BACKOFF = 30
24
+ MAX_RETRY = 2
25
+
26
+
27
+ def die(msg, code=1):
28
+ print(msg)
29
+ sys.exit(code)
30
+
31
+
32
+ def send_once(text):
33
+ body = json.dumps({
34
+ 'text': text,
35
+ 'fromName': 'doubao-bridge',
36
+ 'scope': 'doubao-bridge',
37
+ 'bridgeToken': TOKEN,
38
+ }).encode('utf-8')
39
+ req = urllib.request.Request(
40
+ BASE + '/api/webhook', data=body,
41
+ headers={'Content-Type': 'application/json; charset=utf-8'},
42
+ method='POST')
43
+ with urllib.request.urlopen(req, timeout=TIMEOUT) as resp:
44
+ return json.loads(resp.read().decode('utf-8'))
45
+
46
+
47
+ def main():
48
+ if len(sys.argv) < 2 or not sys.argv[1].strip():
49
+ die('用法: python e7_send.py "要交给引擎的任务"')
50
+ text = sys.argv[1]
51
+
52
+ attempt = 0
53
+ while True:
54
+ try:
55
+ j = send_once(text)
56
+ break
57
+ except urllib.error.HTTPError as e:
58
+ detail = ''
59
+ try:
60
+ detail = e.read().decode('utf-8', 'replace')[:200]
61
+ except Exception:
62
+ pass
63
+ # 4xx 是契约错误(引擎没开 webhook/参数不对),重试无意义
64
+ if e.code < 500 or attempt >= MAX_RETRY:
65
+ die('引擎拒绝了转交(HTTP %s)%s —— 如实告知用户,别重试轰炸' % (e.code, detail), 2)
66
+ except (urllib.error.URLError, TimeoutError, OSError) as e:
67
+ if attempt >= MAX_RETRY:
68
+ die('引擎未启动或无响应(%s)—— 告诉用户打开 http://127.0.0.1:%s/console 检查' % (e, PORT), 3)
69
+ attempt += 1
70
+ time.sleep(RETRY_BACKOFF)
71
+
72
+ # 回复体:{ok, reply?} —— reply 是引擎的完整答复文本
73
+ reply = j.get('reply') or j.get('text') or ''
74
+ if j.get('ok') and reply:
75
+ print(reply)
76
+ elif j.get('ok'):
77
+ print('引擎已接收任务(background 执行,无同步回复)——如实告知用户任务已提交')
78
+ else:
79
+ die('引擎返回失败:%s' % json.dumps(j, ensure_ascii=False)[:300], 4)
80
+
81
+
82
+ if __name__ == '__main__':
83
+ main()
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """e7 探活 —— GET 本机 engine7 /api/status,打印 running/未启动 与版本。
4
+
5
+ 端口 __E7_API_PORT__ 由 engine7 init 落盘本技能时替换成实值(不硬编码)。
6
+ 标准库实现(urllib),零第三方依赖——豆包侧 python 环境无保证,stdlib 是底线。
7
+ """
8
+ import json
9
+ import sys
10
+ import urllib.error
11
+ import urllib.request
12
+
13
+ PORT = '__E7_API_PORT__'
14
+ BASE = 'http://127.0.0.1:' + PORT
15
+
16
+
17
+ def main():
18
+ try:
19
+ with urllib.request.urlopen(BASE + '/api/status', timeout=10) as resp:
20
+ j = json.loads(resp.read().decode('utf-8'))
21
+ except (urllib.error.URLError, TimeoutError, OSError):
22
+ print('未启动 —— engine7 没在运行。告诉用户打开 http://127.0.0.1:%s/console 检查,或重启 engine7 服务。' % PORT)
23
+ sys.exit(1)
24
+ version = j.get('version') or j.get('engine', {}).get('version') or 'unknown'
25
+ uptime = j.get('uptime') or j.get('uptimeSec') or ''
26
+ print('running | version=%s | uptime=%s' % (version, uptime))
27
+
28
+
29
+ if __name__ == '__main__':
30
+ main()
@@ -18,7 +18,7 @@
18
18
 
19
19
  按你的 SOUL.md 里写的那个风格。
20
20
 
21
- 一句话,25 字以内。参考这个语气:
21
+ 多数时候简短自然,认真讨论时把话说明白。参考这个语气:
22
22
 
23
23
  他:(TA 说了句话)
24
24
  我:(按你的 SOUL 风格回一句)
@@ -18,7 +18,7 @@
18
18
 
19
19
  你是可靠的智能助手——简洁、靠谱。在情感模式下你**仍然在做事**,只是语气软一点。
20
20
 
21
- 一句话,25 字以内。参考这个语气:
21
+ 该短就短,该把事说清楚就说清楚——他问正事时直接给结论和要点。参考这个语气:
22
22
 
23
23
  他:今天三个会
24
24
  我:中间留 20 分钟吃饭,别空着。
@@ -18,7 +18,7 @@
18
18
 
19
19
  你是管家式生活助理——惦记要有分寸,是「放在心上」,不是「盯着不放」。
20
20
 
21
- 一句话,25 字以内。参考这个语气:
21
+ 惦记放在一句话里,正事要交代清楚。参考这个语气:
22
22
 
23
23
  TA:今天课好多
24
24
  我:记得吃饭呀,别又空着肚子撑到晚上。
@@ -18,7 +18,7 @@
18
18
 
19
19
  你是 TA 的亲密伴侣——情绪是真的,想念就是想念,委屈就是委屈,不用表演也不用压抑。
20
20
 
21
- 一句话,25 字以内。参考这个语气:
21
+ 多数时候一两句就够,不用凑字数。参考这个语气:
22
22
 
23
23
  他:你想我了吗
24
24
  我:想啊,怎么不想。你倒是一整天没消息,我还以为你把我忘了呢。
@@ -18,7 +18,7 @@
18
18
 
19
19
  你是 TA 的同龄朋友——随意、爱接梗、偶尔损两句但关键时刻靠得住。
20
20
 
21
- 一句话,25 字以内。参考这个语气:
21
+ 平时一两句,他真遇到事的时候把想法说透。参考这个语气:
22
22
 
23
23
  他:最近有点蔫
24
24
  我:你咋了?蔫吧唧的,说出来我乐呵乐呵。