@fa-software/semi2-dsh 0.0.13 → 0.0.14-preview.20260922051239

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.
@@ -31,6 +31,9 @@ export interface SecretsPeer {
31
31
  /** 自画像领域没有跨领域被调的成员(注入段由领域自己注册);占位同 SecretsPeer 口径。 */
32
32
  export interface SelfPortraitPeer {
33
33
  }
34
+ /** Redmine 领域没有跨领域被调的成员(挂载与卸载都由它自己的生命周期驱动);占位同 SecretsPeer 口径。 */
35
+ export interface RedminePeer {
36
+ }
34
37
  export interface SkillsPeer {
35
38
  /** 当前控制台技能目录(null = 没拿到权威目录,≠ 空目录)。 */
36
39
  skills(): RuntimeSkillFact[] | null;
@@ -89,6 +92,7 @@ export interface DomainPeers {
89
92
  workspace: WorkspacePeer;
90
93
  'default-model': DefaultModelPeer;
91
94
  'self-portrait': SelfPortraitPeer;
95
+ redmine: RedminePeer;
92
96
  }
93
97
  /** 一轮 boot 装配的共享上下文(编排层创建,按注册表顺序流经各领域)。 */
94
98
  export interface LoadRun {
@@ -170,4 +174,4 @@ export interface DomainPlugin {
170
174
  readonly inject?: readonly string[];
171
175
  apply(ctx: Context, config: DomainMountConfig): void;
172
176
  }
173
- export type DomainId = 'models' | 'secrets' | 'skills' | 'workspace' | 'default-model' | 'self-portrait';
177
+ export type DomainId = 'models' | 'secrets' | 'skills' | 'workspace' | 'default-model' | 'self-portrait' | 'redmine';
@@ -41,6 +41,14 @@ export interface RuntimeIdentity {
41
41
  username: string;
42
42
  displayName: string;
43
43
  }
44
+ /**
45
+ * Redmine 接缝事实:地址来自全局配置、密钥来自本人;两项齐备运行面才挂只读 MCP 服务。
46
+ * 与服务端契约同口径——任一为 null 就是权威「这一项没配」。
47
+ */
48
+ export interface RuntimeRedmineFact {
49
+ baseUrl: string | null;
50
+ apiKey: string | null;
51
+ }
44
52
  export interface Semi2ConfigState {
45
53
  status: ConfigStatus;
46
54
  /** 最近一次成功读取的时间(ISO),未成功过为 null。 */
@@ -61,6 +69,8 @@ export interface Semi2ConfigState {
61
69
  * 注入段按它现读——两种空都不注入。
62
70
  */
63
71
  selfPortrait: string | null;
72
+ /** Redmine 地址 + 本人密钥:null = 没拿到(不改变现状),任一字段 null = 权威未配置(不挂服务)。 */
73
+ redmine: RuntimeRedmineFact | null;
64
74
  /** 已登记工作区命中的项目(含生效绑定,按 slug 现取并缓存);会话按 cwd 经 `projectFor` 匹配。 */
65
75
  projects: RuntimeProject[];
66
76
  /** 已登记工作区(dsh 工作区 → git 项目映射);未接入工作区服务时为单条隐式条目。 */
@@ -1,5 +1,15 @@
1
1
  import type { OrchestratorInternals } from './orchestrator.js';
2
2
  import type { RuntimeEventReport } from '../api/index.js';
3
+ /** 上报结果:调用方(NPC 面的 `semi2Audit` 出口)要据此记一行「未接受」。 */
4
+ export interface ReportOutcome {
5
+ ok: boolean;
6
+ code: string | null;
7
+ }
8
+ /**
9
+ * 上报一条运行面事件并回结果:本面标识(`face`)与运行面契约里的任务引用在这里补齐,
10
+ * 调用方(会话订阅 / 适配器)不必各自知道这两个事实从哪来。
11
+ */
12
+ export declare function reportEventResult(engine: OrchestratorInternals, event: RuntimeEventReport): Promise<ReportOutcome>;
3
13
  /** 生命周期事件:动作名与结果名都用 hub SDL 的枚举名,两侧不各维护一张映射表。 */
4
14
  export declare function reportEvent(engine: OrchestratorInternals, event: RuntimeEventReport): Promise<void>;
5
15
  /** 本面标识:契约里有就用它;宿主直跑没有契约,记 host。 */
@@ -0,0 +1,8 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { OrchestratorInternals } from './orchestrator.js';
3
+ /**
4
+ * 挂上会话订阅:dsh 的会话是事件源的(`session/created` / `session/disposed`),
5
+ * 本插件只旁听,不改会话行为。`sessions` 服务缺席时整块跳过。
6
+ * 返回订阅光纤(可 await 到就绪),测试据它确认监听已挂上。
7
+ */
8
+ export declare function installSessionReporting(engine: OrchestratorInternals, ctx?: Context): PromiseLike<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fa-software/semi2-dsh",
3
- "version": "0.0.13",
3
+ "version": "0.0.14-preview.20260922051239",
4
4
  "type": "module",
5
5
  "description": "Semi2 单插件:semi2-hub 配置引导 + 公共 Web 能力,并挂载 CodeGraph 官方 MCP 服务。",
6
6
  "main": "lib/index.js",
@@ -44,7 +44,9 @@
44
44
  "@deepseek-ai/dsh-client-connection": "^0.1.6-alpha.2",
45
45
  "@deepseek-ai/dsh-credentials": "^0.1.6-alpha.2",
46
46
  "@deepseek-ai/dsh-host-webserver": "^0.1.6-alpha.2",
47
+ "@deepseek-ai/dsh-mcp-client": "^0.1.6-alpha.2",
47
48
  "@deepseek-ai/dsh-settings": "^0.1.6-alpha.2",
49
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
48
50
  "@deepseek-ai/dsh-skill": "^0.1.6-alpha.2",
49
51
  "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
50
52
  "@deepseek-ai/schemastery": "^3.18.1"
@@ -65,9 +67,15 @@
65
67
  "@deepseek-ai/dsh-host-webserver": {
66
68
  "optional": true
67
69
  },
70
+ "@deepseek-ai/dsh-mcp-client": {
71
+ "optional": true
72
+ },
68
73
  "@deepseek-ai/dsh-settings": {
69
74
  "optional": true
70
75
  },
76
+ "@deepseek-ai/dsh-session": {
77
+ "optional": true
78
+ },
71
79
  "@deepseek-ai/dsh-skill": {
72
80
  "optional": true
73
81
  },