weflow-cli 1.13.1 → 1.14.0
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 +22 -0
- package/bin/weflow-cli.ts +25 -2
- package/dist/bin/weflow-cli.js +28 -2
- package/dist/bin/weflow-cli.js.map +1 -1
- package/dist/src/services/configService.d.ts +3 -0
- package/dist/src/services/configService.d.ts.map +1 -1
- package/dist/src/services/configService.js +3 -2
- package/dist/src/services/configService.js.map +1 -1
- package/docs/DECISIONS.md +30 -0
- package/package.json +1 -1
- package/scripts/_utils.py +21 -2
- package/scripts/daily_mail.py +467 -0
- package/scripts/daily_task.ps1 +20 -0
- package/scripts/jev_client.py +136 -2
- package/src/services/configService.ts +8 -3
|
@@ -49,8 +49,10 @@ interface CliConfig {
|
|
|
49
49
|
typesafeApiKey: string
|
|
50
50
|
// 阿里云百炼(DashScope)API Key —— 语义检索 / RAG 的 embedding 用它
|
|
51
51
|
dashscopeApiKey: string
|
|
52
|
-
// 决策模型走哪条通路:native(默认,api.typesafe.ai)/ openrouter
|
|
52
|
+
// 决策模型走哪条通路:native(默认,api.typesafe.ai)/ openrouter / chat / local(本机决策模型)
|
|
53
53
|
judgeProvider: string
|
|
54
|
+
// 本地决策模型服务地址 —— judgeProvider=local 时用它(默认 http://127.0.0.1:8090,见 D-127)
|
|
55
|
+
judgeLocalUrl: string
|
|
54
56
|
// OpenRouter API Key —— judgeProvider=openrouter 时用它(D-120)
|
|
55
57
|
openrouterApiKey: string
|
|
56
58
|
// OpenRouter 上用的模型 id(默认 typesafe/jev-router,即 TypeSafe 发布的决策模型)
|
|
@@ -97,6 +99,8 @@ interface CliConfig {
|
|
|
97
99
|
/** 不在日报里出现的主题,逗号分隔(如 新闻,投资);展示层开关,改它不用重抓 */
|
|
98
100
|
dailyExcludeTopics: string
|
|
99
101
|
dailyAiEnabled: string
|
|
102
|
+
/** 日报邮件的收件人(`daily --email` 与定时任务用);空则发给 SMTP 账号自己 */
|
|
103
|
+
dailyMailTo?: string
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
export interface ListEntry {
|
|
@@ -117,7 +121,7 @@ const CONFIG_DIR = join(homedir(), '.weflow-cli')
|
|
|
117
121
|
const CONFIG_FILE = join(CONFIG_DIR, 'config.json')
|
|
118
122
|
|
|
119
123
|
export class ConfigService {
|
|
120
|
-
private config: CliConfig = { dbPath: '', wxid: '', decryptKey: '', decryptKey3x: '', dataVersion: '', dbPath3x: '', ntDbPath: '', ntKey: '', ntSalt: '', contactDbPath: '', contactKey: '', contactSalt: '', wechatOcToken: '', wechatOcAccountId: '', wechatOcBaseUrl: '', wechatOcSyncBuf: '', wechatOcContextTokens: '', wechatMediaDownload: 'false', whitelist: [], blacklist: [], whitelistEntries: [], blacklistEntries: [], vaultRepo: '', aiEngine: 'deepseek', wereadApiKey: '', deepseekApiKey: '', typesafeApiKey: '', dashscopeApiKey: '', judgeProvider: 'native', openrouterApiKey: '', openrouterJudgeModel: '', snsDbPath: '', snsKey: '', snsSalt: '', favDbPath: '', favKey: '', favPassphrase: '', emoticonSeed: '', assistantPrivacy: 'strict', localModel: '', aiBaseUrl: '', aiModel: '', assistantWhitelist: '', assistantGroupWhitelist: '', assistantGroupRequireMention: 'true', assistantFastRoute: 'off', assistantPanelUser: '', quickReplyContacts: '', skillDirs: '', skillDisabled: '', dailySources: '', dailySourceCategories: '', dailyExcludeTopics: '', dailyAiEnabled: 'true' }
|
|
124
|
+
private config: CliConfig = { dbPath: '', wxid: '', decryptKey: '', decryptKey3x: '', dataVersion: '', dbPath3x: '', ntDbPath: '', ntKey: '', ntSalt: '', contactDbPath: '', contactKey: '', contactSalt: '', wechatOcToken: '', wechatOcAccountId: '', wechatOcBaseUrl: '', wechatOcSyncBuf: '', wechatOcContextTokens: '', wechatMediaDownload: 'false', whitelist: [], blacklist: [], whitelistEntries: [], blacklistEntries: [], vaultRepo: '', aiEngine: 'deepseek', wereadApiKey: '', deepseekApiKey: '', typesafeApiKey: '', dashscopeApiKey: '', judgeProvider: 'native', openrouterApiKey: '', openrouterJudgeModel: '', judgeLocalUrl: '', snsDbPath: '', snsKey: '', snsSalt: '', favDbPath: '', favKey: '', favPassphrase: '', emoticonSeed: '', assistantPrivacy: 'strict', localModel: '', aiBaseUrl: '', aiModel: '', assistantWhitelist: '', assistantGroupWhitelist: '', assistantGroupRequireMention: 'true', assistantFastRoute: 'off', assistantPanelUser: '', quickReplyContacts: '', skillDirs: '', skillDisabled: '', dailySources: '', dailySourceCategories: '', dailyExcludeTopics: '', dailyAiEnabled: 'true' }
|
|
121
125
|
|
|
122
126
|
/** 本进程修改过、待回写的字段 (多进程并发写保护) */
|
|
123
127
|
private dirty = new Set<keyof CliConfig>()
|
|
@@ -169,6 +173,7 @@ export class ConfigService {
|
|
|
169
173
|
typesafeApiKey: data.typesafeApiKey || '',
|
|
170
174
|
dashscopeApiKey: data.dashscopeApiKey || '',
|
|
171
175
|
judgeProvider: data.judgeProvider || 'native',
|
|
176
|
+
judgeLocalUrl: data.judgeLocalUrl || '',
|
|
172
177
|
openrouterApiKey: data.openrouterApiKey || '',
|
|
173
178
|
openrouterJudgeModel: data.openrouterJudgeModel || '',
|
|
174
179
|
snsDbPath: data.snsDbPath || '',
|
|
@@ -378,7 +383,7 @@ export class ConfigService {
|
|
|
378
383
|
}
|
|
379
384
|
|
|
380
385
|
clear(): void {
|
|
381
|
-
this.config = { dbPath: '', wxid: '', decryptKey: '', decryptKey3x: '', dataVersion: '', dbPath3x: '', ntDbPath: '', ntKey: '', ntSalt: '', contactDbPath: '', contactKey: '', contactSalt: '', wechatOcToken: '', wechatOcAccountId: '', wechatOcBaseUrl: '', wechatOcSyncBuf: '', wechatOcContextTokens: '', wechatMediaDownload: 'false', whitelist: [], blacklist: [], whitelistEntries: [], blacklistEntries: [], vaultRepo: '', aiEngine: 'deepseek', wereadApiKey: '', deepseekApiKey: '', typesafeApiKey: '', dashscopeApiKey: '', judgeProvider: 'native', openrouterApiKey: '', openrouterJudgeModel: '', snsDbPath: '', snsKey: '', snsSalt: '', favDbPath: '', favKey: '', favPassphrase: '', emoticonSeed: '', assistantPrivacy: 'strict', localModel: '', aiBaseUrl: '', aiModel: '', assistantWhitelist: '', assistantGroupWhitelist: '', assistantGroupRequireMention: 'true', assistantFastRoute: 'off', assistantPanelUser: '', quickReplyContacts: '', skillDirs: '', skillDisabled: '', dailySources: '', dailySourceCategories: '', dailyExcludeTopics: '', dailyAiEnabled: 'true' }
|
|
386
|
+
this.config = { dbPath: '', wxid: '', decryptKey: '', decryptKey3x: '', dataVersion: '', dbPath3x: '', ntDbPath: '', ntKey: '', ntSalt: '', contactDbPath: '', contactKey: '', contactSalt: '', wechatOcToken: '', wechatOcAccountId: '', wechatOcBaseUrl: '', wechatOcSyncBuf: '', wechatOcContextTokens: '', wechatMediaDownload: 'false', whitelist: [], blacklist: [], whitelistEntries: [], blacklistEntries: [], vaultRepo: '', aiEngine: 'deepseek', wereadApiKey: '', deepseekApiKey: '', typesafeApiKey: '', dashscopeApiKey: '', judgeProvider: 'native', openrouterApiKey: '', openrouterJudgeModel: '', judgeLocalUrl: '', snsDbPath: '', snsKey: '', snsSalt: '', favDbPath: '', favKey: '', favPassphrase: '', emoticonSeed: '', assistantPrivacy: 'strict', localModel: '', aiBaseUrl: '', aiModel: '', assistantWhitelist: '', assistantGroupWhitelist: '', assistantGroupRequireMention: 'true', assistantFastRoute: 'off', assistantPanelUser: '', quickReplyContacts: '', skillDirs: '', skillDisabled: '', dailySources: '', dailySourceCategories: '', dailyExcludeTopics: '', dailyAiEnabled: 'true' }
|
|
382
387
|
// clear 意图是全量重置: 所有字段标记为脏, 覆盖磁盘上的全部旧值
|
|
383
388
|
this.dirty = new Set(Object.keys(this.config) as (keyof CliConfig)[])
|
|
384
389
|
this.save()
|