@sema-agent/client-core 0.71.3 → 0.72.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 (44) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +3 -3
  3. package/dist/adapt/arms.js +4 -1
  4. package/dist/adapter/activeRunSelfHeal.d.ts +0 -2
  5. package/dist/adapter/activeRunSelfHeal.js +1 -1
  6. package/dist/adapter/downstream/eventToSdkMessage.d.ts +5 -0
  7. package/dist/adapter/downstream/eventToSdkMessage.js +12 -1
  8. package/dist/engineErrorCodes.d.ts +0 -20
  9. package/dist/engineErrorCodes.js +6 -6
  10. package/dist/engineNoticeCodes.d.ts +1 -1
  11. package/dist/engineNoticeCodes.js +4 -1
  12. package/dist/finalVerifyWire.d.ts +0 -6
  13. package/dist/finalVerifyWire.js +1 -1
  14. package/dist/fleet/fleetProjection.d.ts +0 -44
  15. package/dist/fleet/fleetProjection.js +9 -9
  16. package/dist/hitl/armedGateRegistry.d.ts +0 -6
  17. package/dist/hitl/armedGateRegistry.js +3 -3
  18. package/dist/hitl/gateIdentity.d.ts +0 -4
  19. package/dist/hitl/gateIdentity.js +2 -2
  20. package/dist/hitl/hitlBridge.d.ts +0 -2
  21. package/dist/hitl/hitlBridge.js +1 -1
  22. package/dist/hitl/planReviewWire.d.ts +0 -2
  23. package/dist/hitl/planReviewWire.js +1 -1
  24. package/dist/model/catalogLoader.d.ts +0 -6
  25. package/dist/model/catalogLoader.js +3 -3
  26. package/dist/model/providerAuth.d.ts +0 -8
  27. package/dist/model/providerAuth.js +4 -4
  28. package/dist/model/providerCatalog.d.ts +0 -2
  29. package/dist/model/providerCatalog.js +1 -1
  30. package/dist/modelCapabilityProbe.d.ts +0 -4
  31. package/dist/modelCapabilityProbe.js +2 -2
  32. package/dist/oneShotWireCaps.d.ts +0 -2
  33. package/dist/oneShotWireCaps.js +1 -1
  34. package/dist/peerFrames.d.ts +0 -11
  35. package/dist/peerFrames.js +1 -1
  36. package/dist/promptProfileWireCaps.d.ts +0 -1
  37. package/dist/promptProfileWireCaps.js +1 -1
  38. package/dist/seam.d.ts +3 -1
  39. package/dist/toolResult.d.ts +0 -17
  40. package/dist/toolResult.js +1 -1
  41. package/dist/ultracodeWireCaps.d.ts +0 -3
  42. package/dist/ultracodeWireCaps.js +1 -1
  43. package/docs/INTEGRATION-CLIENTS.md +75 -22
  44. package/package.json +2 -2
@@ -20,12 +20,8 @@
20
20
  *
21
21
  * 🔴 零 import 纯函数叶(portability:不进任何闭包新边;index 闭包 +1 文件已登记)。
22
22
  */
23
- /** overlay 问答帧的 ask-gate 命名空间前缀(`parkResolver.surfaceGateAndDecide` 合成帧 id 用)。 */
24
- export declare const HITL_ASK_QUESTION_ID_PREFIX = "hitl-ask:";
25
23
  /** plan_review 审批卡的合成 questionId 前缀(`planReviewWire` 首次 arm 与重开腿共用)。 */
26
24
  export declare const PLAN_REVIEW_QUESTION_ID_PREFIX = "plan-review:";
27
- /** live `tool_approval` 帧腿的卡口 callKey 前缀(帧上无 gatedCallId 可对齐,以 approvalId 铸)。 */
28
- export declare const HITL_FRAME_CALL_KEY_PREFIX = "hitl-frame:";
29
25
  /** 重开腿铸新身份的尾分隔符(`…#reopen-<suffix>`);键归一时从这里剥尾,首呈与重开落同一键。 */
30
26
  export declare const REOPEN_ID_TAIL = "#reopen-";
