@shgroup/dsh-serenity-hooks 1.104.0 → 1.107.0
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/README.md +4 -3
- package/dsh.plugin.json +2 -3
- package/lib/{profile-Dpg3wYO5.js → bind-file-B0TuOP89.js} +1 -333
- package/lib/{ccc-B-h_A7uc.js → ccc-BmpE3cQz.js} +64 -12
- package/lib/{ccc-roots-BIdg0EyM.js → ccc-roots-DPMwBywc.js} +15 -3
- package/lib/{channels-BItMJUO8.js → channels-Dty_NIl_.js} +2 -146
- package/lib/contract-BiNzzd77.js +2197 -0
- package/lib/host/access.d.ts +30 -0
- package/lib/index.js +176 -6355
- package/lib/invariant.js +1 -2
- package/lib/kernel/ccc.d.ts +60 -13
- package/lib/kernel/invariant.d.ts +2 -2
- package/lib/message-source-BTIe2cVO.js +254 -0
- package/lib/observation-BWpkA865.js +210 -0
- package/lib/profile-BjBn_-be.js +336 -0
- package/lib/{route-CmEoKp9w.js → route-reyv8qcB.js} +2 -2
- package/lib/rules-BLkYTPUy.js +261 -0
- package/lib/scheduler-B0pB9mxI.js +3603 -0
- package/lib/seams/guards.d.ts +0 -4
- package/lib/{service-Cndtf7q4.js → service-Z3aSR1cn.js} +1 -1
- package/lib/service-xvjwsX3p.js +249 -0
- package/lib/{session-CaNqSHVB.js → session-BlgUdKH4.js} +55 -6
- package/lib/settings-DY4_DYYY.js +145 -0
- package/lib/subscriptions-CyrfNpcG.js +273 -0
- package/lib/tools/diag/service.d.ts +74 -24
- package/lib/tools/kit/service.d.ts +1 -1
- package/lib/tools/msm/service.d.ts +2 -2
- package/lib/trajectory/subscriptions.d.ts +170 -0
- package/package.json +2 -2
- package/lib/message-source-CKJPJCzc.js +0 -513
- package/lib/tools/diag/index.d.ts +0 -25
package/lib/host/access.d.ts
CHANGED
|
@@ -96,6 +96,36 @@ export declare function hostWeb(ctx: unknown): HostWeb | undefined;
|
|
|
96
96
|
* (0.2.1-rc.1 起 `start` 消失、改由 `startActivation` 承担)。将来若再有委派需求,
|
|
97
97
|
* 这份对照仍是唯一说明书 ⇒ **知识移到 `host/contract.ts` 的契约条目里,代码不留。**
|
|
98
98
|
*/
|
|
99
|
+
/**
|
|
100
|
+
* `ctx.agentDefaultModel`(**刻意不进 `inject`**,v1.105.0)。
|
|
101
|
+
*
|
|
102
|
+
* 契约原文(`dsh-agent-default-model/lib/types/index.d.ts` 逐字):
|
|
103
|
+
* *"Default model selection for Agents created **without an explicit model**."*
|
|
104
|
+
* ⇒ **这正是「没指定时该用什么」的权威出处**,不该由我们另造一份真相源。
|
|
105
|
+
*
|
|
106
|
+
* 为什么不进 `inject`:它是**可选**服务 —— 进了 inject 就把"可选"变"必需",
|
|
107
|
+
* 服务缺失会让整个 fiber 挂起(同 ACP 面 `resolveAcpSelection` 的既有裁决)。
|
|
108
|
+
* 本仓先例:`host/access.ts` 的教训 —— cordis 对未声明 inject 的服务名
|
|
109
|
+
* **直接属性读会抛错**,故必须走 `hostInjected`(先属性读、抛错回落 `ctx.get`)。
|
|
110
|
+
*/
|
|
111
|
+
interface HostAgentDefaultModel {
|
|
112
|
+
/** 返回 `{ provider, model, reasoningEffort? }`(detached) */
|
|
113
|
+
currentSelection?: () => {
|
|
114
|
+
provider?: string;
|
|
115
|
+
model?: string;
|
|
116
|
+
reasoningEffort?: string;
|
|
117
|
+
} | undefined;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 宿主默认模型选择(**没显式指定模型时**该用的那个)。
|
|
121
|
+
*
|
|
122
|
+
* 🔴 为什么需要这个读取器(v1.105.0,P0 回归修复):
|
|
123
|
+
* `agents.create` **不传** `agentOptions` ⇒ `agent.options.model === undefined`
|
|
124
|
+
* ⇒ 宿主的 persona 模板 `powered by the {{model}} model` **严格插值抛错** ⇒ 整轮失败。
|
|
125
|
+
* ⇒ 「不传」不等于「安全」:**下游有依赖方要求这个值必须存在**。
|
|
126
|
+
* 详见 `trajectory/session.ts` 的 `resolveAgentModel`。
|
|
127
|
+
*/
|
|
128
|
+
export declare function hostAgentDefaultModel(ctx: unknown): HostAgentDefaultModel | undefined;
|
|
99
129
|
/**
|
|
100
130
|
* 会话 cwd 列表(live 会话;形状不符时返回空数组而非抛错)
|
|
101
131
|
*/
|