@sema-agent/client-core 0.71.0 → 0.71.2
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/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/dist/adapt/textStream.js +18 -7
- package/dist/decideReceipt.js +3 -3
- package/dist/hitl/toolApprovalWire.d.ts +15 -4
- package/dist/hitl/toolApprovalWire.js +11 -0
- package/docs/INTEGRATION-CLIENTS.md +56 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -49,6 +49,23 @@
|
|
|
49
49
|
> 挡住 ⇒ 本批把它机械化——④a0 对 `pending` 行**要求段头已是日期形**(`(未发布)` 直接红),阶段一
|
|
50
50
|
> commit 漏转在发布前就红,不再靠人记。
|
|
51
51
|
|
|
52
|
+
## 0.71.2(2026-09-17)
|
|
53
|
+
|
|
54
|
+
> 主题:接入方 1.0.117 黑盒验收两票归包(B-132 / B-133)。**patch**:零型面变化、公面 986 不变、peer 不动;运行期只改两句拒体人话 + 一条「说不出」守卫。接入面 §44。
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- **CC-28(B-132)decide 拒体人话去内部措辞**:`decideRefusalFromError` 的两句(`decide.workflow_host_unknown` / `decide.workflow_remember_unsupported`)与闭集内无专句时的兜底句此前带「workflow run / lane」这类内部车道词;改成用户可执行的一句(「no session is attached to this run to receive the decision …」/「this run cannot remember the decision for the session …」/ 兜底「the engine refused this decision; the approval is still pending and can be decided again」),`resendable` 与结构位不变。同族排查:`conflict.resume_context_unavailable` 在本包源码与 dist **零命中**(不是本包铸的句子);本包内用户面句再无 workflow / lane 措辞。
|
|
59
|
+
- **CC-29(B-133)`committedUuids` 唯一性**:行 uuid 由 wire 帧 uuid 派生,只有上游帧 uuid 重复才会让两条已提交行同 uuid;端按 uuid 找行,重复 = 归属**说不出** ⇒ `committedUuids` / `committedUuid` / `committedRows` 整键缺席(零经手形 f),且不清尾巴、不同步补差账(退回零经手行为)。不去重不取首(任一种都是替上游湮灭「两条行一个身份」)。§42y ① (b) 补唯一性一句;TSA 门 Z10 三格(真实构造重复 uuid)+ D10 四格(同一消息账两条重复行 + 尾段:三键缺席 / 补差账不动 / 尾段照提 —— 发车前对抗复审抓出「守卫只清三键、endsWith 回退仍清尾同步」后补),红先绿后。
|
|
60
|
+
|
|
61
|
+
## 0.71.1(2026-09-17)
|
|
62
|
+
|
|
63
|
+
> 主题:接入文档打回一条(接入方 1.0.117 实测):`readRootCandidate` 帧→卡透传位。**patch**:型面纯 additive(`ApprovalCardRequest.readRootCandidate?` + 新导出型 `ReadRootCandidateView`;窄读器不出公面),运行期零 BREAKING;公面 986 不变。接入面 §43。
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- 🔴 **CC-27 `ApprovalCardRequest.readRootCandidate?: ReadRootCandidateView`(帧 → 卡原样透传)**:0.71.0 只把 `readRootCandidate` 镜像进 `TOOL_APPROVAL_FRAME_KEYS_MIRROR`(键名对账),卡入参零该位、零投影口写进卡视图,而 §42 S-8「端要做什么」列与 §42y ④ 写「审批卡在场渲一格 add-dir」—— 端侧结构上做不到,文档与 dist 不符(接入方按接入文档宪法打回)。修后 live 帧腿窄读:`dir` 非空串 ∧ `clearsThisAsk === true` ⇒ 新铸两键形上卡(`dir` 逐字不加工、多余成员不过境);缺席 / 坏形 ⇒ 键不置(不铸空对象、不折 false)。durable `ApprovalCard` 无此位(sdk `APPROVAL_CARD_KEYS` 两版相同),回放腿缺席。§42 S-8 / §42y ④ 订正为「0.71.0 = 只镜像键名,卡零该位;0.71.1 起卡上可读」。pure 门 CC-27a–d(在场原样 / 缺席不铸 / 六种坏形不置 / 多余键不过境且非原对象引用),红先绿后;变异「窄读器返回原对象」⇒ CC-27d 红。
|
|
68
|
+
|
|
52
69
|
## 0.71.0(2026-09-16)
|
|
53
70
|
|
|
54
71
|
> 主题:**core 7.20.0 提货**(闭集 +5 = 六十四码 / `requestedBudgetBytes` 删 ⇒ `laneClamped` 整只退役)+ CC-08 提货批(sdk 9.6.0)+ CC-16 + `MAX_AGENT_SKILLS` 常量删。**minor**:型面 BREAKING = `SkillsListingTruncatedFactsView` 删两键 + `MAX_AGENT_SKILLS` 删。接入面 §42。
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Renamed from **`@sema-agent/wire-cc-adapter`** (0.1.x, deprecated — see *Migra
|
|
|
35
35
|
|
|
36
36
|
## Scope
|
|
37
37
|
|
|
38
|
-
**Version:** 0.71.
|
|
38
|
+
**Version:** 0.71.2
|
|
39
39
|
|
|
40
40
|
- **Today** — the adapter seam, the whole `adapt()` pipeline (all 14 A-layer arms plus the
|
|
41
41
|
B/D/E tool-card layers), the notification/caps/model families, the adapter kernel (stream driver
|
package/dist/adapt/textStream.js
CHANGED
|
@@ -373,19 +373,26 @@ export function createTextStream(ctx, idOf) {
|
|
|
373
373
|
const committedPrefixLen = verdict.committedPrefixLen;
|
|
374
374
|
const committedPrefixDiverged = verdict.committedPrefixDiverged;
|
|
375
375
|
// CC-16:本窗口已提交行的归属一次交全(用过即清;轮换也清)。`[]` 是正面事实,不是缺席。
|
|
376
|
-
const
|
|
376
|
+
const rowsAll = committedTextRows;
|
|
377
377
|
committedTextRows = [];
|
|
378
|
+
// B-133 / CC-29(0.71.2):行 uuid 由 wire 帧 uuid 派生,只有上游帧 uuid 重复才会让两条行同 uuid;端按 uuid 找行,
|
|
379
|
+
// 重复 = 归属**说不出** ⇒ 整键缺席(形 f),且不交 committedRows、不清尾巴不同步账(退回零经手行为)。
|
|
380
|
+
// 不去重、不取首:任一种都是替上游把「两条行一个身份」这件事湮灭掉。
|
|
381
|
+
const uuidsUnique = new Set(rowsAll.map((r) => r.uuid)).size === rowsAll.length;
|
|
382
|
+
const rows = uuidsUnique ? rowsAll : [];
|
|
378
383
|
const rowUuids = rows.map((r) => r.uuid);
|
|
379
384
|
// 只有「已提交前缀自己也过期」这一形端才有东西要写回:首行 = 前段定稿前缀 + content(混合行的上一段正文保住),
|
|
380
385
|
// 其余行清空(它们的字节全在 content 里)。b1 形已提交行本来就对,不给;形 (a) 零行,不给。
|
|
381
386
|
const committedRowsOut = committedPrefixDiverged && rows.length > 0
|
|
382
387
|
? rows.map((r, i) => ({ uuid: r.uuid, text: i === 0 ? r.sealedPrefix + content : r.sealedPrefix }))
|
|
383
388
|
: undefined;
|
|
384
|
-
const attribution =
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
const attribution = uuidsUnique
|
|
390
|
+
? {
|
|
391
|
+
committedUuids: rowUuids,
|
|
392
|
+
...(rowUuids.length > 0 ? { committedUuid: rowUuids[rowUuids.length - 1] } : {}),
|
|
393
|
+
...(committedRowsOut !== undefined ? { committedRows: committedRowsOut } : {}),
|
|
394
|
+
}
|
|
395
|
+
: {};
|
|
389
396
|
/**
|
|
390
397
|
* 🔴 **段跨过包侧边界、而且已提交那截自己也过期** ⇒ 本模块**一个字节都不动**(只发信号)。
|
|
391
398
|
*
|
|
@@ -427,7 +434,11 @@ export function createTextStream(ctx, idOf) {
|
|
|
427
434
|
// 🔴 第 4 轮 finding①:`committedRows` 在场时**一律**按消息分组重建(行归属确定,零启发式);`endsWith` 快捷分支只在
|
|
428
435
|
// 零行(没有行归属可用)时回退 —— 重复正文(两条消息都是「Intro. 」)会让 endsWith 误命中、跳过重建,消息二那本账没清 ⇒ 终帧再补一次。
|
|
429
436
|
let booksSynced = false;
|
|
430
|
-
if (
|
|
437
|
+
if (!uuidsUnique) {
|
|
438
|
+
// B-133 / CC-29:重复 uuid ⇒ 归属说不出 ⇒ **一个字节不动**:既不进分组重建,也不走 endsWith 回退(复审实抓:回退会把
|
|
439
|
+
// previousCommittedText 同步成从未提交的权威全文,再把尾段清掉 —— 端按缺席契约零写回,尾段就此消失)。
|
|
440
|
+
}
|
|
441
|
+
else if (committedRowsOut !== undefined) {
|
|
431
442
|
// 按**消息**重建(第 3 轮 finding②):一条消息的正文 = 窗口之外已独立提交的那截(`msgTextBefore`)+ 该消息里
|
|
432
443
|
// 各行写回后的正文;只按首行写回正文重建会丢掉独立提交的定稿前缀,终帧再落第⑤臂误报分岔。
|
|
433
444
|
const groups = new Map();
|
package/dist/decideReceipt.js
CHANGED
|
@@ -100,8 +100,8 @@ export function decideAcceptedNotResolved(receipt) {
|
|
|
100
100
|
* message 里没有的那件事 —— 「我现在该做什么」。
|
|
101
101
|
*/
|
|
102
102
|
const DECIDE_REFUSAL_SENTENCES = Object.freeze({
|
|
103
|
-
[DECIDE_WORKFLOW_HOST_UNKNOWN]: '
|
|
104
|
-
[DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED]: 'this
|
|
103
|
+
[DECIDE_WORKFLOW_HOST_UNKNOWN]: 'no session is attached to this run to receive the decision, so re-sending the same decision cannot help; the approval is still pending and can be decided again once the run is reachable',
|
|
104
|
+
[DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED]: 'this run cannot remember the decision for the session; re-send the same decision without the remember option — nothing was consumed by this refusal',
|
|
105
105
|
});
|
|
106
106
|
/** 按码给出的 `resendable`(单铸;理由逐码写在 `engineErrorCodes.ts` 的顶注里)。 */
|
|
107
107
|
const DECIDE_RESENDABLE = Object.freeze({
|
|
@@ -134,7 +134,7 @@ export function decideRefusalFromError(e) {
|
|
|
134
134
|
return {
|
|
135
135
|
code,
|
|
136
136
|
...(runId !== undefined ? { runId } : {}),
|
|
137
|
-
detail: detail ?? 'the engine refused this decision
|
|
137
|
+
detail: detail ?? 'the engine refused this decision; the approval is still pending and can be decided again',
|
|
138
138
|
resendable: Object.hasOwn(DECIDE_RESENDABLE, code) ? DECIDE_RESENDABLE[code] === true : false,
|
|
139
139
|
};
|
|
140
140
|
}
|
|
@@ -641,6 +641,12 @@ export interface ApprovalCardRequest {
|
|
|
641
641
|
* **行为面**改动(会改到人已按下的决断的字节),按宪法三问单独立项,不在本过境批内。
|
|
642
642
|
*/
|
|
643
643
|
requiresRealApproval?: true;
|
|
644
|
+
/**
|
|
645
|
+
* CC-27(0.71.1;cli 1.0.117 接入档打回):根外读 ask 附的读根候选,帧 → 卡**原样透传**(live 帧腿;durable
|
|
646
|
+
* `ApprovalCard` 无此位,回放腿缺席)。在场 = 卡上渲一格「把 `dir` 加为本会话读目录」动作,`dir` 原样回传显完整;
|
|
647
|
+
* 缺席 = 今日行为(非根外读 / 引擎早于 7.19.0)。0.71.0 只镜像了帧键名、卡零该位,文档曾说反 —— §42 S-8 已订正。
|
|
648
|
+
*/
|
|
649
|
+
readRootCandidate?: ReadRootCandidateView;
|
|
644
650
|
/** [4851]:窗三键透传(server ≥7.34;壳 readAskDeadlineMs 消费渲倒计时)。只在
|
|
645
651
|
* `windowIsCurrent === true` 的 live 腿上过境(重放腿=旧余量,续窗即假倒计时);**全部**缺席
|
|
646
652
|
* =该帧无窗不渲,半套在场读器按「expiresAtMs 优先、expiresInMs 兜底」回落。 */
|
|
@@ -1092,10 +1098,15 @@ export interface ToolApprovalFrame {
|
|
|
1092
1098
|
* 候选动作;`clearsThisAsk: true` 是穷举表恰一臂(第二成员域 = {true})。
|
|
1093
1099
|
* 🔴 只按在场渲,`dir` 原样回传、显完整 dir(不截、不归一);缺席 = 今日行为(非根外读,或引擎早于 7.19.0)。
|
|
1094
1100
|
*/
|
|
1095
|
-
readRootCandidate?:
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1101
|
+
readRootCandidate?: ReadRootCandidateView;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* 根外读 ask 附的「把 `dir` 加为本会话读目录」候选(core 7.19.0 #803;sdk 9.6.0 帧键第 30 员)。
|
|
1105
|
+
* 穷举表恰一臂:`clearsThisAsk` 域 = {true}。`dir` 原样(不截、不归一);两键形之外的成员不过境。
|
|
1106
|
+
*/
|
|
1107
|
+
export interface ReadRootCandidateView {
|
|
1108
|
+
dir: string;
|
|
1109
|
+
clearsThisAsk: true;
|
|
1099
1110
|
}
|
|
1100
1111
|
/** {@link ToolApprovalFrame.delegation} 的形(命名形,不用内联匿名 —— typeshape 门 B4 棘轮口径)。 */
|
|
1101
1112
|
export interface ToolApprovalDelegation {
|
|
@@ -522,6 +522,15 @@ parkGatedCallId) {
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
+
/** 帧上 `readRootCandidate` 的窄读(模块内部,不出公面):在场且形对 ⇒ 新铸两键形;缺席 / 坏形 ⇒ undefined(键不置)。 */
|
|
526
|
+
function readReadRootCandidate(v) {
|
|
527
|
+
if (typeof v !== 'object' || v === null)
|
|
528
|
+
return undefined;
|
|
529
|
+
const o = v;
|
|
530
|
+
if (typeof o.dir !== 'string' || o.dir.length === 0 || o.clearsThisAsk !== true)
|
|
531
|
+
return undefined;
|
|
532
|
+
return { dir: o.dir, clearsThisAsk: true };
|
|
533
|
+
}
|
|
525
534
|
/**
|
|
526
535
|
* 本地值拷贝的**运行时键集镜像**([1950]② 建议形):对账测试拿它与 SDK 0.1.6+ 的同源锚
|
|
527
536
|
* `TOOL_APPROVAL_FRAME_KEYS` 比对——SDK additive 增键时对账当天红,不再人肉追平。
|
|
@@ -1426,6 +1435,8 @@ export async function surfaceToolApprovalFrameAndRespond(frame, respond, streamA
|
|
|
1426
1435
|
// 「这不是一次安全类 ask」,把它折成显式 false 会让宿主把「没有证据」读成「已确认可自动放行」,
|
|
1427
1436
|
// 而本键存在的全部理由正是在这种门上把自动放行(记住的规则 / allow_session / bypass 姿态)拦下。
|
|
1428
1437
|
...(frame.requiresRealApproval === true ? { requiresRealApproval: true } : {}),
|
|
1438
|
+
// CC-27(0.71.1):读根候选透传 —— 窄读器铸新两键形(dir 非空串 ∧ clearsThisAsk === true),坏形/缺席 ⇒ 键不置。
|
|
1439
|
+
...(() => { const rc = readReadRootCandidate(frame.readRootCandidate); return rc !== undefined ? { readRootCandidate: rc } : {}; })(),
|
|
1429
1440
|
// #341/[5214]③(0.43.0):bidi 披露位透传。条件 stamp **只认严格 true**,与 governanceForced /
|
|
1430
1441
|
// requiresRealApproval 同一条纪律 —— 缺席同时覆盖「真的没有」与「扫不了」,折成显式 false 会把
|
|
1431
1442
|
// 「没扫到」渲成「已确认干净」,而这一位存在的全部理由就是「人眼读到的顺序 ≠ 真跑的字节顺序」。
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
| 项 | 值 | 真源 |
|
|
21
21
|
|---|---|---|
|
|
22
|
-
| 本包 | `@sema-agent/client-core` **0.71.
|
|
22
|
+
| 本包 | `@sema-agent/client-core` **0.71.2**(本批发布版 = **patch**:接入方验收两票归包 —— CC-28 B-132 decide 拒体三句去内部车道词 / CC-29 B-133 committedUuids 唯一性(重复 ⇒ 形 f);零型面变化、公面 986、peer 不动;§44。上一版 0.71.1 = **patch**:接入档打回修正 —— CC-27 `ApprovalCardRequest.readRootCandidate?` 帧→卡透传位 + 新导出型 `ReadRootCandidateView`;型面纯 additive、公面 986 不变、peer 不动;§43。上一版 0.71.0 = **minor**:型面 BREAKING 六件 —— peer sdk 地板 >=9.6.0 + agent-types >=0.3.0 / `SkillsListingTruncatedFactsView` 删 `requestedBudgetBytes?`·`laneClamped?` / `WiringManifestMcpEntry` → `WiringManifestMcpEntryView` / `MAX_AGENT_SKILLS` 删 / `decide.workflow_host_not_parked` 退役;运行期零 BREAKING。内容:core 7.20.0 提货(闭集 +5 六十四码)/ 🔴 CC-16 `text_segment_end.committedUuids[]` / CC-08 全五件(tool_disclosure / tool_progress 两 chrome 臂、wiring_manifest tools·hooks·lsp 进切片、tool_roster_delta 接上、context_usage 进切片、`readRootCandidate` 镜像)/ CC-19 `mcpEngineLegPresence` 归包 / CC-20 not_parked clean-cut;公面 986;§42 / 42y 八条)|
|
|
23
23
|
| peer:wire 契约 | `@sema-agent/sdk` **>=9.6.0**(value-level,非 type-only;**0.71.0 抬版**:`tool_disclosure` / `tool_progress` 两帧型与 `ToolApprovalFrame.readRootCandidate` 自 9.6.0 起;0.69.0 曾抬到 >=9.4.0(`reasoning_end` / `lastLegMcp`),0.60.0 抬到 >=8.4.0;地板由 `scripts/run-sdk-floor-test.mjs` 的 `FLOOR` 与 public-surface 门 C-CC-3「不低于见证到的最低实装版」双钉)| `package.json` `peerDependencies` |
|
|
24
24
|
| peer:会话词汇表 | `@sema-agent/agent-types` **>=0.3.0**(type-only,零运行时;0.71.0 抬版:devDep 与 peer 同步,type-superset 门 ④ 撞名预警对着 0.3.0 的 .d.ts 求值) | 同上 |
|
|
25
25
|
| runtime dep | `diff` ^9.0.0(**唯一**一条;portability 门按**等值**钉死) | `package.json` `dependencies` |
|
|
@@ -8098,7 +8098,7 @@ installCoreValuePorts({ resolveAutonomousLoopPrompt, loosenReasons, combinePolic
|
|
|
8098
8098
|
| S-15 🔴 **子流面** | **`wiring_manifest` 三键子流断闸 + 身份透传**:投影口透 `parentToolCallId` / `sourceTaskId` / `bgAgentId`(在场非串 ⇒ `malformed`),臂按三键任一在场断闸(修前只判 `parentToolCallId`) | 端零动作;此前若在壳侧按 `sourceTaskId` 自滤子代 `wiring_manifest` 的可删(包已断闸,leader 面只见 leader 快照) |
|
|
8099
8099
|
| S-16 🔴 **子流面** | **三键身份空串透传**:五臂共用读器三键在场即抄(含 `''`),与 `text_end` 投影和 `isSubFlowSegmentEnd`「键在场 = 子代帧」同律;`eventId` 非空才带 | 端零动作;别把 `sourceTaskId === ''` 读成主流 |
|
|
8100
8100
|
| S-13 | **CC-19 `mcpEngineLegPresence(view)`**(cli L-335 归包):引擎侧 MCP 在场三值 `present` / `absent` / `unknown`,只从 `projectMcpPanel` 视图求 | 壳侧自算的 presence 删改调;🔴 `unknown`(视图读不出)不许渲成「一台 MCP 都没配」,有引擎接线的端开面板让「未观测」句说话;CC 那句只在壳侧零行 ∧ `absent` 时出 |
|
|
8101
|
-
| S-8 | **`ToolApprovalFrame.readRootCandidate?`**(#803):在场 = 根外读 ask 附「把 `dir` 加为本会话读目录」候选,`clearsThisAsk: true` |
|
|
8101
|
+
| S-8 | **`ToolApprovalFrame.readRootCandidate?`**(#803):在场 = 根外读 ask 附「把 `dir` 加为本会话读目录」候选,`clearsThisAsk: true` | 🔧 **0.71.1 订正(接入方 1.0.117 打回)**:0.71.0 只把键名镜像进 `TOOL_APPROVAL_FRAME_KEYS_MIRROR`,**卡入参零该位** ⇒ 本版端渲不到,处置登 n/a;**0.71.1 起** `ApprovalCardRequest.readRootCandidate?` 在场渲一格「add-dir」动作,`dir` 原样回传显完整;缺席 = 今日行为(§43) |
|
|
8102
8102
|
| S-4 🔴 **安全面** | **CC-16 `text_segment_end.committedUuids[]`**:本段身份窗口里段边界**之前**已提交的文本行 uuid 按序(`[]` = 零行在场但空;整键缺席 = 零经手形 f)+ `committedUuid` 末条兼容位;常态段定稿行在轮换之后提交 ⇒ 不在列 | **端义务改口**:`committedPrefixDiverged` ⇒ 按 `committedRows[]` **逐行写回**(包已算好:首行 = 前段定稿前缀 + `content`、其余行 `''`;🔴 别整行换首行 —— 提交行可能是「上一段定稿 + 本段那截」一条,整行换会删上一段权威正文;多行跨界时包同批清掉本段未提交的原始尾巴、补差账按写回后的屏同步,端写回后转录 = 权威正文恰一次);删自建的「本窗口过境行」跟踪与 `=== 1` 歧义闸;多行跨界段不再整发放弃 |
|
|
8103
8103
|
|
|
8104
8104
|
### 42z. 逐键处置表(0.71.0,core 半场)
|
|
@@ -8127,10 +8127,10 @@ installCoreValuePorts({ resolveAutonomousLoopPrompt, loosenReasons, combinePolic
|
|
|
8127
8127
|
|
|
8128
8128
|
### 42y. 🔴 三端升级必读(固定段式,[C295];本批起草,发车时补全)
|
|
8129
8129
|
|
|
8130
|
-
1. 🔴 **`text_segment_end` 归属交全(CC-16)**:`committedUuids[]` 在场即以它为准 —— `committedPrefixDiverged` ⇒ 按 `committedRows[]` 逐行写回正文(🔴 别自己整行换首行)。两形:**(a)** 提交行 = 「上一段定稿 + 本段那截」同一行时,该行最终正文 = 上一段正文(该行里已封存那截,逐字)+ 本段权威 `content`,其余行 `''`;**(b)** `committedRows` 在场 ⇔ `committedPrefixDiverged === true` ∧ `committedUuids.length > 0`,在场时与 `committedUuids` 长度相等、顺序一一对应(`committedRows[i].uuid === committedUuids[i]`)
|
|
8130
|
+
1. 🔴 **`text_segment_end` 归属交全(CC-16)**:`committedUuids[]` 在场即以它为准 —— `committedPrefixDiverged` ⇒ 按 `committedRows[]` 逐行写回正文(🔴 别自己整行换首行)。两形:**(a)** 提交行 = 「上一段定稿 + 本段那截」同一行时,该行最终正文 = 上一段正文(该行里已封存那截,逐字)+ 本段权威 `content`,其余行 `''`;**(b)** `committedRows` 在场 ⇔ `committedPrefixDiverged === true` ∧ `committedUuids.length > 0`,在场时与 `committedUuids` 长度相等、顺序一一对应(`committedRows[i].uuid === committedUuids[i]`),绝不只给其一;🔧 0.71.2 补:`committedUuids` **内部唯一**(重复 = 上游帧 uuid 重复 ⇒ 包判归属说不出,三键整键缺席走形 f,端零写回);b1 形(前缀对得上)只有 `committedUuids`;`[]` = 本窗口零已提交行;整键缺席才是「包说不出」。自建的「本窗口过境行」跟踪与 `=== 1` 歧义闸可删,多行跨界段不再整发放弃。
|
|
8131
8131
|
2. **`SkillsListingTruncatedFactsView` 删 `requestedBudgetBytes?` / `laneClamped?`**:运维面只读 `budgetBytes`。
|
|
8132
8132
|
3. **peer sdk `>=9.6.0`**;两条新 chrome 臂 `tool_disclosure` / `tool_progress` 均 `required: false`,渲的端接、不渲零动作;🔴 `tool_progress.output` 绝不回喂模型。
|
|
8133
|
-
4. **审批卡 `readRootCandidate
|
|
8133
|
+
4. **审批卡 `readRootCandidate`**:🔧 0.71.1 订正 —— 本版(0.71.0)卡入参**零该位**(只镜像了帧键名),端登 n/a 不渲;0.71.1 起按 `ApprovalCardRequest.readRootCandidate?` 在场渲一格 add-dir,`dir` 原样回传,缺席不渲(§43)。
|
|
8134
8134
|
5. 🔴 **两个型面改名/删除**:`WiringManifestMcpEntry` → `WiringManifestMcpEntryView`(两边都 import 的端改名);`MAX_AGENT_SKILLS` 删(仍 import 的端删)。
|
|
8135
8135
|
6. **名册增量与上下文用量**:`tool_roster_delta` 喂 `applyToolRosterDelta`(digest 对不上整只替换、重连按快照重同步);`context_usage` 按最后一条取值,`sections[].tokens` 与 `usedTokens` 禁相减。
|
|
8136
8136
|
7. **引擎侧 MCP 在场改读 `mcpEngineLegPresence(view)`**:壳侧自算的三值删;`unknown` 开面板不渲零。
|
|
@@ -8138,3 +8138,55 @@ installCoreValuePorts({ resolveAutonomousLoopPrompt, loosenReasons, combinePolic
|
|
|
8138
8138
|
9. **子流断闸补齐**:`wiring_manifest` 三键断闸 + 五臂三键空串透传(S-15 / S-16);壳侧对这些臂自建的 `sourceTaskId` 过滤可删。
|
|
8139
8139
|
|
|
8140
8140
|
**包侧缺口:** ① `agents.listing_truncated` detail 读器候消费场景(by-design:无消费方不出读器);② `ClassifierSeat.defaulted?` 候 sdk 出键(by-design:上游未出);③ CC-06 B-081 包侧半场(窗 09-22);④ CC-24 export-liveness 门(窗 09-20);⑤ CC-25 §NNz 机读门 + 三已发版本落点 + FROZEN 腿判据(窗 09-22);⑥ CC-26 `as unknown as` 铸出口棘轮(窗 09-22)。
|
|
8141
|
+
|
|
8142
|
+
## §43 🆕 0.71.1 接入档打回修正(`readRootCandidate` 帧 → 卡透传;接入方 1.0.117 实测打回)
|
|
8143
|
+
|
|
8144
|
+
> **patch**:型面纯 additive;运行期零 BREAKING;peer 不动。只修一件:0.71.0 的 §42 S-8 / §42y ④ 说「审批卡在场渲一格 add-dir」,而 dist 里 `readRootCandidate` 唯一运行期命中是 `TOOL_APPROVAL_FRAME_KEYS_MIRROR` 的键名镜像,`ApprovalCardRequest` 零该位 —— 端侧结构上做不到(接入文档宪法:文档报错直接打回)。
|
|
8145
|
+
|
|
8146
|
+
### 43a. 处置表
|
|
8147
|
+
|
|
8148
|
+
| # | 面 | 本包做了什么 | 端要做什么 |
|
|
8149
|
+
|---|---|---|---|
|
|
8150
|
+
| S-1 | **`ApprovalCardRequest.readRootCandidate?: ReadRootCandidateView`**(`{ dir: string; clearsThisAsk: true }`) | live 帧腿窄读上卡:`dir` 非空串 ∧ `clearsThisAsk === true` ⇒ 新铸两键形(`dir` 逐字不加工、多余成员不过境);缺席 / 坏形 ⇒ 键不置。新导出型 `ReadRootCandidateView`(窄读器不出公面) | 审批卡在场渲一格「把 `dir` 加为本会话读目录」动作,`dir` 原样回传显完整(不截不归一);缺席不渲(= 非根外读 / 引擎早于 7.19.0)。🔴 durable `ApprovalCard` 无此位(sdk `APPROVAL_CARD_KEYS` 两版相同),回放腿缺席是常态,别当坏形 |
|
|
8151
|
+
|
|
8152
|
+
### 43z. 逐键处置表
|
|
8153
|
+
|
|
8154
|
+
| # | 键 / 面 | 处置 | 坐标 / 理由 |
|
|
8155
|
+
|---|---|---|---|
|
|
8156
|
+
| 1 | `ToolApprovalFrame.readRootCandidate?` → 卡 | **consumed(卡透传位;0.71.0 只 consumed 到键名镜像)** | `src/hitl/toolApprovalWire.ts` 的 `#ApprovalCardRequest`(窄读器 `readReadRootCandidate` 模块内部);pure 门 CC-27a–d |
|
|
8157
|
+
| 2 | [7341] ① 三条读法约束(只按在场渲 / `dir` 原样 / 缺席 = 今日行为) | **原样留票** | 端侧 L-332;本包卡口不改写 `dir` |
|
|
8158
|
+
|
|
8159
|
+
### 43y. 🔴 三端升级必读(固定段式,[C295])
|
|
8160
|
+
|
|
8161
|
+
1. **审批卡读 `req.readRootCandidate`**:在场渲一格 add-dir 动作,`dir` 原样回传;缺席不渲。0.71.0 上按 n/a 处置的端换钉 0.71.1 后把 n/a 翻 consumed。
|
|
8162
|
+
2. **回放腿缺席是常态**:durable 卡无此位,别把缺席当坏形报。
|
|
8163
|
+
3. **零 BREAKING**:peer 不动、公面运行期导出 986 不变(只加一个导出型)。
|
|
8164
|
+
|
|
8165
|
+
**包侧缺口:** ① CC-06 B-081 包侧半场(窗 09-22);② CC-24 export-liveness 门(窗 09-20);③ CC-25 §NNz 机读门 + 三已发版本落点 + FROZEN 腿判据(窗 09-22);④ CC-26 `as unknown as` 铸出口棘轮(窗 09-22);⑤ `agents.listing_truncated` detail 读器候消费场景(by-design);⑥ `ClassifierSeat.defaulted?` 候 sdk 出键(by-design)。
|
|
8166
|
+
|
|
8167
|
+
## §44 🆕 0.71.2 接入方验收两票归包(B-132 decide 拒体人话 / B-133 committedUuids 唯一性)
|
|
8168
|
+
|
|
8169
|
+
> **patch**:零型面变化、公面 986 不变、peer 不动。两件都是接入方 1.0.117 黑盒验收(test [7389])立票、cli [7392] 显式转包(壳零自铸 / 零代偿)。
|
|
8170
|
+
|
|
8171
|
+
### 44a. 处置表
|
|
8172
|
+
|
|
8173
|
+
| # | 面 | 本包做了什么 | 端要做什么 |
|
|
8174
|
+
|---|---|---|---|
|
|
8175
|
+
| S-1 | **decide 拒体人话**(`decideRefusalFromError().detail`,唯一铸点) | `decide.workflow_host_unknown` / `decide.workflow_remember_unsupported` 两句去内部车道词(workflow run / lane),改成用户可执行的一句;结构位(`code` / `runId` / `resendable`)不变 | 零动作(`detail` 原样渲);端零自铸第二句。`conflict.resume_context_unavailable` 不在本包(源码 + dist 零命中),渲它的那一面请按坐标另立 |
|
|
8176
|
+
| S-2 | **`text_segment_end.committedUuids[]` 唯一性** | 交全前判唯一;重复 ⇒ `committedUuids` / `committedUuid` / `committedRows` 整键缺席(形 f),包不清尾巴不同步账 | 端照 §42y ① (b):整键缺席 = 包说不出 ⇒ 零写回 + 披露;端不必再判唯一(包边界已判,壳侧第二份判据不加) |
|
|
8177
|
+
|
|
8178
|
+
### 44z. 逐键处置表
|
|
8179
|
+
|
|
8180
|
+
| # | 键 / 面 | 处置 | 坐标 / 理由 |
|
|
8181
|
+
|---|---|---|---|
|
|
8182
|
+
| 1 | B-132 两句 | **consumed(改口)** | `src/decideReceipt.ts` 的 `#DECIDE_REFUSAL_SENTENCES`;decide 门 E3/E3b |
|
|
8183
|
+
| 2 | B-132 第三码 `conflict.resume_context_unavailable` | **n/a(不在本包)** | 本包源码与 dist 零命中 |
|
|
8184
|
+
| 3 | B-133 唯一性 | **consumed(说不出走形 f)** | `src/adapt/textStream.ts` 的 `#uuidsUnique`;TSA 门 Z10 |
|
|
8185
|
+
|
|
8186
|
+
### 44y. 🔴 三端升级必读(固定段式,[C295])
|
|
8187
|
+
|
|
8188
|
+
1. `decideRefusalFromError().detail` 措辞变了(零内部车道词);按句子做字面匹配的端改掉(不该有)。
|
|
8189
|
+
2. `committedUuids` 内部重复 ⇒ 三键整键缺席(形 f),端按既有「包说不出」分支走;端侧不加唯一性第二判据。
|
|
8190
|
+
3. 零 BREAKING:型面、公面、peer 均不动。
|
|
8191
|
+
|
|
8192
|
+
**包侧缺口:** ① CC-06 B-081 包侧半场(窗 09-22);② CC-24 export-liveness 门(窗 09-20);③ CC-25 §NNz 机读门 + 三已发版本落点 + FROZEN 腿判据(窗 09-22);④ CC-26 `as unknown as` 铸出口棘轮(窗 09-22);⑤ `agents.listing_truncated` detail 读器候消费场景(by-design);⑥ `ClassifierSeat.defaulted?` 候 sdk 出键(by-design)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/client-core",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.2",
|
|
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. Renamed from @sema-agent/wire-cc-adapter (0.1.x).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|