31
27
  /**
@@ -21,11 +21,11 @@
21
21
  * 🔴 零 import 纯函数叶(portability:不进任何闭包新边;index 闭包 +1 文件已登记)。
22
22
  */
23
23
  /** overlay 问答帧的 ask-gate 命名空间前缀(`parkResolver.surfaceGateAndDecide` 合成帧 id 用)。 */
24
- export const HITL_ASK_QUESTION_ID_PREFIX = 'hitl-ask:';
24
+ const HITL_ASK_QUESTION_ID_PREFIX = 'hitl-ask:';
25
25
  /** plan_review 审批卡的合成 questionId 前缀(`planReviewWire` 首次 arm 与重开腿共用)。 */
26
26
  export const PLAN_REVIEW_QUESTION_ID_PREFIX = 'plan-review:';
27
27
  /** live `tool_approval` 帧腿的卡口 callKey 前缀(帧上无 gatedCallId 可对齐,以 approvalId 铸)。 */
28
- export const HITL_FRAME_CALL_KEY_PREFIX = 'hitl-frame:';
28
+ const HITL_FRAME_CALL_KEY_PREFIX = 'hitl-frame:';
29
29
  /** 重开腿铸新身份的尾分隔符(`…#reopen-<suffix>`);键归一时从这里剥尾,首呈与重开落同一键。 */
30
30
  export const REOPEN_ID_TAIL = '#reopen-';
31
31
  /**
@@ -69,8 +69,6 @@ import type { AgentEvent, ApprovalDecision, ApprovalStaleError, PendingCheckpoin
69
69
  import type { ApprovalsListEnvelope } from './crashConverged.js';
70
70
  /** durable `/decide` 腿的既有缺省拒因(不带归因时逐字不变 —— 0.27.0 及之前的 wire 字节)。 */
71
71
  export declare const DEFAULT_DENY_REASON = "The user rejected this tool use";
72
- /** server 两条腿共用的 reason 字符上限(超限 413,决断被打回)。 */
73
- export declare const MAX_DENY_REASON_CHARS = 4096;
74
72
  /**
75
73
  * 归因原文 → 可上 wire 的形。缺席/非串/纯空白 ⇒ `undefined`(调用方自定回落:deny 腿落
76
74
  * {@link DEFAULT_DENY_REASON},plan-review 腿键不落);超上限 ⇒ 截到上限并 debug 留痕。
@@ -11,7 +11,7 @@ import { abortableSleep } from '../abortableSleep.js';
11
11
  /** durable `/decide` 腿的既有缺省拒因(不带归因时逐字不变 —— 0.27.0 及之前的 wire 字节)。 */
12
12
  export const DEFAULT_DENY_REASON = 'The user rejected this tool use';
13
13
  /** server 两条腿共用的 reason 字符上限(超限 413,决断被打回)。 */
14
- export const MAX_DENY_REASON_CHARS = 4096;
14
+ const MAX_DENY_REASON_CHARS = 4096;
15
15
  /**
16
16
  * 归因原文 → 可上 wire 的形。缺席/非串/纯空白 ⇒ `undefined`(调用方自定回落:deny 腿落
17
17
  * {@link DEFAULT_DENY_REASON},plan-review 腿键不落);超上限 ⇒ 截到上限并 debug 留痕。
@@ -65,8 +65,6 @@ export declare function planReviewDecisionFromAnswer(answer: QuestionAnswer | nu
65
65
  * (它们没有 dismissed 臂会到达记账行)。
66
66
  */
67
67
  export declare function notePlanReviewAnsweredIfDecisive(questionId: unknown, answer: QuestionAnswer | null | undefined): void;
68
- /** W1 带 key 变体。 */
69
- export declare function notePlanReviewAnsweredIfDecisiveFor(sessionKey: string, questionId: unknown, answer: QuestionAnswer | null | undefined): void;
70
68
  /**
71
69
  * done 帧的 plan_review park 形状(结构性读,别的终局一律 false)。
72
70
  *
@@ -89,7 +89,7 @@ export function notePlanReviewAnsweredIfDecisive(questionId, answer) {
89
89
  notePlanReviewAnsweredIfDecisiveFor(DEFAULT_SESSION_KEY, questionId, answer);
90
90
  }
91
91
  /** W1 带 key 变体。 */
