@sema-agent/client-core 0.101.0 → 0.103.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +19 -11
  3. package/dist/adapt/toolCards.d.ts +4 -2
  4. package/dist/adapt/toolCards.js +22 -6
  5. package/dist/adapt.d.ts +1 -1
  6. package/dist/adapt.js +1 -1
  7. package/dist/adapter/downstream/eventToSdkMessage.d.ts +5 -1
  8. package/dist/adapter/downstream/eventToSdkMessage.js +26 -70
  9. package/dist/adapter/downstream/terminalToSdkResult.js +0 -1
  10. package/dist/adapter/downstream/wiringManifestView.d.ts +1 -0
  11. package/dist/adapter/downstream/wiringManifestView.js +141 -0
  12. package/dist/cloudConfigWireCaps.js +6 -3
  13. package/dist/compensations.js +1 -1
  14. package/dist/credentialPlaneCapability.d.ts +22 -0
  15. package/dist/credentialPlaneCapability.js +75 -0
  16. package/dist/deviceExecutorManagementCapability.d.ts +1 -0
  17. package/dist/deviceExecutorManagementCapability.js +3 -1
  18. package/dist/displayUntrusted.d.ts +8 -4
  19. package/dist/displayUntrusted.js +769 -96
  20. package/dist/engineErrorCodes.d.ts +1 -0
  21. package/dist/engineErrorCodes.js +3 -1
  22. package/dist/engineNoticeCodes.d.ts +26 -0
  23. package/dist/engineNoticeCodes.js +121 -12
  24. package/dist/engineRowRef.js +2 -0
  25. package/dist/errorSupplementRoles.js +1 -3
  26. package/dist/eventLeg.js +2 -1
  27. package/dist/fleet/fleetProjection.js +16 -10
  28. package/dist/gateOutcome.d.ts +20 -0
  29. package/dist/gateOutcome.js +89 -0
  30. package/dist/generated/engineAskFaceTables.js +2 -2
  31. package/dist/generated/engineFactTables.d.ts +6 -2
  32. package/dist/generated/engineFactTables.js +41 -1
  33. package/dist/generated/engineNoticeTables.js +18 -0
  34. package/dist/generated/settingsSchemaDefaultModel.d.ts +1 -1
  35. package/dist/generated/settingsSchemaDefaultModel.js +2 -2
  36. package/dist/generated/settingsSchemaFns.d.ts +15 -0
  37. package/dist/generated/settingsSchemaFns.js +25 -2
  38. package/dist/generated/settingsSchemaHooksClassifier.js +109 -29
  39. package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
  40. package/dist/generated/settingsSchemaMcpRequestEntry.js +213 -93
  41. package/dist/generated/settingsSchemaMcpServerName.d.ts +1 -0
  42. package/dist/generated/settingsSchemaMcpServerName.js +8 -0
  43. package/dist/generated/settingsSchemaOwnKeyRead.d.ts +1 -0
  44. package/dist/generated/settingsSchemaOwnKeyRead.js +172 -0
  45. package/dist/generated/settingsSchemaPlainJsonObject.d.ts +1 -0
  46. package/dist/generated/settingsSchemaPlainJsonObject.js +28 -0
  47. package/dist/generated/settingsSchemaSafetyMergeSpec.js +10 -7
  48. package/dist/generated/settingsSchemaTierWords.d.ts +1 -0
  49. package/dist/generated/settingsSchemaTierWords.js +7 -0
  50. package/dist/generated/settingsSchemaTypes.d.ts +3 -1
  51. package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
  52. package/dist/hitl/decisionConflict.js +11 -11
  53. package/dist/hitl/decisionRefusal.d.ts +1 -0
  54. package/dist/hitl/decisionRefusal.js +4 -2
  55. package/dist/hitl/editedRuleTextPrecheck.d.ts +1 -0
  56. package/dist/hitl/editedRuleTextPrecheck.js +26 -1
  57. package/dist/hitl/persistedRulesWire.js +1 -0
  58. package/dist/hitl/planReviewWire.d.ts +2 -1
  59. package/dist/hitl/planReviewWire.js +8 -12
  60. package/dist/hitl/sessionPolicyDeliverable.d.ts +0 -1
  61. package/dist/hitl/sessionPolicyDeliverable.js +0 -5
  62. package/dist/hitl/sessionPolicyWire.js +1 -1
  63. package/dist/hitl/toolApprovalWire.d.ts +18 -6
  64. package/dist/hitl/toolApprovalWire.js +9 -4
  65. package/dist/i18n/messages.en.d.ts +43 -0
  66. package/dist/i18n/messages.en.js +44 -1
  67. package/dist/i18n/messages.zh.js +46 -1
  68. package/dist/index.d.ts +11 -2
  69. package/dist/index.js +7 -1
  70. package/dist/inheritEnvWire.d.ts +1 -0
  71. package/dist/inheritEnvWire.js +8 -5
  72. package/dist/interactiveHalt.d.ts +3 -1
  73. package/dist/interactiveHalt.js +2 -0
  74. package/dist/interactiveInterrupt.d.ts +2 -0
  75. package/dist/interactiveInterrupt.js +15 -0
  76. package/dist/mcpEngineLeg.d.ts +3 -0
  77. package/dist/mcpEngineLeg.js +4 -1
  78. package/dist/mcpLiveness.d.ts +18 -0
  79. package/dist/mcpLiveness.js +48 -1
  80. package/dist/mcpReconnect.d.ts +3 -0
  81. package/dist/mcpReconnect.js +6 -0
  82. package/dist/mcpStatusSupersetKeys.js +24 -1
  83. package/dist/mcpWireCaps.d.ts +2 -3
  84. package/dist/mcpWireCaps.js +9 -8
  85. package/dist/memoryEntriesWire.d.ts +35 -1
  86. package/dist/memoryEntriesWire.js +110 -14
  87. package/dist/modsFace.d.ts +8 -0
  88. package/dist/modsFace.js +63 -0
  89. package/dist/ownKey.d.ts +1 -0
  90. package/dist/ownKey.js +15 -0
  91. package/dist/postureKnob.js +1 -1
  92. package/dist/prepareRefusal.d.ts +0 -1
  93. package/dist/prepareRefusal.js +0 -3
  94. package/dist/printToolResultFrame.js +1 -1
  95. package/dist/promptProfileWireCaps.d.ts +1 -3
  96. package/dist/promptProfileWireCaps.js +2 -2
  97. package/dist/request/printNotification.js +1 -1
  98. package/dist/request/taskRequest.d.ts +22 -1
  99. package/dist/request/taskRequest.js +126 -10
  100. package/dist/retryStatus.d.ts +13 -1
  101. package/dist/retryStatus.js +20 -5
  102. package/dist/seam.js +1 -1
  103. package/dist/seatContract.d.ts +22 -6
  104. package/dist/seatContract.js +45 -6
  105. package/dist/sessionBackground.d.ts +165 -0
  106. package/dist/sessionBackground.js +781 -0
  107. package/dist/sessionBackgroundHandoff.d.ts +54 -0
  108. package/dist/sessionBackgroundHandoff.js +321 -0
  109. package/dist/sessionMap.js +4 -1
  110. package/dist/sessionMemoryErase.js +24 -2
  111. package/dist/settingsCredentialKeyPaths.js +2 -17
  112. package/dist/thinkingLatch.d.ts +69 -0
  113. package/dist/thinkingLatch.js +255 -0
  114. package/dist/thinkingLatchWords.d.ts +7 -0
  115. package/dist/thinkingLatchWords.js +4 -0
  116. package/dist/toolResult.js +2 -24
  117. package/dist/turnFailurePresentation.js +8 -1
  118. package/dist/wireFailureShape.d.ts +12 -1
  119. package/dist/wireFailureShape.js +58 -24
  120. package/dist/wireRefusalCopy.d.ts +0 -3
  121. package/dist/wireRefusalCopy.js +0 -17
  122. package/docs/INTEGRATION-CLIENTS.md +458 -14
  123. package/package.json +5 -5
  124. package/dist/argvFlagValue.d.ts +0 -8
  125. package/dist/argvFlagValue.js +0 -37
