@dsh-plus/notify-email 0.1.41 → 0.1.43
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/client.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/package.json +2 -2
- package/src/client/card.tsx +1 -1
- package/src/client/client.ts +2 -2
- package/src/config-api.ts +1 -1
- package/src/config.ts +4 -4
- package/src/ns.ts +1 -1
- package/src/service.ts +5 -5
package/lib/client.js
CHANGED
|
@@ -195,7 +195,7 @@ window.__ModuleLoader__.load({
|
|
|
195
195
|
unsaved: "未保存",
|
|
196
196
|
loading: "加载中…",
|
|
197
197
|
unavailable: "配置服务不可用。",
|
|
198
|
-
readOnly: "当前部署无 settings provider
|
|
198
|
+
readOnly: "当前部署无 settings provider,配置为只读;请在 profile 的 cordis.patch.yml 行级配置。",
|
|
199
199
|
invalidNumber: "请输入正整数。",
|
|
200
200
|
collapse: "收起",
|
|
201
201
|
expand: "展开",
|
|
@@ -212,7 +212,7 @@ window.__ModuleLoader__.load({
|
|
|
212
212
|
unsaved: "Unsaved",
|
|
213
213
|
loading: "Loading…",
|
|
214
214
|
unavailable: "Settings service unavailable.",
|
|
215
|
-
readOnly: "No settings provider in this deployment; config is read-only.
|
|
215
|
+
readOnly: "No settings provider in this deployment; config is read-only. Configure it at the profile row in cordis.patch.yml.",
|
|
216
216
|
invalidNumber: "Enter a positive integer.",
|
|
217
217
|
collapse: "Collapse",
|
|
218
218
|
expand: "Expand",
|
|
@@ -419,7 +419,7 @@ ${extra}
|
|
|
419
419
|
//#region src/ns.ts
|
|
420
420
|
/**
|
|
421
421
|
* settings 命名空间字面量(纯常量,零依赖,浏览器半可安全引入)。
|
|
422
|
-
* 服务端直接以字面量注册(
|
|
422
|
+
* 服务端直接以字面量注册(dsh-settings 对命名空间做编译期
|
|
423
423
|
* 语法校验,见 config.ts);浏览器半把它作为配置卡片的注册键
|
|
424
424
|
* (插件页配置卡片挂在 row/bundle config 槽位上,与命名空间解耦,
|
|
425
425
|
* 见 shared/config-slots),
|
|
@@ -630,7 +630,7 @@ ${extra}
|
|
|
630
630
|
* 外壳与基础控件走 @dsh-plus/shared/client 套件(CardChrome/TextField/CheckRow),
|
|
631
631
|
* 本文件只保留业务字段与保存/测试逻辑。交互对齐官方卡片:折叠/展开、
|
|
632
632
|
* staged draft、未保存标记、保存/放弃;另加「发送测试邮件」。
|
|
633
|
-
* 配置读写经 ctx.remote.settings 直连(
|
|
633
|
+
* 配置读写经 ctx.remote.settings 直连(connection.api.settings
|
|
634
634
|
* 已移除):value 为 schema 解析后的脱敏视图
|
|
635
635
|
* (smtp.pass 不出现,passConfigured 由 describe 的 secrets 探测),
|
|
636
636
|
* 保存经 settings.update 深合并(空 pass 剔除 = 保持不变)。
|
package/lib/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
71
71
|
maxBodyChars: z<number, number, "volatile-defined">;
|
|
72
72
|
dryRun: z<boolean, boolean, "volatile-defined">;
|
|
73
73
|
}>>, "plain">;
|
|
74
|
-
/** 活动字段形态(
|
|
74
|
+
/** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
|
|
75
75
|
type NotifyEmailConfigFields = Schemastery.TypeT<typeof Config>;
|
|
76
76
|
/** 平面配置形态(消费面的读取形态,由活动引用解包得到)。 */
|
|
77
77
|
type NotifyEmailConfig = UnwrapVolatile<NotifyEmailConfigFields>;
|
package/lib/index.js
CHANGED
|
@@ -74,9 +74,9 @@ function registerTestApi(ctx, service) {
|
|
|
74
74
|
//#region src/config.ts
|
|
75
75
|
/**
|
|
76
76
|
* 配置单一事实源:cordis 行级 Config(组合默认值,dev/prod patch 层可覆盖)
|
|
77
|
-
* 与 settings namespace
|
|
77
|
+
* 与 settings namespace(用户层=profile 行级覆盖层 cordis.patch.yml)
|
|
78
78
|
* 共用同一 schemastery schema。SMTP 密码走官方 credentials seam
|
|
79
|
-
* (refs/NOTIFY_EMAIL_SMTP_PASS),不进 settings
|
|
79
|
+
* (refs/NOTIFY_EMAIL_SMTP_PASS),不进 settings 用户层(存储规范)。
|
|
80
80
|
* @module notify-email/config
|
|
81
81
|
*/
|
|
82
82
|
/** SMTP 密码在官方 credentials seam 中的引用名。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/notify-email",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.43",
|
|
4
4
|
"description": "dsh-plus service+ui plugin: 任务结束/等待决策/出错时向指定邮箱发送邮件通知",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"nodemailer": "9.0.6",
|
|
35
|
-
"@dsh-plus/shared": "0.1.
|
|
35
|
+
"@dsh-plus/shared": "0.1.37"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.5-alpha.1",
|
package/src/client/card.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 外壳与基础控件走 @dsh-plus/shared/client 套件(CardChrome/TextField/CheckRow),
|
|
5
5
|
* 本文件只保留业务字段与保存/测试逻辑。交互对齐官方卡片:折叠/展开、
|
|
6
6
|
* staged draft、未保存标记、保存/放弃;另加「发送测试邮件」。
|
|
7
|
-
* 配置读写经 ctx.remote.settings 直连(
|
|
7
|
+
* 配置读写经 ctx.remote.settings 直连(connection.api.settings
|
|
8
8
|
* 已移除):value 为 schema 解析后的脱敏视图
|
|
9
9
|
* (smtp.pass 不出现,passConfigured 由 describe 的 secrets 探测),
|
|
10
10
|
* 保存经 settings.update 深合并(空 pass 剔除 = 保持不变)。
|
package/src/client/client.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*
|
|
8
8
|
* 类型说明:浏览器半只用到 slots/locale/remote 的很窄一面,
|
|
9
9
|
* scope 与基础控件走 @dsh-plus/shared/client 套件(收编自本插件原实现)。
|
|
10
|
-
* 配置读写经 ctx.remote.settings 直连(
|
|
11
|
-
* 已移除;
|
|
10
|
+
* 配置读写经 ctx.remote.settings 直连(connection.api.settings
|
|
11
|
+
* 已移除; settingsScope 服务亦删除(configForms 取代)——插件卡片自始
|
|
12
12
|
* 直连 remote.settings);自定义端点仅剩「发送测试邮件」(api.ts)。
|
|
13
13
|
* 卡片 key/rowId 约定见 @dsh-plus/shared/client/config-slots。
|
|
14
14
|
* @module @dsh-plus/notify-email/client
|
package/src/config-api.ts
CHANGED
package/src/config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 配置单一事实源:cordis 行级 Config(组合默认值,dev/prod patch 层可覆盖)
|
|
3
|
-
* 与 settings namespace
|
|
3
|
+
* 与 settings namespace(用户层=profile 行级覆盖层 cordis.patch.yml)
|
|
4
4
|
* 共用同一 schemastery schema。SMTP 密码走官方 credentials seam
|
|
5
|
-
* (refs/NOTIFY_EMAIL_SMTP_PASS),不进 settings
|
|
5
|
+
* (refs/NOTIFY_EMAIL_SMTP_PASS),不进 settings 用户层(存储规范)。
|
|
6
6
|
* @module notify-email/config
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ import type { UnwrapVolatile } from '@dsh-plus/shared'
|
|
|
11
11
|
|
|
12
12
|
import { SETTINGS_NS as NS_LITERAL } from './ns.ts'
|
|
13
13
|
|
|
14
|
-
/** settings
|
|
14
|
+
/** settings 命名空间(字面量即合法命名空间,编译期校验;webui 配置卡片与插件运行期读取同一份)。 */
|
|
15
15
|
export const SETTINGS_NS = NS_LITERAL
|
|
16
16
|
|
|
17
17
|
/** SMTP 密码在官方 credentials seam 中的引用名。 */
|
|
@@ -65,7 +65,7 @@ export const Config = z.object({
|
|
|
65
65
|
dryRun: z.boolean().description('仅记录日志不真实发送(开发调试用)').default(false).volatile(),
|
|
66
66
|
})
|
|
67
67
|
|
|
68
|
-
/** 活动字段形态(
|
|
68
|
+
/** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
|
|
69
69
|
export type NotifyEmailConfigFields = Schemastery.TypeT<typeof Config>
|
|
70
70
|
/** 平面配置形态(消费面的读取形态,由活动引用解包得到)。 */
|
|
71
71
|
export type NotifyEmailConfig = UnwrapVolatile<NotifyEmailConfigFields>
|
package/src/ns.ts
CHANGED
package/src/service.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NotifyEmailService:通知编排中枢。
|
|
3
|
-
* - 配置:
|
|
3
|
+
* - 配置:volatile 活动引用(loader 解析层并入用户层,GUI 写入原位提交
|
|
4
4
|
* 热生效),无 settings provider 时即 cordis 行级 config 本身;
|
|
5
5
|
* - 触发器:registerTrigger 是第三方插件的扩展接口;内置官方适配器同路径注册。
|
|
6
6
|
* - 投递:首个非空 EmailNotice 经 Mailer 发送;单个触发器抛错不影响其余。
|
|
@@ -32,9 +32,9 @@ function credentialsOf(ctx: Context): CredentialsSeamLike {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export class NotifyEmailService extends Service {
|
|
35
|
-
// cordis
|
|
36
|
-
//
|
|
37
|
-
//
|
|
35
|
+
// cordis 以普通静态属性读取插件级 inject(Context.inject 符号不存在,
|
|
36
|
+
// computed key 会静默变成字符串 'undefined' 使声明失效——曾因此出过回归:
|
|
37
|
+
// credentials 未就绪时构造读 ctx.credentials 抛
|
|
38
38
|
// "cannot get property credentials without inject",服务 fiber 静默 FAILED)。
|
|
39
39
|
static inject = ['agents', 'tools', 'credentials']
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ export class NotifyEmailService extends Service {
|
|
|
44
44
|
|
|
45
45
|
constructor(ctx: Context, config: NotifyEmailConfig | NotifyEmailConfigFields) {
|
|
46
46
|
super(ctx, 'notifyEmail')
|
|
47
|
-
//
|
|
47
|
+
// 替代已删除的 installSection/setSource:活动引用原位提交,现取即热。
|
|
48
48
|
this.current = () => unwrapVolatile(config)
|
|
49
49
|
const logger = ctx.logger('notify-email')
|
|
50
50
|
const audit = createJsonlAuditSink(pluginDataPath('notify-email', 'audit.jsonl'), (message) =>
|