@dsh-plus/notify-email 0.1.17 → 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 +14 -14
- package/lib/style.css +101 -1269
- package/package.json +13 -13
- package/src/index.ts +5 -1
- package/src/service.ts +11 -6
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,17 @@ function installTurnEndWatcher(ctx, service, resolveConfig) {
|
|
|
423
423
|
}
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region src/service.ts
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
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
|
-
/** credentials seam 最小面提取(缺席返回 undefined;Mailer 自行降级行级密码)。 */
|
|
426
|
+
/** credentials seam 最小面:inject 硬声明保证时序(credentials-local init 为异步,
|
|
427
|
+
* 构造期探测 get() 可能早于其激活而拿到 undefined,导致密码解析静默降级)。 */
|
|
435
428
|
function credentialsOf(ctx) {
|
|
436
|
-
|
|
437
|
-
return found !== null && typeof found === "object" ? found : void 0;
|
|
429
|
+
return ctx.credentials;
|
|
438
430
|
}
|
|
439
431
|
var NotifyEmailService = class extends Service {
|
|
440
|
-
static
|
|
432
|
+
static inject = [
|
|
433
|
+
"agents",
|
|
434
|
+
"tools",
|
|
435
|
+
"credentials"
|
|
436
|
+
];
|
|
441
437
|
triggers = [];
|
|
442
438
|
mailer;
|
|
443
439
|
current;
|
|
@@ -514,7 +510,11 @@ var NotifyEmailService = class extends Service {
|
|
|
514
510
|
//#endregion
|
|
515
511
|
//#region src/index.ts
|
|
516
512
|
const name = "dsh-plus-notify-email";
|
|
517
|
-
const inject = [
|
|
513
|
+
const inject = [
|
|
514
|
+
"agents",
|
|
515
|
+
"tools",
|
|
516
|
+
"credentials"
|
|
517
|
+
];
|
|
518
518
|
function apply(ctx, config) {
|
|
519
519
|
ctx.plugin(NotifyEmailService, config);
|
|
520
520
|
}
|