@@ -1,7 +1,8 @@
1
1
  import { appendOwnElement, readOwnDataValue } from '../ownKey.js';
2
2
  import { refuseBadDisableSkills, refuseDisableSkillsConflict } from '../disableSkillsWire.js';
3
3
  import { ATTACHMENTS_SPEC_KEYS, AttachmentsSpecRefused } from '../attachmentsWireCaps.js';
4
- import { retiredAttachmentsKeyOf } from '../taskRequestWords.js';
4
+ import { REASONING_EFFORT_WORDS, retiredAttachmentsKeyOf } from '../taskRequestWords.js';
5
+ import { THINKING_LATCH_SET_STATES } from '../thinkingLatchWords.js';
5
6
  import { msg, renderMessage } from '../i18n/translate.js';
6
7
  import { PROJECT_MEMORY_DISABLED } from '../projectMemory.js';
7
8
  import { frameFamiliesJudgementOf } from '../approvalFrameFamilies.js';
@@ -20,7 +21,7 @@ export const REQUEST_FIELD_MATRIX = [
20
21
  { field: 'selfOrchestration', lanes: ['interactive', 'print'], live: true, why: 'SEMA_SELF_ORCHESTRATION opt-in → core 挂 run_workflow', whyUtilityLane: '无座:它挂的是编排工具,与零工具面直接矛盾' },
21
22
  { field: 'deferTools', lanes: ['interactive', 'print'], live: true, why: '[1052]① Workflow 延迟披露;selfOrchestration 前置门', whyUtilityLane: '无座:工具延迟披露是工具面的位,零工具面上没有对象' },
22
23
  { field: 'retainBackgroundProcesses', lanes: ['interactive', 'print'], live: true, why: '缺省 ON(2026-07-26 起翻转);SEMA_RETAIN_BACKGROUND=0 逃生', whyUtilityLane: '无座:后台进程是工具面的产物,零工具面产不出' },
23
- { field: 'promptProfile', lanes: ['interactive', 'print'], live: true, why: 'core 1.328 呈现轴 A/B 口,缺省不 stamp = 引擎缺省 simple', whyUtilityLane: '无座:呈现轴是用户会话的偏好;side-channel 的系统提示由壳整段给出(见 systemPrompt 那一行),不再借呈现轴调形' },
24
+ { field: 'promptLean', lanes: ['interactive', 'print'], live: true, why: '提示词形轴(0.103.0 起布尔,取代退役的两词形轴键;sdk 28 / 服务端 7.137.0):缺省不 stamp = 目录缺省;映射单铸点 promptLeanFromEnv', whyUtilityLane: '无座:提示词形是用户会话的偏好;side-channel 的系统提示由壳整段给出(见 systemPrompt 那一行),不再借形轴调形' },
24
25
  { field: 'enableFork', lanes: ['interactive', 'print'], live: true, why: '显式布尔才 stamp([503]② fail-OPEN 教训:off 必须显式)', whyUtilityLane: '无座:分叉是会话面的动作,而 side-channel 提交是一次性的独立会话' },
25
26
  { field: 'attachments', lanes: ['interactive', 'print'], live: true, why: 'design/133 + G1 缺省开的 turn 边界 attachment', whyUtilityLane: '无座:turn 边界的附件配置属用户会话;side-channel 提交不带附件' },
26
27
  { field: 'skills', lanes: ['interactive', 'print'], live: true, why: '本地技能目录投影(布局取 CC 同款);两条车道都由 launchRepl 载入面注入', whyUtilityLane: '无座:技能挂的是工具,与零工具面矛盾' },
@@ -38,7 +39,7 @@ export const REQUEST_FIELD_MATRIX = [
38
39
  { field: 'inheritEnv', lanes: ['interactive', 'print'], live: true, why: '模型驱动的宿主 shell「继承多少用户环境」的**请求级声明**(server 7.106.0 提交体键,两词闭集 "all" / "scrub";`POST /v1/tasks` · `/v1/tasks/stream` · `/v1/runs` 同收,续跑腿重放同判)。两条用户车道都是提交面、都可能在用户机器上跑 shell ⇒ 都能声明。本层两词原样透传、不按车道 / 部署预判(非 host 车道 × "all" 400、托管 × "all" 422 归上游判)。🔴 缺席 = 缺省清洗且清掉本会话上一条声明 ⇒ 要「本会话整份继承」就每个提交都带。🔴 只在服务端版本 ≥ 7.106.0 时发(老 server 对表外键整条 400),值由片段口 `inheritEnvDeclaration` 唯一铸出', whyUtilityLane: '无座:side-channel 强制零工具面(`excludeAllTools`),没有模型驱动的 shell 去继承环境;带上它只会在不认这一键的老服务端上给这条提交多一种 400' },
39
40
  { field: 'requireExistingSession', lanes: ['interactive', 'print'], live: true, why: '「只续已有会话」的**请求级断言**(sdk `TaskRequest.requireExistingSession`):`true` 且会话不在 ⇒ 服务端在任何东西跑起来之前拒(会话不在 / 没给会话 id 两形),而**不是**静默新开一个同 id 的空会话;缺席 / `false` = 历史的「找不到就新开」。两条用户车道都有「续某个会话」的入口 ⇒ 都能声明。本层只认字面 `true`(`false` 与缺席同义、不发);非布尔坏值响亮拒(上游对它 400);`true` 而入参没有可续的会话 id ⇒ 装配期按名响亮拒,不留给上游。上游两形的拒绝经 `requireExistingSessionRefusalFromError` 归成一句', whyUtilityLane: '无座:side-channel 每一次提交都走壳另铸的**独立**会话 id(见 sessionId 那一行),从不续任何已有会话 ⇒「必须已存在」对它没有意义,带上去只会让每一次提交都被拒' },
40
41
  { field: 'disableSkills', lanes: ['interactive', 'print'], live: true, why: '「这一发一只技能都不装」的**请求级声明**(出厂技能、调用方给的技能、子代定义里的技能一个都不进引擎;其余工具照挂 —— 与 excludeAllTools 是两件事,两键同带各自生效)。两条用户车道都是提交面 ⇒ 都能声明。本层只认字面 true(false 与缺席同义、不发);非布尔坏值响亮拒(上游对它 400);与非空 skills 或任一非空 agents[].skills 同在 ⇒ 装配期按名响亮拒(上游对这一组合 400),兜底层落 agents 之后同判。🔴 只在能力位读数为真时发(老服务端对表外键整条 400),值由片段口 disableSkillsDeclaration 唯一铸出', whyUtilityLane: '无座:同 skills 一行 —— side-channel 是零工具面,装不装技能都无从谈起' },
41
- { field: 'finalVerification', lanes: ['print'], live: true, why: 'P1-1 终验:无人值守车道才需要引擎自证;交互 REPL 由人当场看结果。#106 裁 B(让位+告知)后交互面默认关', whyUtilityLane: '无座:终验让引擎再跑一轮自证,而 side-channel 要的是一次小提交的即时答案;「无人值守才需要引擎自证」这条理由在本车道上让位给「小预算优先」' },
42
+ { field: 'finalVerification', lanes: ['print'], live: true, why: 'P1-1 终验:无人值守车道才需要引擎自证;交互 REPL 由人当场看结果。裁定「让位+告知」后交互面默认关', whyUtilityLane: '无座:终验让引擎再跑一轮自证,而 side-channel 要的是一次小提交的即时答案;「无人值守才需要引擎自证」这条理由在本车道上让位给「小预算优先」' },
42
43
  { field: 'limits', lanes: ['print', 'utility'], live: true, why: 'P2-3-b:`-p` 的预算护栏(--max-* flag 族),交互 REPL 由人随时 Esc', whyUtilityLane: '有座:side-channel 必须带预算护栏(墙钟 / 输出 token / 轮数)—— 它同样没有人看着,而且没有后续回合可以中断' },
43
44
  { field: 'interactiveTools', lanes: ['print', 'utility'], live: true, why: '[909]B 件3:无人值守 stamp false,从 roster 源头灭掉 AskUserQuestion/plan 门。交互车道 stamp false 等于自废武功', whyUtilityLane: '有座:side-channel 绝不该弹交互问答 / plan 门(没有人在看这条提交)。它与 excludeAllTools 是**两条独立**的收紧声明、在这条车道上**并存**(本车道强制带卸载声明,见 `refuseUtilityWithoutToolUnload`;这一位是它旁边那条「连问都别问」的声明,不是它的降级替身)' },
44
45
  { field: 'oneShot', lanes: ['print', 'utility'], live: true, why: 'SDK TaskRequest.oneShot(server ≥7.12.0 消费):`-p` 提交是一次性的——没有后续回合接住异步后台通知,core 据此把「结束回合等通知」指引换成 block-wait;交互车道有后续回合,stamp true 就是谎报。老 worker 静默忽略(开集提交体),故发送侧不设能力位前置门(oneShotWireCaps 头注)', whyUtilityLane: '有座:side-channel 就是一次性提交 —— 没有后续回合接住异步后台通知,引擎据此把「结束回合等通知」换成 block-wait' },
@@ -151,7 +152,7 @@ const INPUT_KEY_ROUTES = {
151
152
  selfOrchestration: row('selfOrchestration'),
152
153
  deferTools: row('deferTools'),
153
154
  retainBackgroundProcesses: row('retainBackgroundProcesses'),
154
- promptProfile: row('promptProfile'),
155
+ promptLean: row('promptLean'),
155
156
  enableFork: row('enableFork'),
156
157
  attachments: row('attachments'),
157
158
  attachmentIds: row('attachmentIds'),
@@ -191,6 +192,8 @@ const INPUT_KEY_ROUTES = {
191
192
  allowTools: row('allowTools'),
192
193
  hostSettings: { via: 'control' },
193
194
  approvalFrameFamiliesReading: { via: 'control' },
195
+ thinkingLatch: { via: 'control' },
196
+ reasoningFloor: { via: 'control' },
194
197
  settings: { via: 'settings' },
195
198
  };
196
199
  const HOST_TOP_KEY_ROUTES = {
@@ -202,6 +205,8 @@ const _hostTopKeysPin = [true];
202
205
  void _hostTopKeysPin;
203
206
  const _projectMemoryWordPin = [true, true];
204
207
  void _projectMemoryWordPin;
208
+ const _thinkingLatchWordPin = [true, true];
209
+ void _thinkingLatchWordPin;
205
210
  const HOST_TOP_ASK_AFTER = 'memoryCapture';
206
211
  const HOST_SETTINGS_SUBKEYS = Object.freeze(HOST_SUPPLIED_KEYS.filter((k) => k.startsWith('settings.')).map((k) => k.slice('settings.'.length)));
207
212
  const MINTED_SETTINGS_SUBKEYS = Object.freeze(['approvalFrameFamilies']);
@@ -699,6 +704,15 @@ const refuseBadProjectMemory = (v) => {
699
704
  '这一位是「这一次运行别读部署的项目上下文」的收紧声明,引擎是**单成员闭集**(没有第二个词:要照常读就不带这一键)且对坏值拒启。' +
700
705
  '本层若静默删键,请求会照发、项目指令文件会照常递给模型,而声明人不会知道自己的 opt-out 丢了。错误文本只报形状,不回显值。');
701
706
  };
707
+ const refuseBadThinkingLatch = (v) => {
708
+ if (v === undefined || v === null)
709
+ return;
710
+ if (typeof v === 'string' && THINKING_LATCH_SET_STATES.includes(v))
711
+ return;
712
+ throw new TypeError(`buildTaskRequest: thinkingLatch 只接受 ${THINKING_LATCH_SET_STATES.map((w) => `'${w}'`).join(' / ')} 或缺席(undefined/null = 未设)—— 收到 ${coarseShape(v)}。` +
713
+ '这一位是会话级思考开关的读数(从存储宿主的端口读:readThinkingLatch(port).state;未设就不带这一键):「关」被打字错误静默吞掉,' +
714
+ '这一发会照档位词思考而关掉开关的人不会知道。错误文本只报形状,不回显值。');
715
+ };
702
716
  const refuseBadRequireExistingSession = (v) => {
703
717
  if (v === undefined || v === null || v === true || v === false)
704
718
  return;
@@ -787,7 +801,7 @@ export function parseMaxCostUsd(text) {
787
801
  return { ok: false, why: 'not_positive' };
788
802
  return { ok: true, value };
789
803
  }
790
- const ACCESSOR_READ_ORDER = ['live', 'memoryCapture', 'hostSettings', 'settings', 'maxCostUsd', 'excludeAllTools', 'maxTokens', 'outputRetries', 'inheritEnv', 'requireExistingSession', 'disableSkills', 'approvalReach', 'allowTools', 'userInvokedSkills', 'projectMemory'];
804
+ const ACCESSOR_READ_ORDER = ['live', 'memoryCapture', 'hostSettings', 'settings', 'maxCostUsd', 'excludeAllTools', 'maxTokens', 'outputRetries', 'inheritEnv', 'requireExistingSession', 'disableSkills', 'approvalReach', 'allowTools', 'userInvokedSkills', 'projectMemory', 'thinkingLatch'];
791
805
  const MATERIALIZE_AT_READ = Object.freeze({ allowTools: (v) => allowToolsSnapshot(v), userInvokedSkills: (v) => allowToolsSnapshot(v) });
792
806
  function dataFirstSnapshot(input, afterData) {
793
807
  let descs;
@@ -878,6 +892,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
878
892
  const approvalReachIn = src.approvalReach;
879
893
  const allowToolsIn = src.allowTools;
880
894
  const projectMemoryIn = src.projectMemory;
895
+ const thinkingLatchIn = src.thinkingLatch;
881
896
  const INPUT_KEYS = Object.keys(INPUT_KEY_ROUTES);
882
897
  const i = snapshotByName(src, INPUT_KEYS, {
883
898
  live,
@@ -892,6 +907,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
892
907
  approvalReach: approvalReachIn,
893
908
  allowTools: allowToolsIn,
894
909
  projectMemory: projectMemoryIn,
910
+ thinkingLatch: thinkingLatchIn,
895
911
  settings: settingsIn,
896
912
  });
897
913
  const SETTINGS_KEYS = Object.keys(SETTINGS_KEY_ROUTES);
@@ -921,6 +937,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
921
937
  refuseBadApprovalReach(approvalReachIn, 'buildTaskRequest');
922
938
  refuseBadAllowTools(allowToolsIn);
923
939
  refuseBadProjectMemory(projectMemoryIn);
940
+ refuseBadThinkingLatch(thinkingLatchIn);
924
941
  refuseBadUserInvokedSkills(i.userInvokedSkills);
925
942
  const rewindRoute = INPUT_KEY_ROUTES.rewind;
926
943
  const RETIRED_REWIND_FILES_KEY = 'rewindFiles';
@@ -1019,7 +1036,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1019
1036
  return present(value);
1020
1037
  if (route.via === 'control' || route.via === 'settings')
1021
1038
  return false;
1022
- const cause = omissionCauseOf(standingOf(route), lane, live, origin);
1039
+ const cause = seatCauseOf(route, lane, live, origin);
1023
1040
  if (!inPlay(key, value))
1024
1041
  return false;
1025
1042
  if (cause === undefined)
@@ -1029,6 +1046,8 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1029
1046
  };
1030
1047
  const gate = Object.create(null);
1031
1048
  const askInput = (key) => {
1049
+ if (key === THINKING_DEFERRED_ASK)
1050
+ return;
1032
1051
  const route = INPUT_KEY_ROUTES[key];
1033
1052
  if (route.via === 'settings') {
1034
1053
  for (const sub of SETTINGS_KEYS)
@@ -1047,8 +1066,16 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1047
1066
  };
1048
1067
  for (const key of INPUT_KEYS.slice(hostTopAt))
1049
1068
  askInput(key);
1050
- const on = (key) => gate[key] === true;
1051
1069
  const onSetting = (sub) => gate[`settings.${sub}`] === true;
1070
+ const thinking = projectThinkingCore({
1071
+ lane,
1072
+ latch: thinkingLatchIn,
1073
+ strength: i.reasoningEffort,
1074
+ floor: i.reasoningFloor,
1075
+ ultracodeStamped: onSetting('ultracode') && s.ultracode === true,
1076
+ });
1077
+ gate[THINKING_DEFERRED_ASK] = carries(INPUT_KEY_ROUTES[THINKING_DEFERRED_ASK], thinking.word, THINKING_DEFERRED_ASK);
1078
+ const on = (key) => gate[key] === true;
1052
1079
  const settingsOut = {
1053
1080
  ...resolvedWire,
1054
1081
  ...(onSetting('webSearch') ? { webSearch: s.webSearch } : {}),
@@ -1063,7 +1090,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1063
1090
  sessionId: i.sessionId,
1064
1091
  ...(on('scenario') ? { scenario: i.scenario } : {}),
1065
1092
  ...(on('systemPrompt') ? { systemPrompt: i.systemPrompt } : {}),
1066
- ...(on('reasoningEffort') ? { reasoningEffort: i.reasoningEffort } : {}),
1093
+ ...(on('reasoningEffort') ? { reasoningEffort: thinking.word } : {}),
1067
1094
  ...(on('model') ? { model: i.model } : {}),
1068
1095
  ...(on('images') ? { images: i.images } : {}),
1069
1096
  ...(on('userAttachments') ? { userAttachments: [...(i.userAttachments ?? [])] } : {}),
@@ -1076,7 +1103,7 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1076
1103
  ...(on('selfOrchestration') ? { selfOrchestration: i.selfOrchestration } : {}),
1077
1104
  ...(on('deferTools') ? { deferTools: i.deferTools } : {}),
1078
1105
  ...(on('retainBackgroundProcesses') ? { retainBackgroundProcesses: i.retainBackgroundProcesses } : {}),
1079
- ...(on('promptProfile') ? { promptProfile: i.promptProfile } : {}),
1106
+ ...(on('promptLean') ? { promptLean: i.promptLean } : {}),
1080
1107
  ...(on('enableFork') ? { enableFork: i.enableFork } : {}),
1081
1108
  ...(on('attachments') ? { attachments: attachmentsForWire } : {}),
1082
1109
  ...(on('repo') ? { repo: i.repo } : {}),
@@ -1107,11 +1134,100 @@ export function assembleTaskRequest(input, laneOrIdentity) {
1107
1134
  const familiesRoute = SETTINGS_KEY_ROUTES.approvalFrameFamilies;
1108
1135
  const familiesSeated = (familiesRoute.via === 'matrix' || familiesRoute.via === 'fixed') && omissionCauseOf(standingOf(familiesRoute), lane, live, origin) === undefined;
1109
1136
  const familiesWithheld = familiesSeated && approvalFamilies === undefined ? Object.freeze({ cause: familiesJudged === undefined || familiesJudged.ok ? 'reading_absent' : familiesJudged.cause }) : undefined;
1110
- return Object.freeze({ request: out, omitted: Object.freeze([...omitted, ...lateOmitted]), host, ...(familiesWithheld !== undefined ? { approvalFrameFamiliesWithheld: familiesWithheld } : {}) });
1137
+ return Object.freeze({
1138
+ request: out,
1139
+ omitted: Object.freeze([...omitted, ...lateOmitted]),
1140
+ host,
1141
+ ...(familiesWithheld !== undefined ? { approvalFrameFamiliesWithheld: familiesWithheld } : {}),
1142
+ thinking,
1143
+ });
1111
1144
  }
1112
1145
  export function buildTaskRequest(input, laneOrIdentity) {
1113
1146
  return assembleTaskRequest(input, laneOrIdentity).request;
1114
1147
  }
1148
+ const THINKING_DEFERRED_ASK = 'reasoningEffort';
1149
+ const FLOOR_WORDS = Object.freeze(REASONING_EFFORT_WORDS.filter((w) => w !== 'off'));
1150
+ const effortRank = (w) => (typeof w === 'string' ? REASONING_EFFORT_WORDS.indexOf(w) : -1);
1151
+ const seatCauseOf = (route, lane, live, origin) => omissionCauseOf(standingOf(route), lane, live, origin);
1152
+ const frozenProjection = (p) => Object.freeze(p);
1153
+ function projectThinkingCore(c) {
1154
+ const latch = c.latch === 'on' || c.latch === 'off' ? c.latch : 'unset';
1155
+ const ultracodeStamped = c.ultracodeStamped === true;
1156
+ const strength = c.strength;
1157
+ if (c.lane === 'utility')
1158
+ return frozenProjection({ word: strength, verdict: 'utility_lane', latch, ultracodeStamped });
1159
+ if (latch === 'off') {
1160
+ const overruled = present(strength) && strength !== 'off';
1161
+ return frozenProjection({ word: 'off', verdict: 'off', latch, ultracodeStamped, ...(overruled ? { strengthOverruled: strength } : {}) });
1162
+ }
1163
+ let base = strength;
1164
+ let overruledOff = false;
1165
+ if (latch === 'on' && base === 'off') {
1166
+ base = undefined;
1167
+ overruledOff = true;
1168
+ }
1169
+ let floorApplied = false;
1170
+ const floor = c.floor;
1171
+ if (typeof floor === 'string' && FLOOR_WORDS.includes(floor) && base !== 'off') {
1172
+ const baseRank = effortRank(base);
1173
+ if (!present(base) || (baseRank >= 0 && baseRank < effortRank(floor))) {
1174
+ base = floor;
1175
+ floorApplied = true;
1176
+ }
1177
+ }
1178
+ return frozenProjection({
1179
+ word: base,
1180
+ verdict: 'strength',
1181
+ latch,
1182
+ ultracodeStamped,
1183
+ ...(floorApplied ? { floorApplied: true } : {}),
1184
+ ...(overruledOff ? { strengthOverruled: 'off' } : {}),
1185
+ });
1186
+ }
1187
+ export function thinkingTurnProjection(input) {
1188
+ let submission;
1189
+ let live;
1190
+ let latch;
1191
+ let strength;
1192
+ let floor;
1193
+ let ultracode;
1194
+ try {
1195
+ if (typeof input === 'object' && input !== null) {
1196
+ submission = input.submission;
1197
+ live = input.live;
1198
+ latch = input.latch;
1199
+ strength = input.strength;
1200
+ floor = input.floor;
1201
+ ultracode = input.ultracode;
1202
+ }
1203
+ }
1204
+ catch {
1205
+ submission = live = latch = strength = floor = ultracode = undefined;
1206
+ }
1207
+ let lane;
1208
+ let origin;
1209
+ try {
1210
+ const axes = laneAxesOf(submission, 'seat');
1211
+ lane = axes.lane;
1212
+ origin = axes.origin;
1213
+ }
1214
+ catch {
1215
+ lane = undefined;
1216
+ origin = undefined;
1217
+ }
1218
+ const ultracodeRoute = SETTINGS_KEY_ROUTES.ultracode;
1219
+ let seated = false;
1220
+ try {
1221
+ seated =
1222
+ lane !== undefined &&
1223
+ (ultracodeRoute.via === 'matrix' || ultracodeRoute.via === 'fixed') &&
1224
+ seatCauseOf(ultracodeRoute, lane, live === true, origin) === undefined;
1225
+ }
1226
+ catch {
1227
+ seated = false;
1228
+ }
1229
+ return projectThinkingCore({ lane, latch, strength, floor, ultracodeStamped: seated && inPlay('settings.ultracode', ultracode) && ultracode === true });
1230
+ }
1115
1231
  export function applyLiveRequestDefaults(req, host) {
1116
1232
  const out = { ...req };
1117
1233
  if (out.cwd == null && host.cwd !== undefined)
@@ -11,6 +11,8 @@ export type RetryStatus = {
11
11
  providerConditionSource?: string;
12
12
  elapsedMs?: number;
13
13
  timeoutMs?: number;
14
+ sleptMs?: number;
15
+ waitSegment?: BrainStatusWaitSegment | (string & {});
14
16
  detail?: string;
15
17
  } | {
16
18
  kind: 'error';
@@ -26,6 +28,8 @@ export type RetryStatus = {
26
28
  error: RetryStatusErrorPayload;
27
29
  elapsedMs?: number;
28
30
  timeoutMs?: number;
31
+ sleptMs?: number;
32
+ waitSegment?: BrainStatusWaitSegment | (string & {});
29
33
  } | {
30
34
  kind: 'waiting';
31
35
  deadline: number;
@@ -38,6 +42,8 @@ export type RetryStatus = {
38
42
  providerConditionSource?: string;
39
43
  elapsedMs?: number;
40
44
  timeoutMs?: number;
45
+ sleptMs?: number;
46
+ waitSegment?: BrainStatusWaitSegment | (string & {});
41
47
  terminal?: never;
42
48
  error: RetryStatusErrorPayload;
43
49
  };
@@ -69,8 +75,12 @@ export interface BrainStatusPayload {
69
75
  timeoutMs?: number;
70
76
  providerCondition?: string;
71
77
  providerConditionSource?: string;
78
+ sleptMs?: number;
79
+ waitSegment?: BrainStatusWaitSegment | (string & {});
72
80
  }
73
- export declare const BRAIN_STATUS_PAYLOAD_KEYS: readonly ["phase", "detail", "retryInSec", "retryInMs", "attempt", "maxRetries", "errClass", "retryAtMs", "errorStatus", "elapsedMs", "timeoutMs", "providerCondition", "providerConditionSource"];
81
+ export declare const BRAIN_STATUS_WAIT_SEGMENTS: readonly ["response_headers", "first_token"];
82
+ export type BrainStatusWaitSegment = (typeof BRAIN_STATUS_WAIT_SEGMENTS)[number];
83
+ export declare const BRAIN_STATUS_PAYLOAD_KEYS: readonly ["phase", "detail", "retryInSec", "retryInMs", "attempt", "maxRetries", "errClass", "retryAtMs", "errorStatus", "elapsedMs", "timeoutMs", "providerCondition", "providerConditionSource", "sleptMs", "waitSegment"];
74
84
  export declare function mapBrainStatusToRetry(p: BrainStatusPayload, nowMs: number): RetryStatus | null;
75
85
  export interface RetryStatusArmLike {
76
86
  readonly phase?: string;
@@ -86,6 +96,8 @@ export interface RetryStatusArmLike {
86
96
  readonly timeoutMs?: number;
87
97
  readonly providerCondition?: string;
88
98
  readonly providerConditionSource?: string;
99
+ readonly sleptMs?: number;
100
+ readonly waitSegment?: string;
89
101
  readonly parentToolCallId?: string;
90
102
  }
91
103
  export declare function retryStatusFromArm(arm: RetryStatusArmLike | null | undefined, nowMs: number): RetryStatus | null | undefined;
@@ -11,6 +11,9 @@ export const BRAIN_STATUS_PHASES = [
11
11
  'gave_up',
12
12
  'waiting_first_token',
13
13
  ];
14
+ export const BRAIN_STATUS_WAIT_SEGMENTS = Object.freeze(['response_headers', 'first_token']);
15
+ void true;
16
+ void true;
14
17
  export const BRAIN_STATUS_PAYLOAD_KEYS = [
15
18
  'phase',
16
19
  'detail',
@@ -25,6 +28,8 @@ export const BRAIN_STATUS_PAYLOAD_KEYS = [
25
28
  'timeoutMs',
26
29
  'providerCondition',
27
30
  'providerConditionSource',
31
+ 'sleptMs',
32
+ 'waitSegment',
28
33
  ];
29
34
  const _brainStatusKeyPin = [true, true];
30
35
  void _brainStatusKeyPin;
@@ -41,9 +46,11 @@ export function mapBrainStatusToRetry(p, nowMs) {
41
46
  const cause = typeof p.errClass === 'string' && p.errClass.length > 0 ? { errClass: p.errClass } : {};
42
47
  const producerTiming = typeof p.retryAtMs === 'number' ? { retryAtMs: p.retryAtMs } : {};
43
48
  const failureStatus = typeof p.errorStatus === 'number' ? { errorStatus: p.errorStatus } : {};
49
+ const providerCondition = p.providerCondition;
50
+ const providerConditionSource = p.providerConditionSource;
44
51
  const providerJudged = {
45
- ...(typeof p.providerCondition === 'string' && p.providerCondition.length > 0 ? { providerCondition: p.providerCondition } : {}),
46
- ...(typeof p.providerConditionSource === 'string' && p.providerConditionSource.length > 0 ? { providerConditionSource: p.providerConditionSource } : {}),
52
+ ...(typeof providerCondition === 'string' && providerCondition.length > 0 ? { providerCondition } : {}),
53
+ ...(typeof providerConditionSource === 'string' && providerConditionSource.length > 0 ? { providerConditionSource } : {}),
47
54
  };
48
55
  const saneMs = (v) => typeof v === 'number' && Number.isFinite(v) && v >= 0 ? v : undefined;
49
56
  const elapsedMs = saneMs(p.elapsedMs);
@@ -52,10 +59,16 @@ export function mapBrainStatusToRetry(p, nowMs) {
52
59
  ...(elapsedMs !== undefined ? { elapsedMs } : {}),
53
60
  ...(timeoutMs !== undefined ? { timeoutMs } : {}),
54
61
  };
62
+ const sleptMs = saneMs(p.sleptMs);
63
+ const waitSegment = p.waitSegment;
64
+ const waitFacts = {
65
+ ...(sleptMs !== undefined ? { sleptMs } : {}),
66
+ ...(typeof waitSegment === 'string' && waitSegment.length > 0 ? { waitSegment } : {}),
67
+ };
55
68
  const stalledShown = typeof p.detail === 'string' && p.detail.length > 0 ? displayUntrusted(p.detail) : '';
56
69
  const stalledDetail = stalledShown.length > 0 ? { detail: stalledShown } : {};
57
70
  const shown = (absent) => (typeof p.detail === 'string' ? displayUntrusted(p.detail) : absent);
58
- const extra = { ...counts, ...cause, ...producerTiming, ...failureStatus, ...providerJudged, ...waitProgress };
71
+ const extra = { ...counts, ...cause, ...producerTiming, ...failureStatus, ...providerJudged, ...waitProgress, ...waitFacts };
59
72
  switch (p.phase) {
60
73
  case 'recovered':
61
74
  return null;
@@ -99,8 +112,8 @@ export function retryStatusFromArm(arm, nowMs) {
99
112
  const v = str(key);
100
113
  return v !== undefined && v.length > 0 ? v : undefined;
101
114
  };
102
- const [detail, retryInSec, retryInMs, attempt, maxRetries, errClass, retryAtMs, errorStatus, elapsedMs, timeoutMs, providerCondition, providerConditionSource] = [
103
- str('detail'), num('retryInSec'), num('retryInMs'), num('attempt'), num('maxRetries'), str('errClass'), num('retryAtMs'), num('errorStatus'), num('elapsedMs'), num('timeoutMs'), word('providerCondition'), word('providerConditionSource'),
115
+ const [detail, retryInSec, retryInMs, attempt, maxRetries, errClass, retryAtMs, errorStatus, elapsedMs, timeoutMs, providerCondition, providerConditionSource, sleptMs, waitSegment] = [
116
+ str('detail'), num('retryInSec'), num('retryInMs'), num('attempt'), num('maxRetries'), str('errClass'), num('retryAtMs'), num('errorStatus'), num('elapsedMs'), num('timeoutMs'), word('providerCondition'), word('providerConditionSource'), num('sleptMs'), word('waitSegment'),
104
117
  ];
105
118
  const phase = str('phase');
106
119
  if (phase === undefined)
@@ -119,6 +132,8 @@ export function retryStatusFromArm(arm, nowMs) {
119
132
  ...(timeoutMs !== undefined ? { timeoutMs } : {}),
120
133
  ...(providerCondition !== undefined ? { providerCondition } : {}),
121
134
  ...(providerConditionSource !== undefined ? { providerConditionSource } : {}),
135
+ ...(sleptMs !== undefined ? { sleptMs } : {}),
136
+ ...(waitSegment !== undefined ? { waitSegment } : {}),
122
137
  }, nowMs);
123
138
  }
124
139
  const WAIT_SWITCH_FRACTION = 0.5;
package/dist/seam.js CHANGED
@@ -170,7 +170,7 @@ const CHROME_ARM_TABLE = {
170
170
  },
171
171
  text_segment_end: {
172
172
  required: true,
173
- duty: '🔴 引擎明报的 assistant 散文段边界 + **该段权威全文**(#323/core #447;server ≥7.75.3 起 content 经脱敏器、' +
173
+ duty: '🔴 引擎明报的 assistant 散文段边界 + **该段权威全文**(server ≥7.75.3 起 content 经脱敏器、' +
174
174
  'text_delta 仍逐字 ⇒ 两者**可以不相等**)。①`diverged` 在场(never false)⇒ 你按增量拼出来的那一段是过期的,' +
175
175
  '必须用 content **重渲该段**并以它为该段 committed 文本,不许保留增量拼文;②`committedPrefixDiverged` 在场' +
176
176
  '(never false)⇒ 这一段此前已 committed 上屏的正文**也**过期了,🔴 本包在这一形上**一个字节都不再交**(唯一不同:本段已提交行的归属说不出 —— 上游两行同 uuid,`committedUuids` 整键缺席 —— 时本包一个字节不动,还押着的原始那截在本事件之后照旧作为本段末行交出)' +
@@ -13,6 +13,7 @@ import type { SubagentContentEvent } from "./subagentContentStore.js";
13
13
  import type { DeviceEnrollTokenOutcome, DeviceListOutcome, DeviceRebindOutcome, DeviceRevokeOutcome, DeviceSessionBindingOutcome, DeviceTransport, DeviceUnarmed, DeviceUnreadable } from "./deviceRebind.js";
14
14
  import type { McpPanelView } from "./mcpPanel.js";
15
15
  import type { McpToolToggleKey } from "./mcpToolToggles.js";
16
+ import { type ThinkingLatchEvent, type ThinkingLatchRowWord } from "./thinkingLatchWords.js";
16
17
  export interface SeatValidationFailure {
17
18
  reason: string;
18
19
  field?: string;
@@ -47,6 +48,7 @@ export interface LocalSessionRecord {
47
48
  }>;
48
49
  parked?: boolean;
49
50
  pinned?: boolean;
51
+ thinkingLatch?: ThinkingLatchRowWord;
50
52
  }
51
53
  export declare const TOOL_PERMISSION_REQUEST_ID_DOMAINS: readonly ["live:", "durable:", "question:", "elicit:", "plan:"];
52
54
  export type ToolPermissionRequestIdDomain = (typeof TOOL_PERMISSION_REQUEST_ID_DOMAINS)[number];
@@ -190,7 +192,7 @@ export type SeatStreamReading = {
190
192
  };
191
193
  export declare function seatStreamDeltaMessage(event: SeatStreamDeltaSource, ids: SeatStreamDeltaIds): SeatStreamEventMessage | undefined;
192
194
  export declare function readSeatStreamDelta(message: object): SeatStreamReading;
193
- export declare const SEAT_CAPABILITY_NAMES: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles"];
195
+ export declare const SEAT_CAPABILITY_NAMES: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch"];
194
196
  export type SeatCapabilityName = (typeof SEAT_CAPABILITY_NAMES)[number];
195
197
  export interface SeatCapabilitiesState {
196
198
  pickFolder?: boolean;
@@ -201,6 +203,7 @@ export interface SeatCapabilitiesState {
201
203
  engineTarget?: boolean;
202
204
  onboard?: boolean;
203
205
  mcpToolToggles?: boolean;
206
+ thinkingLatch?: boolean;
204
207
  }
205
208
  export type SeatCapabilityReading = {
206
209
  readonly kind: "reported";
@@ -304,6 +307,10 @@ export interface SessionRowPatchRequest {
304
307
  pinned?: boolean;
305
308
  }
306
309
  export declare const SESSION_ROW_PATCH_REQUEST_KEYS: readonly ["sessionId", "title", "pinned"];
310
+ export interface SetThinkingLatchRequest {
311
+ readonly sessionId: string;
312
+ readonly event: ThinkingLatchEvent;
313
+ }
307
314
  export interface AttachmentUploadReceipt {
308
315
  id: string;
309
316
  name: string;
@@ -630,6 +637,7 @@ export interface LocalSessionsApi {
630
637
  readSessionMcpPanel(sessionId: string): Promise<McpPanelView | DeviceUnreadable | DeviceTransport | DeviceUnarmed>;
631
638
  listMcpToolToggles(): Promise<McpToolTogglesResult>;
632
639
  setMcpToolToggle(key: McpToolToggleKey, enabled: boolean): Promise<OkAck>;
640
+ setThinkingLatch(req: SetThinkingLatchRequest): Promise<OkAck>;
633
641
  onEvent(cb: (ev: LocalSessionEvent) => void): () => void;
634
642
  onToolPermissionRequest(cb: (req: ToolPermissionRequest) => void): () => void;
635
643
  sessionsStateStore: EipcStoreClient<SessionsState>;
@@ -671,14 +679,16 @@ export declare function checkSendMessageRequest(v: unknown): SeatValidation;
671
679
  export declare function isSendMessageRequest(v: unknown): v is SendMessageRequest;
672
680
  export declare const checkSessionRowPatchRequest: (v: unknown) => SeatValidation;
673
681
  export declare function isSessionRowPatchRequest(v: unknown): v is SessionRowPatchRequest;
682
+ export declare const checkSetThinkingLatchRequest: (v: unknown) => SeatValidation;
683
+ export declare function isSetThinkingLatchRequest(v: unknown): v is SetThinkingLatchRequest;
674
684
  export declare function isSendMessageAck(v: unknown): v is SendMessageAck;
675
685
  export declare const LOCAL_SESSIONS_SPEC: EipcServiceSpec;
676
- export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "pickFolder", "listRecentFolders", "noteRecentFolder", "patchSession", "listDevices", "readSessionBinding", "rebindSession", "issueEnrollToken", "revokeDevice", "setEngineMode", "startCloudLogin", "cancelCloudLogin", "connectCloudEngine", "configureCloudEngine", "clearCloudEngine", "listOnboardProviders", "probeOnboardEntry", "applyOnboardEntry", "readSessionMcpPanel", "listMcpToolToggles", "setMcpToolToggle", "onEvent", "onToolPermissionRequest"];
686
+ export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "pickFolder", "listRecentFolders", "noteRecentFolder", "patchSession", "listDevices", "readSessionBinding", "rebindSession", "issueEnrollToken", "revokeDevice", "setEngineMode", "startCloudLogin", "cancelCloudLogin", "connectCloudEngine", "configureCloudEngine", "clearCloudEngine", "listOnboardProviders", "probeOnboardEntry", "applyOnboardEntry", "readSessionMcpPanel", "listMcpToolToggles", "setMcpToolToggle", "setThinkingLatch", "onEvent", "onToolPermissionRequest"];
677
687
  export declare const SEAT_STORE_PROPS: readonly ["sessionsStateStore", "focusedSessionStateStore", "settingsStateStore", "seatCapabilitiesStateStore", "engineTargetStateStore"];
678
688
  export declare const SEAT_EVENT_METHOD_NAMES: readonly ["onEvent", "onToolPermissionRequest"];
679
689
  export declare const LOCAL_SESSION_EVENT_KEYS: readonly ["type", "sessionId", "message", "error", "errorCategory", "code", "session", "userMessageUuid", "requestId", "outcome", "parked", "chrome", "_sema_turnFailure", "subagentContent"];
680
690
  export declare const TOOL_PERMISSION_REQUEST_KEYS: readonly ["requestId", "sessionId", "toolName", "toolCallId", "input", "message", "toctouBinding", "createdAtMs", "governanceForced", "delegation", "mandated", "mandate", "origin", "ruleOffersAbsence", "askClass", "classes", "sessionRow"];
681
- export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned"];
691
+ export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "thinkingLatch"];
682
692
  export declare const SEND_MESSAGE_REQUEST_KEYS: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "forwardSubagentEvents", "retainSubagentSessions", "settings", "scenario", "rewind"];
683
693
  export declare const SEAT_SEND_MESSAGE_KEY_ORIGINS: {
684
694
  readonly sessionId: {
@@ -728,7 +738,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
728
738
  readonly LocalSessionRecord: {
729
739
  readonly guard: "isLocalSessionRecord";
730
740
  readonly check: (v: unknown) => SeatValidation;
731
- readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned"];
741
+ readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "thinkingLatch"];
732
742
  readonly unchecked: readonly [];
733
743
  };
734
744
  readonly ToolPermissionRequest: {
@@ -808,6 +818,12 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
808
818
  readonly validated: readonly ["sessionId", "title", "pinned"];
809
819
  readonly unchecked: readonly [];
810
820
  };
821
+ readonly SetThinkingLatchRequest: {
822
+ readonly guard: "isSetThinkingLatchRequest";
823
+ readonly check: (v: unknown) => SeatValidation;
824
+ readonly validated: readonly ["sessionId", "event"];
825
+ readonly unchecked: readonly [];
826
+ };
811
827
  readonly ApplyModelConfigResult: {
812
828
  readonly check: (v: unknown) => SeatValidation;
813
829
  readonly validated: readonly ["ok", "requiresRestart", "reason", "detail"];
@@ -861,7 +877,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
861
877
  };
862
878
  readonly SeatCapabilitiesState: {
863
879
  readonly check: (v: unknown) => SeatValidation;
864
- readonly validated: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles"];
880
+ readonly validated: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch"];
865
881
  readonly unchecked: readonly [];
866
882
  };
867
883
  readonly RecentFoldersResult: {
@@ -907,7 +923,7 @@ export declare const SEAT_VALIDATOR_COVERAGE_EXEMPT: readonly [...{
907
923
  }[], {
908
924
  readonly label: "PickFolderResult";
909
925
  readonly check: (v: unknown) => SeatValidation;
910
- readonly why: "载荷是**串或 null**(选中的路径 / 用户取消,CC-469),没有键面 ⇒ `keyof` 覆盖表在它身上无从谈起。判别力由 run-seat-wave2-test.mjs ST1-1 承担:认 null 与非空串、拒空串 / 数 / undefined / 对象 / 布尔五形。";
926
+ readonly why: "载荷是**串或 null**(选中的路径 / 用户取消,CC-469),没有键面 ⇒ `keyof` 覆盖表在它身上无从谈起。判别力由对应的座位契约测试套承担:认 null 与非空串、拒空串 / 数 / undefined / 对象 / 布尔五形。";
911
927
  }, {
912
928
  readonly label: "BooleanAck";
913
929
  readonly check: (v: unknown) => SeatValidation;