@dsh-plus/notify-email 0.1.18 → 0.1.19
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 +525 -59707
- package/lib/index.d.ts +2 -2
- package/lib/index.js +7 -11
- package/lib/style.css +101 -1269
- package/package.json +14 -14
- package/src/index.ts +5 -1
- package/src/service.ts +7 -2
package/lib/index.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
declare class NotifyEmailService extends Service {
|
|
120
|
-
static
|
|
120
|
+
static inject: string[];
|
|
121
121
|
private readonly triggers;
|
|
122
122
|
private readonly mailer;
|
|
123
123
|
private current;
|
|
@@ -148,7 +148,7 @@ declare class NotifyEmailService extends Service {
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/index.d.ts
|
|
150
150
|
declare const name = "dsh-plus-notify-email";
|
|
151
|
-
declare const inject: readonly ["agents", "tools"];
|
|
151
|
+
declare const inject: readonly ["agents", "tools", "credentials"];
|
|
152
152
|
declare function apply(ctx: Context, config: NotifyEmailConfig): void;
|
|
153
153
|
//#endregion
|
|
154
154
|
export { Config, type DecisionCall, type EmailNotice, NotifyEmailService, type NotifyTrigger, type TurnEndInfo, apply, inject, name };
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
|
-
import {
|
|
2
|
+
import { Service } from "@deepseek-ai/cordis";
|
|
3
3
|
import { pluginDataPath } from "@dsh-plus/shared";
|
|
4
4
|
import { appendFile, mkdir } from "node:fs/promises";
|
|
5
5
|
import { dirname } from "node:path";
|
|
@@ -423,21 +423,13 @@ function installTurnEndWatcher(ctx, service, resolveConfig) {
|
|
|
423
423
|
}
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region src/service.ts
|
|
426
|
-
/**
|
|
427
|
-
* NotifyEmailService:通知编排中枢。
|
|
428
|
-
* - 配置:settings.installSection 接入 settings 用户层($DSH_HOME/settings.yaml,热生效),
|
|
429
|
-
* 无 settings provider 时退化为 cordis 行级 config。
|
|
430
|
-
* - 触发器:registerTrigger 是第三方插件的扩展接口;内置官方适配器同路径注册。
|
|
431
|
-
* - 投递:首个非空 EmailNotice 经 Mailer 发送;单个触发器抛错不影响其余。
|
|
432
|
-
* @module @dsh-plus/notify-email
|
|
433
|
-
*/
|
|
434
426
|
/** credentials seam 最小面:inject 硬声明保证时序(credentials-local init 为异步,
|
|
435
427
|
* 构造期探测 get() 可能早于其激活而拿到 undefined,导致密码解析静默降级)。 */
|
|
436
428
|
function credentialsOf(ctx) {
|
|
437
429
|
return ctx.credentials;
|
|
438
430
|
}
|
|
439
431
|
var NotifyEmailService = class extends Service {
|
|
440
|
-
static
|
|
432
|
+
static inject = [
|
|
441
433
|
"agents",
|
|
442
434
|
"tools",
|
|
443
435
|
"credentials"
|
|
@@ -518,7 +510,11 @@ var NotifyEmailService = class extends Service {
|
|
|
518
510
|
//#endregion
|
|
519
511
|
//#region src/index.ts
|
|
520
512
|
const name = "dsh-plus-notify-email";
|
|
521
|
-
const inject = [
|
|
513
|
+
const inject = [
|
|
514
|
+
"agents",
|
|
515
|
+
"tools",
|
|
516
|
+
"credentials"
|
|
517
|
+
];
|
|
522
518
|
function apply(ctx, config) {
|
|
523
519
|
ctx.plugin(NotifyEmailService, config);
|
|
524
520
|
}
|