@sema-agent/client-core 0.11.9 → 0.11.11
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 +2 -2
- package/dist/hitl/askGateWire.d.ts +3 -3
- package/dist/hitl/askGateWire.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/model/providerPresets.js +9 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Renamed from **`@sema-agent/wire-cc-adapter`** (0.1.x, deprecated — see *Migra
|
|
|
23
23
|
|
|
24
24
|
## Scope
|
|
25
25
|
|
|
26
|
-
**Version:** 0.11.
|
|
26
|
+
**Version:** 0.11.11
|
|
27
27
|
|
|
28
28
|
- **Today** — the adapter seam, the whole `adapt()` pipeline (all 14 A-layer arms plus the
|
|
29
29
|
B/D/E tool-card layers), the notification/caps/model families, the adapter kernel (stream driver
|
|
@@ -53,7 +53,7 @@ Renamed from **`@sema-agent/wire-cc-adapter`** (0.1.x, deprecated — see *Migra
|
|
|
53
53
|
`SseIdleError`, `probeHealth`, `APIError` and `TaskStopConflictError` are imported as values in
|
|
54
54
|
five modules, and the browser bundle really bundles the SDK through (the portability guard would
|
|
55
55
|
exit 3 rather than quietly mark it external).
|
|
56
|
-
- The declared floor is `>=0.
|
|
56
|
+
- The declared floor is `>=2.0.0`, and it is *witnessed*: the guard checks that an actually
|
|
57
57
|
installed SDK at that line still exports every value-level symbol this package imports and still
|
|
58
58
|
declares `TaskStats.costMicroUsd` (the key `costOrNull` reads). A floor nobody ever ran is a
|
|
59
59
|
promise, not a contract.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* 2. `require('../utils/messages.js').REJECT_MESSAGE` 的 lazy require + 内联字面量兜底
|
|
9
9
|
* → 直接用常量 `HITL_REJECT_MESSAGE`(**逐字**同一串)。lazy require 存在的理由是「wire 模块
|
|
10
10
|
* 别拉 React/ink 图」,在包里没有那张图 ⇒ 理由消失,只留常量。
|
|
11
|
-
* 🔴
|
|
12
|
-
*
|
|
11
|
+
* 🔴 常量锁(0.11.10 换锚):CC 原文在 pure 门 B7 段有**包内冻结字面量**(无条件,不依赖外部树);
|
|
12
|
+
* 壳树在场时再加一条**全树扫描**——壳里每一处 `REJECT_MESSAGE` 声明都必须逐字节等于它。
|
|
13
13
|
* 3. `getAppStateStoreRef()` 直写 `AppState.notifications` → `HitlHostSurface` 口
|
|
14
14
|
* (`showNotice` / `clearNoticeIfCurrent`)—— `AppState` 是**端的状态形状**。
|
|
15
15
|
* 同理 `surfaceClassifierDeny`(footer 通知 + /permissions Recent Denials 记账,两者都是壳资产)
|
|
@@ -84,7 +84,7 @@ export declare function _resetHitlHostSurfaceForTest(): void;
|
|
|
84
84
|
/**
|
|
85
85
|
* CC `utils/messages.ts` 的 `REJECT_MESSAGE` **逐字**(搬迁差分 2)。deny 后重放 tool_end 的
|
|
86
86
|
* render 面 stamp 用 —— vendored `renderToolUseRejectedMessage` 渲 `User rejected <op> to <path>`。
|
|
87
|
-
* 🔴
|
|
87
|
+
* 🔴 pure 门 B7 段:包内冻结字面量(无条件)+ 壳树全树扫描「每一处声明都逐字节相同」(壳树缺席=跳过)。
|
|
88
88
|
*/
|
|
89
89
|
export declare const HITL_REJECT_MESSAGE = "The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.";
|
|
90
90
|
/** 本桥消费的 wire 面(@sema-ai/sdk AgentClient 的结构切片,mock 可注入)。 */
|
package/dist/hitl/askGateWire.js
CHANGED
|
@@ -30,7 +30,7 @@ function surface() {
|
|
|
30
30
|
/**
|
|
31
31
|
* CC `utils/messages.ts` 的 `REJECT_MESSAGE` **逐字**(搬迁差分 2)。deny 后重放 tool_end 的
|
|
32
32
|
* render 面 stamp 用 —— vendored `renderToolUseRejectedMessage` 渲 `User rejected <op> to <path>`。
|
|
33
|
-
* 🔴
|
|
33
|
+
* 🔴 pure 门 B7 段:包内冻结字面量(无条件)+ 壳树全树扫描「每一处声明都逐字节相同」(壳树缺席=跳过)。
|
|
34
34
|
*/
|
|
35
35
|
export const HITL_REJECT_MESSAGE = "The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.";
|
|
36
36
|
function rejectMessageForRender() {
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* ② **P4 残件三**:`hooksWireCaps`(SettingsPort 的第一个真消费者;port 缺席 = 整体 fail-closed)·
|
|
46
46
|
* `liveInitToolFace`(凭证换 §8-2 的 `resolveWireAuth`,三条动态 import 转静态)·
|
|
47
47
|
* **model 数据表**(`model/providerPresets.{ts,json}` + `modelFamilies.json` —— `modelBudgetRule`
|
|
48
|
-
* 封顶① 的 `perModelCap`
|
|
48
|
+
* 封顶① 的 `perModelCap` 的唯一来源;单一真源三锚见 model/providerPresets.ts 头注);
|
|
49
49
|
* ③ **P5**:T32/T34/T47/T48/T49(整条进包)与 T35/T36/T44(拆)逐条核实并配断言,新出
|
|
50
50
|
* `compensations.ts` 登记表(自检口 `compensationSplitViolations()` 恒应为空)+ **P1-2 归属回落
|
|
51
51
|
* 定案**(FIFO 回落**不删** = tolerate-absent 保护臂;typed 双键在场恒赢已成对反钉;退役条件
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* ② **P4 残件三**:`hooksWireCaps`(SettingsPort 的第一个真消费者;port 缺席 = 整体 fail-closed)·
|
|
46
46
|
* `liveInitToolFace`(凭证换 §8-2 的 `resolveWireAuth`,三条动态 import 转静态)·
|
|
47
47
|
* **model 数据表**(`model/providerPresets.{ts,json}` + `modelFamilies.json` —— `modelBudgetRule`
|
|
48
|
-
* 封顶① 的 `perModelCap`
|
|
48
|
+
* 封顶① 的 `perModelCap` 的唯一来源;单一真源三锚见 model/providerPresets.ts 头注);
|
|
49
49
|
* ③ **P5**:T32/T34/T47/T48/T49(整条进包)与 T35/T36/T44(拆)逐条核实并配断言,新出
|
|
50
50
|
* `compensations.ts` 登记表(自检口 `compensationSplitViolations()` 恒应为空)+ **P1-2 归属回落
|
|
51
51
|
* 定案**(FIFO 回落**不删** = tolerate-absent 保护臂;typed 双键在场恒赢已成对反钉;退役条件
|
|
@@ -250,7 +250,8 @@ export * from './hooksWireCaps.js';
|
|
|
250
250
|
export * from './liveInitToolFace.js';
|
|
251
251
|
// 🔴 model 数据表 —— `modelBudgetRule.defaultMaxTokensFor()` 的封顶① 参数 `perModelCap` 的**唯一**
|
|
252
252
|
// 来源。表不在包里,那条中央规则在 web/桌面上恒拿不到 cap ⇒ 对 deepseek-chat(8192)这类模型
|
|
253
|
-
// 超发 ⇒ 网关 400
|
|
253
|
+
// 超发 ⇒ 网关 400。搬迁期那条「与壳树副本逐字节相等」的漂移锁 0.11.10 已退役(前提消失=僵尸腿),
|
|
254
|
+
// 继任锚:pure 门校 dist 与 src 语义等同 + 包内/壳树单一真源,public-surface 门校真实发布清单。
|
|
254
255
|
export * from './model/providerPresets.js';
|
|
255
256
|
// ── B7 批:HITL 族(2026-07-27,设计稿 §3 B7)────────────────────────────────────────────────
|
|
256
257
|
// 🔴 `hitl/hitlBridge.ts` 里的 **D-1 两元组 verbatim 回显**是安全不变量(`bindingOf` 绝不重算
|
|
@@ -7,11 +7,15 @@
|
|
|
7
7
|
* 在 web/桌面上**永远拿不到 cap**,`defaultMaxTokensFor(ctx)` 恒走 min(base, ctx/4),
|
|
8
8
|
* 对 deepseek-chat(cap 8192)这类模型直接超发 ⇒ 网关 400。这不是「少个装饰」。
|
|
9
9
|
*
|
|
10
|
-
* 🔴
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* 🔴 **搬迁期的双份漂移锁已退役(0.11.10)**:搬迁期壳树那两个 JSON 还在,pure 门当时有一条
|
|
11
|
+
* **byte-identity 断言**(本包 `src/model/*.json` 与壳树 `src/sema/onboard/*.json` 逐字节相等)。
|
|
12
|
+
* 壳侧 shim 落地(那两个 JSON 删除、`providerPresets.ts` 改 re-export 本包)之后,那条断言的
|
|
13
|
+
* **前提消失**了 —— 它从此每跑必打 DEGRADED 且**永远不会再跑**(校一个已经不存在的物,再自我
|
|
14
|
+
* 降级放过 = 僵尸腿)。继任不变量不是「两份一致」,是「**只有一份、而且用户拿到的就是它**」:
|
|
15
|
+
* · pure 门:`dist/model/*.json` 与 src **语义**等同(tsc emit 会重排缩进,跨 emit 边界只能校
|
|
16
|
+
* 语义)+ 运行时表的 id 序列 === 表本身 + src 树里各恰好一份 + 壳树零副本/shim 仍 re-export;
|
|
17
|
+
* · public-surface 门:`npm pack` 的**真实发布清单**里必须有这两个 JSON(换 bundler / 一行
|
|
18
|
+
* .npmignore 就能让数据表静悄悄不进 tarball,而类型与单测照样全绿)。
|
|
15
19
|
*
|
|
16
20
|
* ── 以下为原文件的领域说明(逐字保留)────────────────────────────────────────────────────────
|
|
17
21
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/client-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.11",
|
|
4
4
|
"description": "Client-side session runtime shared by every sema human client (TUI / web / desktop): sema wire frames (AgentEvent) -> CC session vocabulary (SDKMessage) with dual-plane output (transcript/chrome), deterministic transcript ids, lane discipline as a type, and the notification/dedup ledgers. Every CC-skin shape is collected here so the wire itself stays neutral. Blackboard [1832] design axioms; [1651]/[1652]/[1653] signed seam design. Renamed from @sema-agent/wire-cc-adapter (0.1.x).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@sema-agent/agent-types": ">=0.2.0",
|
|
31
|
-
"@sema-agent/sdk": ">=0.
|
|
31
|
+
"@sema-agent/sdk": ">=2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@sema-agent/agent-types": "^0.2.0",
|
|
35
|
-
"@sema-agent/sdk": "^
|
|
35
|
+
"@sema-agent/sdk": "^2.0.0",
|
|
36
36
|
"esbuild": "^0.27.4",
|
|
37
37
|
"typescript": "^6.0.2"
|
|
38
38
|
}
|