@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-plus/notify-email",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "dsh-plus service+ui plugin: 任务结束/等待决策/出错时向指定邮箱发送邮件通知",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -31,30 +31,30 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@dsh-plus/shared": "0.1.12",
35
- "nodemailer": "9.0.6"
34
+ "nodemailer": "9.0.6",
35
+ "@dsh-plus/shared": "0.1.13"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/cordis": "^4.0.2",
39
- "@deepseek-ai/dsh-home-paths": "*",
40
- "@deepseek-ai/dsh-settings": "*",
39
+ "@deepseek-ai/dsh-home-paths": "^0.1.5-alpha.2",
40
+ "@deepseek-ai/dsh-settings": "^0.1.5-alpha.2",
41
41
  "@deepseek-ai/schemastery": "^3.18.2",
42
- "@deepseek-ai/dsh-credentials": "*"
42
+ "@deepseek-ai/dsh-credentials": "^0.1.5-alpha.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@deepseek-ai/cordis": "4.0.2",
46
- "@deepseek-ai/dsh-agent": "0.1.5-alpha.1",
47
- "@deepseek-ai/dsh-home-paths": "0.1.5-alpha.1",
48
- "@deepseek-ai/dsh-host-webserver": "0.1.5-alpha.1",
49
- "@deepseek-ai/dsh-llm": "0.1.5-alpha.1",
50
- "@deepseek-ai/dsh-session": "0.1.5-alpha.1",
51
- "@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
52
- "@deepseek-ai/dsh-tools": "0.1.5-alpha.1",
46
+ "@deepseek-ai/dsh-agent": "0.1.5-alpha.2",
47
+ "@deepseek-ai/dsh-home-paths": "0.1.5-alpha.2",
48
+ "@deepseek-ai/dsh-host-webserver": "0.1.5-alpha.2",
49
+ "@deepseek-ai/dsh-llm": "0.1.5-alpha.2",
50
+ "@deepseek-ai/dsh-session": "0.1.5-alpha.2",
51
+ "@deepseek-ai/dsh-settings": "0.1.5-alpha.2",
52
+ "@deepseek-ai/dsh-tools": "0.1.5-alpha.2",
53
53
  "@deepseek-ai/schemastery": "3.18.2",
54
54
  "@types/nodemailer": "8.0.1",
55
55
  "@types/react": "~18.3.31",
56
56
  "react": "^18.2.0",
57
- "@deepseek-ai/dsh-credentials": "0.1.5-alpha.1"
57
+ "@deepseek-ai/dsh-credentials": "0.1.5-alpha.2"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
package/src/index.ts CHANGED
@@ -12,7 +12,11 @@ import { NotifyEmailService } from './service.ts'
12
12
 
13
13
  export const name = 'dsh-plus-notify-email'
14
14
 
15
- export const inject = ['agents', 'tools'] as const
15
+ // 行级 inject:loader 须等这些服务激活后才应用本行。credentials 必须在列:
16
+ // 服务构造期即读取 credentials seam(行级 inject 是 fiber 链上属性解析的
17
+ // 声明来源,服务类 static inject 在 cordis 4.0.2 的类插件挂载里同样生效,
18
+ // 两处同声明互为兜底)。
19
+ export const inject = ['agents', 'tools', 'credentials'] as const
16
20
 
17
21
  export { NotifyEmailService } from './service.ts'
18
22
 
package/src/service.ts CHANGED
@@ -6,7 +6,8 @@
6
6
  * - 投递:首个非空 EmailNotice 经 Mailer 发送;单个触发器抛错不影响其余。
7
7
  * @module @dsh-plus/notify-email
8
8
  */
9
- import { Context, Service } from '@deepseek-ai/cordis'
9
+ import type { Context } from '@deepseek-ai/cordis'
10
+ import { Service } from '@deepseek-ai/cordis'
10
11
  import type {} from '@deepseek-ai/dsh-settings'
11
12
  import { pluginDataPath } from '@dsh-plus/shared'
12
13
  import { createJsonlAuditSink } from './audit.ts'
@@ -31,7 +32,11 @@ function credentialsOf(ctx: Context): CredentialsSeamLike {
31
32
  }
32
33
 
33
34
  export class NotifyEmailService extends Service {
34
- static [Context.inject] = ['agents', 'tools', 'credentials']
35
+ // cordis 4.0.2 以普通静态属性读取插件级 inject(Context.inject 符号在该版本
36
+ // 不存在,computed key 会静默变成字符串 'undefined' 使声明失效——0.1.18 的
37
+ // 553 回归即源于此:credentials 未就绪时构造读 ctx.credentials 抛
38
+ // "cannot get property credentials without inject",服务 fiber 静默 FAILED)。
39
+ static inject = ['agents', 'tools', 'credentials']
35
40
 
36
41
  private readonly triggers: NotifyTrigger[] = []
37
42
  private readonly mailer: Mailer