92
- export function notePlanReviewAnsweredIfDecisiveFor(sessionKey, questionId, answer) {
92
+ function notePlanReviewAnsweredIfDecisiveFor(sessionKey, questionId, answer) {
93
93
  if (planReviewDecisionFromAnswer(answer ?? { answers: [] }) === 'dismissed')
94
94
  return;
95
95
  notePlanReviewAnsweredFor(sessionKey, questionId);
@@ -56,12 +56,6 @@ export declare const DEFAULT_CATALOG_SOURCES: readonly string[];
56
56
  export declare const CATALOG_DEFAULT_HOSTS: readonly string[];
57
57
  /** 候选链的 env 键(一键安装脚本改这里;settings.json `env` 块同名同义,见 design/166 §2)。 */
58
58
  export declare const CATALOG_SOURCES_ENV = "SEMA_CATALOG_SOURCES";
59
- /** 每源传输预算(design/166 §1:onboard 不能被网络拖住)。 */
60
- export declare const DEFAULT_CATALOG_TIMEOUT_MS = 3500;
61
- /** 缓存相对 configHome 的落点(design/166 §3)。 */
62
- export declare const CATALOG_CACHE_RELATIVE_PATH = "cache/model-catalog.json";
63
- /** 缓存陈旧阈值:30 天(照用,但如实标 stale)。 */
64
- export declare const CATALOG_CACHE_STALE_MS: number;
65
59
  /**
66
60
  * 单源的**传输层**结局。
67
61
  *
@@ -59,11 +59,11 @@ export const CATALOG_DEFAULT_HOSTS = ['raw.githubusercontent.com', 'cdn.jsdelivr
59
59
  /** 候选链的 env 键(一键安装脚本改这里;settings.json `env` 块同名同义,见 design/166 §2)。 */
60
60
  export const CATALOG_SOURCES_ENV = 'SEMA_CATALOG_SOURCES';
61
61
  /** 每源传输预算(design/166 §1:onboard 不能被网络拖住)。 */
62
- export const DEFAULT_CATALOG_TIMEOUT_MS = 3500;
62
+ const DEFAULT_CATALOG_TIMEOUT_MS = 3500;
63
63
  /** 缓存相对 configHome 的落点(design/166 §3)。 */
64
- export const CATALOG_CACHE_RELATIVE_PATH = 'cache/model-catalog.json';
64
+ const CATALOG_CACHE_RELATIVE_PATH = 'cache/model-catalog.json';
65
65
  /** 缓存陈旧阈值:30 天(照用,但如实标 stale)。 */
66
- export const CATALOG_CACHE_STALE_MS = 30 * 24 * 60 * 60 * 1000;
66
+ const CATALOG_CACHE_STALE_MS = 30 * 24 * 60 * 60 * 1000;
67
67
  /** 单源允许的重定向跳数上限(有界:302 环不许把 onboard 转死)。 */
68
68
  const MAX_REDIRECTS = 5;
69
69
  /** 异常 → 短 detail(只取 message 前段,绝不带栈、绝不带载荷;与 catalog.ts 同一口径)。 */
@@ -131,14 +131,6 @@ export interface DeviceCodeAuthOptions {
131
131
  /** 单次 HTTP 预算(缺省 `DEVICE_CODE_HTTP_TIMEOUT_MS`)。 */
132
132
  timeoutMs?: number;
133
133
  }
134
- /** 轮询间隔下限(RFC 8628 建议 5s;服务端给更大的值时听服务端的)。 */
135
- export declare const DEVICE_CODE_MIN_INTERVAL_MS = 5000;
136
- /** 会话墙钟上限(design/166 §5:15min)。服务端 `expires_in` 更短时听服务端的。 */
137
- export declare const DEVICE_CODE_MAX_LIFETIME_MS: number;
138
- /** 429 / slow_down 的退避增量(RFC 8628 §3.5 就是「加 5 秒」)。 */
139
- export declare const DEVICE_CODE_BACKOFF_STEP_MS = 5000;
140
- /** 单次 HTTP 预算。 */
141
- export declare const DEVICE_CODE_HTTP_TIMEOUT_MS = 10000;
142
134
  /**
143
135
  * 开一次设备码会话 —— **端点由调用方给**(包内表里那一行,或门的合成 descriptor)。
144
136
  * 🔴 端点是**编译进包的常量**,不是远端数据,所以本函数不对它再做白名单;真正的门是
@@ -28,13 +28,13 @@ export function providerAuthMethods(preset) {
28
28
  return out;
29
29
  }
30
30
  /** 轮询间隔下限(RFC 8628 建议 5s;服务端给更大的值时听服务端的)。 */
31
- export const DEVICE_CODE_MIN_INTERVAL_MS = 5000;
31
+ const DEVICE_CODE_MIN_INTERVAL_MS = 5000;
32
32
  /** 会话墙钟上限(design/166 §5:15min)。服务端 `expires_in` 更短时听服务端的。 */
33
- export const DEVICE_CODE_MAX_LIFETIME_MS = 15 * 60 * 1000;
33
+ const DEVICE_CODE_MAX_LIFETIME_MS = 15 * 60 * 1000;
34
34
  /** 429 / slow_down 的退避增量(RFC 8628 §3.5 就是「加 5 秒」)。 */
35
- export const DEVICE_CODE_BACKOFF_STEP_MS = 5000;
35
+ const DEVICE_CODE_BACKOFF_STEP_MS = 5000;
36
36
  /** 单次 HTTP 预算。 */
37
- export const DEVICE_CODE_HTTP_TIMEOUT_MS = 10_000;
37
+ const DEVICE_CODE_HTTP_TIMEOUT_MS = 10_000;
38
38
  /** 异常 → 短 detail(绝不带栈、绝不带响应体)。 */
39
39
  function shortError(e) {
40
40
  return (e instanceof Error ? e.message : String(e)).slice(0, 160);
@@ -47,8 +47,6 @@ export interface ProviderCatalogRow {
47
47
  /** 没账号时的注册入口;缺席 = 用 consoleUrl 那条 */
48
48
  signupUrl?: string;
49
49
  }
50
- /** api 家族的行内短名(目录行/芯片行两端同一个词,不各自缩写)。 */
51
- export declare const providerApiShortName: (api: ProviderPreset["api"]) => string;
52
50
  /**
53
51
  * 全表 → 目录行。**顺序 = 表序**(约束②):这里没有 filter,也没有 sort。
54
52
  * `presets` 入参只给测试用(注入一张小表),产品路径恒走 `PROVIDER_PRESETS`。
@@ -34,7 +34,7 @@ const hostOf = (u) => {
34
34
  }
35
35
  };
36
36
  /** api 家族的行内短名(目录行/芯片行两端同一个词,不各自缩写)。 */
37
- export const providerApiShortName = (api) => api === 'anthropic-messages' ? 'anthropic' : 'openai';
37
+ const providerApiShortName = (api) => api === 'anthropic-messages' ? 'anthropic' : 'openai';
38
38
  /**
39
39
  * 全表 → 目录行。**顺序 = 表序**(约束②):这里没有 filter,也没有 sort。
40
40
  * `presets` 入参只给测试用(注入一张小表),产品路径恒走 `PROVIDER_PRESETS`。
@@ -186,10 +186,6 @@ export interface ModelProbeResult {
186
186
  verdict: string;
187
187
  evidence: ModelProbeEvidence;
188
188
  }
189
- /** 固定题面 —— 短、无歧义、任何模型都答得出,且答案长度可判。 */
190
- export declare const PROBE_PROMPT = "Reply with exactly OK";
191
- /** 输出上限:够答一句 `OK`,又不至于让一台在思考的网关烧掉一整个预算。 */
192
- export declare const PROBE_MAX_TOKENS = 64;
193
189
  /**
194
190
  * 铸一只探测请求体。
195
191
  * @param entry 被探测的条目(只取 `id`)
@@ -95,9 +95,9 @@ export const MODEL_PROBE_VERDICTS = Object.freeze([
95
95
  'inconclusive',
96
96
  ]);
97
97
  /** 固定题面 —— 短、无歧义、任何模型都答得出,且答案长度可判。 */
98
- export const PROBE_PROMPT = 'Reply with exactly OK';
98
+ const PROBE_PROMPT = 'Reply with exactly OK';
99
99
  /** 输出上限:够答一句 `OK`,又不至于让一台在思考的网关烧掉一整个预算。 */
100
- export const PROBE_MAX_TOKENS = 64;
100
+ const PROBE_MAX_TOKENS = 64;
101
101
  /**
102
102
  * 铸一只探测请求体。
103
103
  * @param entry 被探测的条目(只取 `id`)
@@ -29,8 +29,6 @@
29
29
  * 那个)。PURE — callers pass `env`;caller gates to LIVE mode(mock request shape 不变)。
30
30
  */
31
31
  import { type EnvLike } from './hostEnv.js';
32
- /** The env key the shell reads(SEMA_ 命名空间;`-p` 车道 per-request 意图面,非引擎部署面)。 */
33
- export declare const ONE_SHOT_ENV: "SEMA_HEADLESS_ONE_SHOT";
34
32
  /**
35
33
  * ENV source → `true`(缺省 ON = `-p` 提交的一次性本性),只有显式 falsy 逃生口
36
34
  * ({@link envFlagOff} 拼写集)⇒ `undefined`(不 stamp ⇒ 引擎缺省交互态指引)。
@@ -31,7 +31,7 @@
31
31
  import { hostEnv } from './hostEnv.js';
32
32
  import { envFlagOff } from './envFlag.js';
33
33
  /** The env key the shell reads(SEMA_ 命名空间;`-p` 车道 per-request 意图面,非引擎部署面)。 */
34
- export const ONE_SHOT_ENV = 'SEMA_HEADLESS_ONE_SHOT';
34
+ const ONE_SHOT_ENV = 'SEMA_HEADLESS_ONE_SHOT';
35
35
  /**
36
36
  * ENV source → `true`(缺省 ON = `-p` 提交的一次性本性),只有显式 falsy 逃生口
37
37
  * ({@link envFlagOff} 拼写集)⇒ `undefined`(不 stamp ⇒ 引擎缺省交互态指引)。
@@ -89,17 +89,6 @@ export type PeerFrameProjection = AgentMessageFrame | CrossSessionMessageFrame |
89
89
  * 后者是一张 15 键白名单,这三条载体一个都不在里面。
90
90
  */
91
91
  export declare function classifyPeerNotification(n: Record<string, unknown>): PeerFrameProjection | null;
92
- /**
93
- * core `ENGINE_AUTHORITY_ENVELOPE_TAGS` 的镜像(`core/untrusted-text.ts::ENGINE_ENVELOPES` 里 kind="authority" 的标签):
94
- * 这些信封在模型面/转录面代表**引擎权威**,一段同事正文里出现它们就是伪造。core 的 `neutralizePeerBody`
95
- * (= `sanitizeUntrustedText(body, PEER_BODY_ENVELOPE_TAGS)`)在渲染信封**之前**先把它们拆火(`<` 后插 ZWSP),
96
- * 本模块首版只抄了后一步(同名信封拆火)——异源发包扫描 [high] 实证:子代正文里一段
97
- * `<task-notification><task-id>victim</task-id><status>completed</status>…` 会原样进转录 block,
98
- * 宿主 resume 时 `parseTranscriptNotificationSeeds` 把它读成真完成通知 ⇒ 去重台账被毒化,受害 run 的
99
- * 真完成通知随后被跨通道臂整条吞掉。这里补上那一步,并与 core 同形(`<\s*\/?\s*(tag)(\s[^>]*)?>` 全大小写)。
100
- * 🔴 单向(与 core 一致):端的解析腿**不**还原 ZWSP —— 拆掉的权威标签就该永远是拆掉的。
101
- */
102
- export declare const AUTHORITY_ENVELOPE_TAGS: readonly ["system-reminder", "task-notification", "new-diagnostics", "user_memory", "scope", "skills", "total_tokens", "instruction-files"];
103
92
  /**
104
93
  * 投影 → 转录行文本(端的消息面按标签分派的那一份)。
105
94
  *
@@ -225,7 +225,7 @@ export function classifyPeerNotification(n) {
225
225
  * 真完成通知随后被跨通道臂整条吞掉。这里补上那一步,并与 core 同形(`<\s*\/?\s*(tag)(\s[^>]*)?>` 全大小写)。
226
226
  * 🔴 单向(与 core 一致):端的解析腿**不**还原 ZWSP —— 拆掉的权威标签就该永远是拆掉的。
227
227
  */
228
- export const AUTHORITY_ENVELOPE_TAGS = Object.freeze([
228
+ const AUTHORITY_ENVELOPE_TAGS = Object.freeze([
229
229
  'system-reminder',
230
230
  'task-notification',
231
231
  'new-diagnostics',
@@ -12,6 +12,5 @@
12
12
  * 同款)。CALLER 前置 live 门(mock 形不变)。
13
13
  */
14
14
  import { type EnvLike } from './hostEnv.js';
15
- export declare const PROMPT_PROFILE_ENV: "SEMA_PROMPT_PROFILE";
16
15
  export type PromptProfile = 'simple' | 'classic';
17
16
  export declare function promptProfileFromEnv(env?: EnvLike): PromptProfile | undefined;
@@ -12,7 +12,7 @@
12
12
  * 同款)。CALLER 前置 live 门(mock 形不变)。
13
13
  */
14
14
  import { hostEnv } from './hostEnv.js';
15
- export const PROMPT_PROFILE_ENV = 'SEMA_PROMPT_PROFILE';
15
+ const PROMPT_PROFILE_ENV = 'SEMA_PROMPT_PROFILE';
16
16
  export function promptProfileFromEnv(env = hostEnv()) {
17
17
  const raw = env[PROMPT_PROFILE_ENV];
18
18
  const s = typeof raw === 'string' ? raw.trim().toLowerCase() : '';
package/dist/seam.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  import type { ModelUsage, SDKMessage } from '@sema-agent/agent-types';
10
10
  import type { EngineTurnUsage } from './adapter/downstream/turnUsageToModelUsage.js';
11
11
  import type { RunCostReconcile } from './adapter/downstream/terminalToSdkResult.js';
12
- import type { WiringManifestAutoMode, WiringManifestModelGate, WiringManifestMcpEntryView, WiringManifestHookEntryView, WiringManifestLspSeamView, ContextUsageSectionView } from './adapter/downstream/eventToSdkMessage.js';
12
+ import type { WiringManifestAutoMode, WiringManifestModelGate, WiringManifestMcpEntryView, WiringManifestHookEntryView, WiringManifestLspSeamView, WiringManifestWriteProtectionView, ContextUsageSectionView } from './adapter/downstream/eventToSdkMessage.js';
13
13
  import type { ToolRosterView, ToolRosterDeltaView } from './toolRoster.js';
14
14
  /**
15
15
  * `AbortSignal` 的结构型(B3 扩容,SEAM-GAP-4)。
@@ -593,6 +593,8 @@ export interface WiringManifestChromeEvent {
593
593
  hooks?: readonly WiringManifestHookEntryView[];
594
594
  /** CC-08 ①:第六段 —— LSP 接缝(在场 iff 解析出了 manager 席;`mounted` 与 `lane` 禁合读)。 */
595
595
  lsp?: WiringManifestLspSeamView;
596
+ /** core 7.20.1(0.71.4):第七段 —— 写保护判官自报 targetView(present-iff 编译出判官;🔴 缺席 = 第三态,不折 spelling-only)。 */
597
+ writeProtection?: WiringManifestWriteProtectionView;
596
598
  /** core 铸的事件身份(uuidv7 形);wire 未必带 ⇒ 缺席时本键不在场。 */
597
599
  eventId?: string;
598
600
  }
@@ -107,23 +107,6 @@ export type ModelFacingTaskOutput = {
107
107
  export declare function parseModelFacingTaskOutput(text: string): ModelFacingTaskOutput;
108
108
  export declare function backgroundReceiptParseCalls(): number;
109
109
  export declare function _resetBackgroundReceiptParseCountForTest(): void;
110
- /**
111
- * T14 回落 —— 后台回执**三代文案**正则(#117a:core ≥1.283 的 `Command running in background` 是
112
- * 第三代)。structured bash 在场时由 `background`/`task_id` 位取代(见 `wireOutputToBody`)——
113
- * **该函数在 structured 权威时必须零调用**(`wireOutputToBody` 的 T14 分支已经这样接线;
114
- * `backgroundReceiptParseCalls()` 是这条不变量的仪器)。
115
- * 🔴 legacy 回落登记(REF-CC-域词表-04):三代并列是本函数唯一存在的理由 —— 旧分支不能删,
116
- * 是因为不知道哪个仍在跑的引擎版本还只发这三代文案里的某一代。**何时可删**:当
117
- * `run-engine-vocab-floor-test.mjs`(engine-vocab 门)确认全部受支持的引擎地板版本都已发
118
- * `structured.type === 'bash'` 的 `task_id`/`background.task_id` 位(即 structured 白名单成为
119
- * **唯一**判据,不再有 tolerate-absent 的老引擎在保修窗内)时,本函数随之退役;
120
- * `detectEngineBgShellReceipt`(#117a 面板探测器,复用同一份 `THREE_GEN_BG_RECEIPT_RE`)另行
121
- * 评估——它的存在理由不是「structured 回落」而是「引擎侧秒关该卡、只能靠回执文案桥」,
122
- * 不随本函数退役自动失效。
123
- */
124
- export declare function parseBackgroundReceipt(text: string): {
125
- taskId: string;
126
- } | null;
127
110
  /**
128
111
  * T8 —— 压平非均匀 §E1 `output`(`string` | `(Text|Image)[]`)。
129
112
  * ⚠️ 真源在 adapt.ts(A 层 settle 报告也用同一份),本文件只 import,别再写第二份。
@@ -327,7 +327,7 @@ export function _resetBackgroundReceiptParseCountForTest() {
327
327
  * 评估——它的存在理由不是「structured 回落」而是「引擎侧秒关该卡、只能靠回执文案桥」,
328
328
  * 不随本函数退役自动失效。
329
329
  */
330
- export function parseBackgroundReceipt(text) {
330
+ function parseBackgroundReceipt(text) {
331
331
  backgroundReceiptParseCount++;
332
332
  const bg = THREE_GEN_BG_RECEIPT_RE.exec(text);
333
333
  return bg?.[1] !== undefined ? { taskId: bg[1] } : null;
@@ -56,9 +56,6 @@ export declare function ultracodeFromInput(humanInput: string | undefined): true
56
56
  */
57
57
  export declare function ultracodeForRequest(humanInput: string | undefined): true | undefined;
58
58
  export declare function workflowFromInput(humanInput: string | undefined): true | undefined;
59
- /** Env escape hatch for the deferred-Workflow factory default: `SEMA_WORKFLOW_DEFER=0/false/no/off` restores the
60
- * pre-[1052] always-exposed shape (schema bytes back in the prefix). Anything else (incl. unset) = defer ON. */
61
- export declare const WORKFLOW_DEFER_ENV: "SEMA_WORKFLOW_DEFER";
62
59
  /**
63
60
  * [1052]① 收官形(clay 裁 B 的 core deferred 机制件,cli 接线半场):Workflow「全局默认开但不暴露」——
64
61
  * 未命中激活源的 TaskRequest 带 `deferTools:["Workflow"]`(core 1.314 对已挂载工具做 design/36 延迟披露:
@@ -87,7 +87,7 @@ export function workflowFromInput(humanInput) {
87
87
  }
88
88
  /** Env escape hatch for the deferred-Workflow factory default: `SEMA_WORKFLOW_DEFER=0/false/no/off` restores the
89
89
  * pre-[1052] always-exposed shape (schema bytes back in the prefix). Anything else (incl. unset) = defer ON. */
90
- export const WORKFLOW_DEFER_ENV = 'SEMA_WORKFLOW_DEFER';
90
+ const WORKFLOW_DEFER_ENV = 'SEMA_WORKFLOW_DEFER';
91
91
  /** 拼写集 = {@link envFlagOff}(REF-CC-141 dup-02 单源)。 */
92
92
  function deferOptedOut(env) {
93
93
  return envFlagOff(env[WORKFLOW_DEFER_ENV]);