@sema-agent/client-core 0.94.0 → 0.96.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 (332) hide show
  1. package/CHANGELOG.md +521 -0
  2. package/README.md +104 -57
  3. package/dist/adapt/arms.js +12 -7
  4. package/dist/adapt/panelTasks.js +4 -10
  5. package/dist/adapt/toolCards.d.ts +1 -0
  6. package/dist/adapt/toolCards.js +18 -5
  7. package/dist/adapt/wireShapes.js +5 -24
  8. package/dist/adapter/activeRunSelfHeal.d.ts +12 -3
  9. package/dist/adapter/activeRunSelfHeal.js +50 -16
  10. package/dist/adapter/downstream/eventToSdkMessage.js +33 -18
  11. package/dist/adapter/downstream/terminalToSdkResult.js +19 -12
  12. package/dist/adapter/runStream.js +30 -46
  13. package/dist/adapter/types.d.ts +7 -0
  14. package/dist/adapter/types.js +15 -0
  15. package/dist/agentSession/backgroundView.js +5 -1
  16. package/dist/agentSession/engineAgentRegistryRead.js +7 -5
  17. package/dist/agentSession/engineSessionBackgroundStop.js +25 -17
  18. package/dist/agentsWireCaps.d.ts +2 -0
  19. package/dist/agentsWireCaps.js +13 -2
  20. package/dist/approvalDecidedByCapability.d.ts +0 -1
  21. package/dist/approvalDecidedByCapability.js +2 -7
  22. package/dist/approvalsStreamLiveCapability.d.ts +0 -1
  23. package/dist/approvalsStreamLiveCapability.js +2 -6
  24. package/dist/atMostOnce.d.ts +8 -0
  25. package/dist/atMostOnce.js +36 -0
  26. package/dist/attachmentSeatCapability.d.ts +0 -1
  27. package/dist/attachmentSeatCapability.js +0 -3
  28. package/dist/attachmentsWireCaps.js +11 -6
  29. package/dist/bashExitReading.d.ts +10 -0
  30. package/dist/bashExitReading.js +12 -0
  31. package/dist/callerCwdCapability.d.ts +0 -5
  32. package/dist/callerCwdCapability.js +2 -13
  33. package/dist/centerWiringCapability.d.ts +1 -7
  34. package/dist/centerWiringCapability.js +18 -27
  35. package/dist/classifierStatus.js +4 -4
  36. package/dist/classifierVerdictWire.js +4 -16
  37. package/dist/clientSlice.js +1 -1
  38. package/dist/cloudConfigWireCaps.d.ts +3 -3
  39. package/dist/cloudConfigWireCaps.js +85 -43
  40. package/dist/compensations.js +1 -1
  41. package/dist/coreValuePorts.d.ts +11 -7
  42. package/dist/coreValuePorts.js +5 -8
  43. package/dist/credentialProvenance.d.ts +28 -0
  44. package/dist/credentialProvenance.js +76 -0
  45. package/dist/cycleOrder.d.ts +15 -0
  46. package/dist/cycleOrder.js +45 -0
  47. package/dist/decideFailureNote.js +7 -2
  48. package/dist/decideReceipt.d.ts +2 -1
  49. package/dist/decideReceipt.js +39 -14
  50. package/dist/declared/supportFloorDeclared.d.ts +1 -0
  51. package/dist/declared/supportFloorDeclared.js +5 -0
  52. package/dist/deviceExecutorManagementCapability.d.ts +0 -1
  53. package/dist/deviceExecutorManagementCapability.js +7 -16
  54. package/dist/deviceRebind.d.ts +88 -0
  55. package/dist/deviceRebind.js +242 -0
  56. package/dist/displayUntrusted.d.ts +8 -3
  57. package/dist/displayUntrusted.js +661 -63
  58. package/dist/engineAgentAbsence.d.ts +2 -2
  59. package/dist/engineAgentPanelStore.d.ts +8 -18
  60. package/dist/engineAgentPanelStore.js +19 -537
  61. package/dist/engineCapReader.d.ts +6 -6
  62. package/dist/engineCapReader.js +30 -43
  63. package/dist/engineCapsCache.d.ts +13 -2
  64. package/dist/engineCapsCache.js +276 -44
  65. package/dist/engineCredentialRequirement.d.ts +9 -0
  66. package/dist/engineCredentialRequirement.js +23 -0
  67. package/dist/engineDirectory.d.ts +79 -0
  68. package/dist/engineDirectory.js +186 -0
  69. package/dist/engineEnvSourcing.d.ts +53 -0
  70. package/dist/engineEnvSourcing.js +81 -0
  71. package/dist/engineErrorCodes.d.ts +28 -4
  72. package/dist/engineErrorCodes.js +68 -25
  73. package/dist/engineIdentity.js +2 -0
  74. package/dist/engineNoticeCodes.d.ts +17 -0
  75. package/dist/engineNoticeCodes.js +57 -3
  76. package/dist/engineWireSdk.js +2 -2
  77. package/dist/engineWordRenames.d.ts +8 -0
  78. package/dist/engineWordRenames.js +13 -0
  79. package/dist/executionLaneCapability.d.ts +2 -3
  80. package/dist/executionLaneCapability.js +18 -23
  81. package/dist/fileHistoryCaptureCapability.d.ts +14 -1
  82. package/dist/fileHistoryCaptureCapability.js +72 -6
  83. package/dist/fileHistoryLegNotice.d.ts +3 -2
  84. package/dist/fileHistoryLegNotice.js +51 -2
  85. package/dist/fleet/bgSubagentRow.d.ts +15 -0
  86. package/dist/fleet/bgSubagentRow.js +67 -0
  87. package/dist/fleet/fleetLedger.d.ts +3 -0
  88. package/dist/fleet/fleetLedger.js +153 -122
  89. package/dist/fleet/fleetProjection.d.ts +1 -3
  90. package/dist/fleet/fleetProjection.js +19 -19
  91. package/dist/fleetAgentPanelProjection.d.ts +4 -17
  92. package/dist/fleetAgentPanelProjection.js +7 -197
  93. package/dist/fleetAgentRowLike.d.ts +16 -0
  94. package/dist/fleetAgentRowLike.js +1 -0
  95. package/dist/fleetTaskDesc.js +4 -17
  96. package/dist/gateOutcome.d.ts +12 -1
  97. package/dist/gateOutcome.js +87 -18
  98. package/dist/gateVocabulary.d.ts +7 -2
  99. package/dist/gateVocabulary.js +5 -1
  100. package/dist/generated/engineAskFaceTables.js +1 -1
  101. package/dist/generated/engineFactTables.d.ts +5 -3
  102. package/dist/generated/engineFactTables.js +17 -4
  103. package/dist/generated/engineNoticeTables.js +12 -3
  104. package/dist/generated/sdkFactTables.d.ts +2 -0
  105. package/dist/generated/sdkFactTables.js +17 -0
  106. package/dist/generated/settingsSchemaFns.d.ts +13 -0
  107. package/dist/generated/settingsSchemaFns.js +75 -0
  108. package/dist/generated/toolNameTables.d.ts +1 -0
  109. package/dist/generated/toolNameTables.js +1 -0
  110. package/dist/headlessPermissionModeWire.d.ts +1 -1
  111. package/dist/headlessPermissionModeWire.js +1 -1
  112. package/dist/headlessReconnectWire.js +49 -20
  113. package/dist/hitl/allowRuleShadow.d.ts +1 -1
  114. package/dist/hitl/allowRuleShadow.js +49 -8
  115. package/dist/hitl/approvalCompleteParked.d.ts +1 -0
  116. package/dist/hitl/approvalCompleteParked.js +14 -0
  117. package/dist/hitl/approvalEndingCause.d.ts +7 -0
  118. package/dist/hitl/approvalEndingCause.js +71 -0
  119. package/dist/hitl/approvalHolds.d.ts +12 -2
  120. package/dist/hitl/approvalHolds.js +53 -2
  121. package/dist/hitl/approvalsFeed.js +23 -11
  122. package/dist/hitl/askGateWire.d.ts +2 -1
  123. package/dist/hitl/askGateWire.js +26 -1
  124. package/dist/hitl/askParkRowRouting.js +1 -1
  125. package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
  126. package/dist/hitl/automaticAnswerVerdict.js +15 -10
  127. package/dist/hitl/crashConverged.js +2 -0
  128. package/dist/hitl/decisionConflict.d.ts +3 -0
  129. package/dist/hitl/decisionConflict.js +41 -0
  130. package/dist/hitl/decisionRefusal.d.ts +12 -0
  131. package/dist/hitl/decisionRefusal.js +63 -4
  132. package/dist/hitl/frameRouter.d.ts +0 -1
  133. package/dist/hitl/frameRouter.js +32 -57
  134. package/dist/hitl/gateLedger.d.ts +5 -0
  135. package/dist/hitl/gateLedger.js +21 -0
  136. package/dist/hitl/hitlBridge.d.ts +17 -2
  137. package/dist/hitl/hitlBridge.js +91 -55
  138. package/dist/hitl/hitlHostSurface.js +3 -11
  139. package/dist/hitl/livePendingAsk.d.ts +16 -6
  140. package/dist/hitl/livePendingAsk.js +36 -4
  141. package/dist/hitl/localAllowRule.d.ts +1 -0
  142. package/dist/hitl/localAllowRule.js +2 -2
  143. package/dist/hitl/noAllowCause.d.ts +2 -1
  144. package/dist/hitl/noAllowCause.js +3 -2
  145. package/dist/hitl/parkExpiryJudgements.d.ts +19 -0
  146. package/dist/hitl/parkExpiryJudgements.js +46 -0
  147. package/dist/hitl/parkResolver.d.ts +4 -7
  148. package/dist/hitl/parkResolver.js +12 -34
  149. package/dist/hitl/parkRowBirthWait.d.ts +1 -0
  150. package/dist/hitl/parkRowBirthWait.js +2 -2
  151. package/dist/hitl/persistedRulesWire.js +5 -1
  152. package/dist/hitl/planReviewWire.d.ts +3 -2
  153. package/dist/hitl/planReviewWire.js +154 -50
  154. package/dist/hitl/replayedApproval.d.ts +9 -0
  155. package/dist/hitl/replayedApproval.js +139 -10
  156. package/dist/hitl/resumeRunningCard.d.ts +2 -0
  157. package/dist/hitl/resumeRunningCard.js +15 -4
  158. package/dist/hitl/sessionPolicyDeliverable.js +8 -6
  159. package/dist/hitl/standingRows.d.ts +18 -0
  160. package/dist/hitl/standingRows.js +127 -0
  161. package/dist/hitl/toolApprovalWire.d.ts +39 -7
  162. package/dist/hitl/toolApprovalWire.js +351 -61
  163. package/dist/hookMatcherVerdict.d.ts +1 -9
  164. package/dist/hookMatcherVerdict.js +21 -61
  165. package/dist/hooksWireCaps.js +40 -8
  166. package/dist/host.d.ts +5 -0
  167. package/dist/host.js +3 -1
  168. package/dist/hostCallbackGuard.d.ts +2 -0
  169. package/dist/hostCallbackGuard.js +31 -0
  170. package/dist/index.d.ts +48 -17
  171. package/dist/index.js +36 -15
  172. package/dist/interactiveInterrupt.d.ts +8 -0
  173. package/dist/interactiveInterrupt.js +54 -0
  174. package/dist/limitsWire.d.ts +5 -0
  175. package/dist/limitsWire.js +49 -3
  176. package/dist/liveModelCatalog.d.ts +95 -0
  177. package/dist/liveModelCatalog.js +297 -32
  178. package/dist/mcpEngineLeg.d.ts +25 -0
  179. package/dist/mcpEngineLeg.js +71 -15
  180. package/dist/mcpPanel.js +2 -1
  181. package/dist/mcpProbeCapability.d.ts +0 -5
  182. package/dist/mcpProbeCapability.js +2 -12
  183. package/dist/mcpReconnect.d.ts +1 -3
  184. package/dist/mcpReconnect.js +10 -5
  185. package/dist/memoryComplianceCapability.d.ts +0 -5
  186. package/dist/memoryComplianceCapability.js +2 -12
  187. package/dist/memoryOriginCapability.d.ts +0 -5
  188. package/dist/memoryOriginCapability.js +2 -12
  189. package/dist/memorySpecWire.js +2 -2
  190. package/dist/memoryVerbsWire.d.ts +1 -1
  191. package/dist/memoryVerbsWire.js +4 -0
  192. package/dist/model/liveCatalogShape.d.ts +14 -0
  193. package/dist/model/liveCatalogShape.js +71 -0
  194. package/dist/model/modelSupplyRules.d.ts +1 -0
  195. package/dist/model/modelSupplyRules.js +30 -9
  196. package/dist/model/modelsPolicy.d.ts +21 -0
  197. package/dist/model/modelsPolicy.js +90 -0
  198. package/dist/modelIdentityResolvability.d.ts +2 -2
  199. package/dist/modelIdentityResolvability.js +14 -12
  200. package/dist/modelSwitchFallback.d.ts +69 -0
  201. package/dist/modelSwitchFallback.js +206 -0
  202. package/dist/noticePresentation.d.ts +68 -0
  203. package/dist/noticePresentation.js +247 -0
  204. package/dist/notifications.js +12 -11
  205. package/dist/outputStyleSeatCapability.d.ts +0 -2
  206. package/dist/outputStyleSeatCapability.js +2 -10
  207. package/dist/ownKey.d.ts +8 -0
  208. package/dist/ownKey.js +66 -0
  209. package/dist/panelReduce.d.ts +114 -0
  210. package/dist/panelReduce.js +1135 -0
  211. package/dist/panelStateHolder.d.ts +17 -0
  212. package/dist/panelStateHolder.js +201 -0
  213. package/dist/peerFrames.js +13 -9
  214. package/dist/peerLaneCapability.d.ts +0 -1
  215. package/dist/peerLaneCapability.js +2 -6
  216. package/dist/permissionModesCapability.d.ts +0 -5
  217. package/dist/permissionModesCapability.js +5 -16
  218. package/dist/permissionRuleIssue.js +0 -3
  219. package/dist/permissionRulesWriteCapability.d.ts +0 -1
  220. package/dist/permissionRulesWriteCapability.js +2 -6
  221. package/dist/permissionsAllowGrantCapability.d.ts +0 -1
  222. package/dist/permissionsAllowGrantCapability.js +3 -9
  223. package/dist/permissionsDeclaration.d.ts +8 -0
  224. package/dist/permissionsDeclaration.js +101 -41
  225. package/dist/printPermissionOutcome.d.ts +12 -0
  226. package/dist/printPermissionOutcome.js +50 -0
  227. package/dist/printToolResultFrame.d.ts +1 -0
  228. package/dist/printToolResultFrame.js +5 -17
  229. package/dist/promptBlockedCopy.d.ts +5 -0
  230. package/dist/promptBlockedCopy.js +35 -0
  231. package/dist/promptDelivery.js +0 -8
  232. package/dist/protocolSegment.d.ts +9 -6
  233. package/dist/protocolSegment.js +31 -21
  234. package/dist/providerRejection.d.ts +4 -0
  235. package/dist/providerRejection.js +75 -14
  236. package/dist/replayBody.d.ts +12 -0
  237. package/dist/replayBody.js +25 -0
  238. package/dist/resumeRefusalCopy.d.ts +18 -1
  239. package/dist/resumeRefusalCopy.js +127 -32
  240. package/dist/retryStatus.d.ts +9 -1
  241. package/dist/retryStatus.js +9 -2
  242. package/dist/rewindArchiveCapability.d.ts +5 -14
  243. package/dist/rewindArchiveCapability.js +18 -61
  244. package/dist/rewindArchiveReading.d.ts +15 -0
  245. package/dist/rewindArchiveReading.js +56 -0
  246. package/dist/rewindEngineAction.d.ts +21 -0
  247. package/dist/rewindEngineAction.js +36 -0
  248. package/dist/rewindWireCaps.d.ts +2 -1
  249. package/dist/rewindWireCaps.js +1 -0
  250. package/dist/ruleCompileVerdict.d.ts +9 -1
  251. package/dist/ruleCompileVerdict.js +29 -4
  252. package/dist/runTerminal.d.ts +15 -12
  253. package/dist/runTerminal.js +60 -35
  254. package/dist/sandboxWire.js +13 -0
  255. package/dist/sdkRegistryTransit.d.ts +2 -1
  256. package/dist/sdkRegistryTransit.js +1 -0
  257. package/dist/sealedKeyCapability.d.ts +0 -5
  258. package/dist/sealedKeyCapability.js +3 -15
  259. package/dist/seam.js +4 -2
  260. package/dist/seatContract.d.ts +125 -34
  261. package/dist/seatContract.js +583 -179
  262. package/dist/sessionIdSegment.d.ts +1 -0
  263. package/dist/sessionIdSegment.js +11 -0
  264. package/dist/sessionMemoryErase.d.ts +1 -1
  265. package/dist/sessionMemoryErase.js +6 -1
  266. package/dist/sessionMemoryStatus.js +3 -2
  267. package/dist/sessionPolicyCapability.d.ts +0 -1
  268. package/dist/sessionPolicyCapability.js +2 -6
  269. package/dist/sessionReadRedactionCapability.d.ts +0 -5
  270. package/dist/sessionReadRedactionCapability.js +2 -13
  271. package/dist/sessionSyncFileHistory.d.ts +4 -0
  272. package/dist/sessionSyncFileHistory.js +66 -0
  273. package/dist/sessionSyncFileHistoryCapability.d.ts +0 -2
  274. package/dist/sessionSyncFileHistoryCapability.js +2 -9
  275. package/dist/skillToolListsCapability.d.ts +0 -2
  276. package/dist/skillToolListsCapability.js +2 -9
  277. package/dist/skillsWireCaps.d.ts +4 -0
  278. package/dist/skillsWireCaps.js +66 -1
  279. package/dist/sqlEngineCapability.d.ts +0 -1
  280. package/dist/sqlEngineCapability.js +9 -14
  281. package/dist/steerPriorityCapability.d.ts +0 -2
  282. package/dist/steerPriorityCapability.js +3 -12
  283. package/dist/storePostureCapability.d.ts +1 -5
  284. package/dist/storePostureCapability.js +16 -22
  285. package/dist/streamDrainingLegs.d.ts +6 -0
  286. package/dist/streamDrainingLegs.js +23 -0
  287. package/dist/subagent/engineCompactWire.js +13 -38
  288. package/dist/subagent/engineDelegatedPrompt.js +10 -6
  289. package/dist/subagent/engineSubagentOutput.d.ts +0 -1
  290. package/dist/subagent/engineSubagentOutput.js +5 -20
  291. package/dist/subagent/engineSubagentSteer.js +7 -5
  292. package/dist/subagent/engineSubagentTail.d.ts +0 -1
  293. package/dist/subagent/engineSubagentTail.js +7 -32
  294. package/dist/subagentContentStore.js +7 -18
  295. package/dist/supportFloor.d.ts +1 -0
  296. package/dist/supportFloor.js +15 -14
  297. package/dist/systemReminderTag.d.ts +1 -0
  298. package/dist/systemReminderTag.js +8 -0
  299. package/dist/terminalStatuses.d.ts +30 -0
  300. package/dist/terminalStatuses.js +67 -0
  301. package/dist/toolHistoryMismatch.d.ts +0 -3
  302. package/dist/toolHistoryMismatch.js +3 -7
  303. package/dist/toolResult.d.ts +6 -1
  304. package/dist/toolResult.js +90 -37
  305. package/dist/toolResultContent.d.ts +2 -0
  306. package/dist/toolResultContent.js +63 -0
  307. package/dist/types/engineState.d.ts +2 -1
  308. package/dist/usageAnalytics.d.ts +146 -0
  309. package/dist/usageAnalytics.js +335 -0
  310. package/dist/userInvokedSkillsCapability.d.ts +0 -2
  311. package/dist/userInvokedSkillsCapability.js +2 -9
  312. package/dist/webSearchBackendCapability.d.ts +0 -1
  313. package/dist/webSearchBackendCapability.js +3 -7
  314. package/dist/webSearchWireCaps.js +3 -11
  315. package/dist/wireErrorTriage.d.ts +2 -0
  316. package/dist/wireErrorTriage.js +34 -5
  317. package/dist/wireFailureShape.d.ts +23 -2
  318. package/dist/wireFailureShape.js +88 -43
  319. package/dist/wireRefusalCopy.js +2 -18
  320. package/dist/workflowClient.js +7 -11
  321. package/dist/workflowsJournalCapability.d.ts +0 -1
  322. package/dist/workflowsJournalCapability.js +2 -6
  323. package/dist/writeProtectionCapability.d.ts +0 -1
  324. package/dist/writeProtectionCapability.js +5 -10
  325. package/docs/INTEGRATION-CLIENTS.md +2279 -27
  326. package/package.json +5 -5
  327. package/dist/engineCapsGenerationGuard.d.ts +0 -4
  328. package/dist/engineCapsGenerationGuard.js +0 -19
  329. package/dist/panelRunningHistory.d.ts +0 -22
  330. package/dist/panelRunningHistory.js +0 -82
  331. package/dist/registryConflict.d.ts +0 -3
  332. package/dist/registryConflict.js +0 -44
@@ -1,5 +1,6 @@
1
1
  import { HOOK_TOOL_ALIASES } from './hookToolAliases.js';
2
2
  import { SETTINGS_TOOL_NAME_MATCHER_EVENTS } from './generated/settingsSchemaTables.js';
3
+ import { SETTINGS_HOOK_MATCHER_FORM, SETTINGS_HOOK_MATCHER_SELECTS } from './generated/settingsSchemaFns.js';
3
4
  const TOOL_NAME_MATCHER_EVENTS = new Set(SETTINGS_TOOL_NAME_MATCHER_EVENTS);
4
5
  const MATCHER_MAX_CHARS = 8192;
5
6
  const PATTERN_WORK_BUDGET = 10_000_000;
@@ -14,30 +15,6 @@ function refused(reading, p) {
14
15
  function aliasPairs() {
15
16
  return Object.entries(HOOK_TOOL_ALIASES).map(([alias, canonical]) => ({ alias, canonical }));
16
17
  }
17
- function literalNames(matcher) {
18
- const names = [];
19
- let first = -1;
20
- let last = -1;
21
- for (let i = 0; i <= matcher.length; i++) {
22
- const c = i < matcher.length ? matcher.charCodeAt(i) : 0x7c;
23
- if (c === 0x7c || c === 0x2c) {
24
- if (first !== -1)
25
- names.push(matcher.slice(first, last + 1));
26
- first = -1;
27
- last = -1;
28
- continue;
29
- }
30
- if (c === 0x20)
31
- continue;
32
- const nameChar = (c >= 0x30 && c <= 0x39) || (c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) || c === 0x5f || c === 0x2d;
33
- if (!nameChar)
34
- return undefined;
35
- if (first === -1)
36
- first = i;
37
- last = i;
38
- }
39
- return names;
40
- }
41
18
  const UNSUPPORTED = Symbol('unsupported');
42
19
  const SINGLE_CHAR_ESCAPES = 'dDwWsStnrfv^$\\.*+?()[]{}|/-';
43
20
  function patternBound(src, n) {
@@ -202,52 +179,35 @@ function patternBound(src, n) {
202
179
  export function hookMatcherVerdict(event, matcher) {
203
180
  if (typeof event !== 'string' || !TOOL_NAME_MATCHER_EVENTS.has(event))
204
181
  return unjudged('event_out_of_scope');
205
- if (matcher === undefined)
206
- return Object.freeze({ kind: 'matchesAll' });
207
- if (typeof matcher !== 'string')
182
+ if (matcher !== undefined && typeof matcher !== 'string')
208
183
  return unjudged('not_a_string');
209
- if (matcher.length > MATCHER_MAX_CHARS)
184
+ if (matcher !== undefined && matcher.length > MATCHER_MAX_CHARS)
210
185
  return unjudged('oversize');
211
- if (matcher === '' || matcher === '*')
212
- return Object.freeze({ kind: 'matchesAll' });
213
- const pairs = aliasPairs();
214
- const names = literalNames(matcher);
215
- if (names !== undefined) {
216
- const dead = pairs.find((p) => names.includes(p.alias) && !names.includes(p.canonical));
217
- if (dead !== undefined)
218
- return refused('names', dead);
219
- return Object.freeze({
220
- kind: 'accepted',
221
- reading: 'names',
222
- names: Object.freeze([...names]),
223
- aliases: Object.freeze(pairs.filter((p) => names.includes(p.alias)).map((p) => Object.freeze({ ...p }))),
224
- });
225
- }
226
- const src = `^(?:${matcher})$`;
227
- let re;
228
- try {
229
- re = new RegExp(src);
230
- }
231
- catch {
186
+ const form = SETTINGS_HOOK_MATCHER_FORM(matcher);
187
+ if (form === 'invalid')
232
188
  return unjudged('invalid_pattern');
189
+ const pairs = aliasPairs();
190
+ if (form === 'regex' && matcher !== undefined) {
191
+ const subjects = pairs.flatMap((p) => [p.alias, p.canonical]);
192
+ const n = subjects.reduce((a, s) => Math.max(a, s.length), 0);
193
+ const bound = patternBound(matcher, n);
194
+ if (bound === undefined)
195
+ return unjudged('pattern_unsupported');
196
+ if (bound[0] * bound[1] * (n + 1) * subjects.length > PATTERN_WORK_BUDGET)
197
+ return unjudged('over_budget');
233
198
  }
234
- const subjects = pairs.flatMap((p) => [p.alias, p.canonical]);
235
- const n = subjects.reduce((a, s) => Math.max(a, s.length), 0);
236
- const bound = patternBound(src, n);
237
- if (bound === undefined)
238
- return unjudged('pattern_unsupported');
239
- if (bound[0] * bound[1] * (n + 1) * subjects.length > PATTERN_WORK_BUDGET)
240
- return unjudged('over_budget');
241
199
  const selects = (name) => {
242
- if (matcher === name)
243
- return true;
244
200
  try {
245
- return re.test(name);
201
+ const v = SETTINGS_HOOK_MATCHER_SELECTS(matcher, name);
202
+ return typeof v === 'boolean' ? v : undefined;
246
203
  }
247
204
  catch {
248
205
  return undefined;
249
206
  }
250
207
  };
208
+ if (form === 'literal' && selects('') === true)
209
+ return Object.freeze({ kind: 'matchesAll' });
210
+ const reading = form === 'regex' ? 'pattern' : 'names';
251
211
  const selected = [];
252
212
  for (const p of pairs) {
253
213
  const a = selects(p.alias);
@@ -259,8 +219,8 @@ export function hookMatcherVerdict(event, matcher) {
259
219
  if (c === undefined)
260
220
  return unjudged('invalid_pattern');
261
221
  if (!c)
262
- return refused('pattern', p);
222
+ return refused(reading, p);
263
223
  selected.push(p);
264
224
  }
265
- return Object.freeze({ kind: 'accepted', reading: 'pattern', aliases: Object.freeze(selected.map((p) => Object.freeze({ ...p }))) });
225
+ return Object.freeze({ kind: 'accepted', reading, aliases: Object.freeze(selected.map((p) => Object.freeze({ ...p }))) });
266
226
  }
@@ -1,6 +1,6 @@
1
1
  import { engineCapNestedTrue, engineCapState, engineCapValue } from './engineCapsCache.js';
2
2
  import { displayUntrusted } from './displayUntrusted.js';
3
- import { collapseLabel } from './fleetTaskDesc.js';
3
+ import { capForDisplay, collapseLabel } from './fleetTaskDesc.js';
4
4
  import { hostLog, hostSettings } from './host.js';
5
5
  import { createSettingsHookJudge, decidePluginHooks, dedupeSettingsHookGroups, filterSettingsHookGroups, occupancyOf, settingsHookDropText, } from './pluginHooksWire.js';
6
6
  import { MAX_HOOK_NOTICE_TEXT_CHARS } from './notifications.js';
@@ -71,6 +71,35 @@ function startupModeWord(settings) {
71
71
  hostLog('debug', `hooksWireCaps: hooksStartupMode() returned ${describeStartupModeValue(v)}, which is neither 'safe' nor 'bare' — treated as neither mode (settings hooks not narrowed)`);
72
72
  return undefined;
73
73
  }
74
+ const MANAGED_POLICY_STATES = ['absent', 'in-effect', 'unreadable'];
75
+ const _managedPolicyStatesPin = [true, true];
76
+ void _managedPolicyStatesPin;
77
+ function managedPolicyUnreadable(settings) {
78
+ try {
79
+ const member = settings.managedPolicyReading;
80
+ if (member === undefined)
81
+ return false;
82
+ if (typeof member !== 'function') {
83
+ hostLog('debug', `hooksWireCaps: managedPolicyReading is ${describeStartupModeValue(member)}, not a method — fail-closed (no hooks projected to the engine)`);
84
+ return true;
85
+ }
86
+ const r = member.call(settings);
87
+ const state = typeof r === 'object' && r !== null && !Array.isArray(r) ? r.state : undefined;
88
+ const word = MANAGED_POLICY_STATES.find((w) => w === state);
89
+ if (word === 'absent' || word === 'in-effect')
90
+ return false;
91
+ if (word === 'unreadable') {
92
+ hostLog('debug', 'hooksWireCaps: managed policy layer reported unreadable — fail-closed (no hooks projected to the engine)');
93
+ return true;
94
+ }
95
+ hostLog('debug', `hooksWireCaps: managedPolicyReading() returned ${describeStartupModeValue(state)} as its state, which is none of 'absent' / 'in-effect' / 'unreadable' — fail-closed (no hooks projected to the engine)`);
96
+ return true;
97
+ }
98
+ catch (err) {
99
+ hostLog('debug', `hooksWireCaps: managedPolicyReading() threw — fail-closed (no hooks projected to the engine): ${String(err)}`);
100
+ return true;
101
+ }
102
+ }
74
103
  function hooksOfSource(source) {
75
104
  try {
76
105
  const s = hostSettings()?.getSettingsForSource(source);
@@ -183,11 +212,12 @@ export function hooksWirePlan(opts = {}) {
183
212
  const shellRuns = (event, type) => {
184
213
  if (!shellEvents.has(event))
185
214
  return false;
186
- const types = typesByEvent?.get(event);
215
+ if (typesByEvent === undefined)
216
+ return type !== 'prompt' && type !== 'agent';
217
+ const types = typesByEvent.get(event);
187
218
  return types === undefined || (typeof type === 'string' && types.has(type));
188
219
  };
189
- const settingsShellRuns = typesByEvent !== undefined ? shellRuns : (event, type) => type !== 'prompt' && type !== 'agent' && shellRuns(event, type);
190
- return buildHooksWirePlan(engine, shellRuns, true, promptAuthoredByUserOf(o), settingsShellRuns);
220
+ return buildHooksWirePlan(engine, shellRuns, true, promptAuthoredByUserOf(o));
191
221
  }
192
222
  function taskHooksCapability(baseUrl) {
193
223
  const v = engineCapValue(baseUrl, 'taskSettings');
@@ -218,7 +248,7 @@ function shellHookTypesOf(o) {
218
248
  return out;
219
249
  }
220
250
  catch (err) {
221
- hostLog('debug', `hooksWirePlan: shellHookTypesByEvent is malformed — treated as absent (command and http hooks count as running on every reported event; prompt and agent hooks from settings stay with the engine): ${String(err)}`);
251
+ hostLog('debug', `hooksWirePlan: shellHookTypesByEvent is malformed — treated as absent (command and http hooks count as running on every reported event; prompt and agent hooks are not counted as running locally): ${String(err)}`);
222
252
  return undefined;
223
253
  }
224
254
  }
@@ -238,11 +268,11 @@ function promptAuthoredByUserOf(o) {
238
268
  }
239
269
  return true;
240
270
  }
241
- function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser, settingsShellRuns = shellRuns) {
271
+ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser) {
242
272
  const settingsDropped = [];
243
273
  const settingsVerdicts = [];
244
274
  const settingsExcluded = [];
245
- const judge = withPlugins ? createSettingsHookJudge(engine, settingsShellRuns, promptAuthoredByUser) : undefined;
275
+ const judge = withPlugins ? createSettingsHookJudge(engine, shellRuns, promptAuthoredByUser) : undefined;
246
276
  let settingsStripped = 0;
247
277
  const planOf = (pluginReader, wire, verdicts = [], excluded = []) => ({ engine, pluginReader, verdicts, excluded, settingsDropped, settingsVerdicts, settingsExcluded, wire });
248
278
  const closedPlan = (settings, reason) => {
@@ -278,6 +308,8 @@ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
278
308
  hostLog('debug', `hooksWireCaps: workspace trust check threw — fail-closed (no hooks projected to the engine): ${String(err)}`);
279
309
  return closedPlan(settings, 'governance_unreadable');
280
310
  }
311
+ if (managedPolicyUnreadable(settings))
312
+ return closedPlan(settings, 'governance_unreadable');
281
313
  let policy = null;
282
314
  try {
283
315
  policy = settings.getSettingsForSource('policySettings');
@@ -430,5 +462,5 @@ export function hookFailureNoticeText(n) {
430
462
  const name = collapseLabel(n.hookName);
431
463
  const tail = n.stderr !== undefined ? `: ${collapseLabel(n.stderr)}` : '';
432
464
  const line = `${HOOK_FAILURE_WARN_PREFIX}: ${name} (${code})${tail}`;
433
- return line.length <= MAX_HOOK_NOTICE_TEXT_CHARS ? line : line.slice(0, MAX_HOOK_NOTICE_TEXT_CHARS);
465
+ return capForDisplay(line, MAX_HOOK_NOTICE_TEXT_CHARS);
434
466
  }
package/dist/host.d.ts CHANGED
@@ -8,6 +8,11 @@ export interface SettingsPort {
8
8
  mergedDisableAllHooks?(): boolean | undefined;
9
9
  enabledPluginHooks?(): PluginHooksReading;
10
10
  hooksStartupMode?(): HooksStartupMode | undefined;
11
+ managedPolicyReading?(): ManagedPolicyReading;
12
+ }
13
+ export type ManagedPolicyState = 'absent' | 'in-effect' | 'unreadable';
14
+ export interface ManagedPolicyReading {
15
+ readonly state: ManagedPolicyState;
11
16
  }
12
17
  export type HooksStartupMode = 'safe' | 'bare';
13
18
  export type PluginHookOptionValue = string | number | boolean;
package/dist/host.js CHANGED
@@ -48,7 +48,9 @@ export function installHostFor(sessionKey, ports) {
48
48
  }
49
49
  function callDiagnosticPort(call) {
50
50
  try {
51
- call();
51
+ const out = call();
52
+ if (out !== undefined && out !== null)
53
+ void Promise.resolve(out).then(undefined, () => undefined);
52
54
  return true;
53
55
  }
54
56
  catch {
@@ -0,0 +1,2 @@
1
+ export declare function invokeHostCallbackIsolated(label: string, call: () => void): void;
2
+ export declare function reasonOfThrownWithSink(e: unknown, sink: (log: string) => void): string;
@@ -0,0 +1,31 @@
1
+ import { hostLog } from './host.js';
2
+ import { wireFailureTextsOf } from './wireFailureShape.js';
3
+ function faultText(e) {
4
+ try {
5
+ return String(e).slice(0, 160);
6
+ }
7
+ catch {
8
+ return '(unprintable)';
9
+ }
10
+ }
11
+ function reportHostCallbackFault(label, what, e) {
12
+ hostLog('debug', `${label} ${what}: ${faultText(e)}`);
13
+ }
14
+ export function invokeHostCallbackIsolated(label, call) {
15
+ try {
16
+ const out = call();
17
+ if (out && typeof out.then === 'function') {
18
+ void Promise.resolve(out).then(undefined, (e) => {
19
+ reportHostCallbackFault(label, 'rejected', e);
20
+ });
21
+ }
22
+ }
23
+ catch (e) {
24
+ reportHostCallbackFault(label, 'threw', e);
25
+ }
26
+ }
27
+ export function reasonOfThrownWithSink(e, sink) {
28
+ const t = wireFailureTextsOf(e);
29
+ invokeHostCallbackIsolated('hostCallbackGuard: onFailure', () => sink(t.log));
30
+ return t.reason;
31
+ }
package/dist/index.d.ts CHANGED
@@ -13,11 +13,13 @@ export * from './adapt/textSegmentAuthority.js';
13
13
  export * from './engineHttpTools.js';
14
14
  export * from './sdkWireTransit.js';
15
15
  export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
16
- export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordBgTerminalFacts, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, } from './subagentContentStore.js';
16
+ export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, } from './subagentContentStore.js';
17
17
  export type { BgTerminalFacts, SubagentContentEvent, SubagentContentItem, SubagentContentSnapshot, SubagentContentStoreConfig, SubagentOwnerRecord, SubagentOwnerSessionConflict, SubagentViewSlot, } from './subagentContentStore.js';
18
18
  export * from './engineAgentPanelStore.js';
19
19
  export * from './engineAgentAbsence.js';
20
20
  export * from './fleetAgentPanelProjection.js';
21
+ export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './panelReduce.js';
22
+ export type { PanelFrame, PanelDelta, PanelRowFields, PanelReduceState } from './panelReduce.js';
21
23
  export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
22
24
  export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame, } from './liveQuestionStore.js';
23
25
  export * from './engineInlineTaskStats.js';
@@ -31,7 +33,7 @@ export * from './executionLaneCapability.js';
31
33
  export * from './approvalsStreamLiveCapability.js';
32
34
  export * from './peerLaneCapability.js';
33
35
  export * from './permissionRulesWriteCapability.js';
34
- export { __resetPermissionsAllowGrantReadingsForTests, forgetPermissionsAllowGrantReading, noteEngineCapsForPermissionsAllowGrant, observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
36
+ export { __resetPermissionsAllowGrantReadingsForTests, noteEngineCapsForPermissionsAllowGrant, observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
35
37
  export type { PermissionsAllowGrantReading } from './permissionsAllowGrantCapability.js';
36
38
  export * from './sessionPolicyCapability.js';
37
39
  export * from './memoryComplianceCapability.js';
@@ -40,9 +42,14 @@ export * from './memoryEntriesWire.js';
40
42
  export * from './memoryVerbsWire.js';
41
43
  export * from './deviceExecutorManagementCapability.js';
42
44
  export * from './mcpReconnect.js';
45
+ export * from './hitl/parkExpiryJudgements.js';
46
+ export * from './usageAnalytics.js';
43
47
  export * from './leaderConflict.js';
44
48
  export * from './runTerminal.js';
45
- export { providerRejectionResend, type ProviderRejectionResend } from './providerRejection.js';
49
+ export { CORE_SEMA_TASK_TERMINAL_STATUSES, CORE_TASK_NOTIFICATION_TERMINAL_STATUSES, CORE_TERMINAL_CAUSE_KINDS, SDK_FLEET_TASK_TERMINAL_STATUSES, SDK_RUN_TERMINAL_STATUSES, ccTaskTerminalStatusOf, isCoreSemaTaskTerminal, isCoreTaskNotificationTerminal, isCoreTaskNotificationTerminalNotSuccess, isCoreTerminalCauseKind, isSdkFleetTaskTerminal, isSdkFleetTaskTerminalNotSuccess, isSdkRunTerminal, isSdkRunTerminalNotSuccess, } from './terminalStatuses.js';
50
+ export type { CcTaskTerminalStatus, CoreSemaTaskTerminalStatus, CoreTaskNotificationTerminalStatus, CoreTerminalCauseKind, SdkFleetTaskTerminalStatus, SdkRunTerminalStatus, } from './terminalStatuses.js';
51
+ export type { ProviderRejectionResend, ProviderRejectionKind } from './providerRejection.js';
52
+ export { PROVIDER_REJECTION_KINDS } from './providerRejection.js';
46
53
  export * from './runCancelContext.js';
47
54
  export * from './argvFlagValue.js';
48
55
  export * from './readFacePosture.js';
@@ -51,6 +58,7 @@ export * from './mcpLiveness.js';
51
58
  export * from './mcpEngineLeg.js';
52
59
  export * from './mcpProbeCapability.js';
53
60
  export * from './sessionSyncFileHistoryCapability.js';
61
+ export * from './sessionSyncFileHistory.js';
54
62
  export * from './workflowsJournalCapability.js';
55
63
  export * from './userInvokedSkillsCapability.js';
56
64
  export * from './skillToolListsCapability.js';
@@ -76,7 +84,7 @@ export * from './modelCapabilityProbe.js';
76
84
  export * from './classifierStatus.js';
77
85
  export * from './engineToolLabelStore.js';
78
86
  export * from './fleetTaskDesc.js';
79
- export { displayUntrusted, displayUntrustedMarks } from './displayUntrusted.js';
87
+ export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
80
88
  export type { DisplayUntrustedOptions, DisplayMark, DisplayMarkSpan, DisplayUntrustedMarked } from './displayUntrusted.js';
81
89
  export type * from './types/engineState.js';
82
90
  export * from './hostEnv.js';
@@ -88,7 +96,7 @@ export * from './engineWireSdk.js';
88
96
  export * from './classifierVerdictWire.js';
89
97
  export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
90
98
  export { findSystemReminderOpenTag, type SystemReminderOpenTagSpan } from './systemReminderTag.js';
91
- export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_REFUSAL_CODES, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
99
+ export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
92
100
  export type { DelegationCapDisposition, ModelFallbackReason, OperatorGateRefusal, RunDeathVerdictCode, } from './engineErrorCodes.js';
93
101
  export * from './agentsWireCaps.js';
94
102
  export * from './attachmentsWireCaps.js';
@@ -104,6 +112,7 @@ export * from './retainBackgroundWireCaps.js';
104
112
  export * from './oneShotWireCaps.js';
105
113
  export * from './rewindWireCaps.js';
106
114
  export * from './rewindArchiveCapability.js';
115
+ export * from './rewindEngineAction.js';
107
116
  export * from './fileHistoryCaptureCapability.js';
108
117
  export { FILE_HISTORY_LEG_VERDICTS, fileHistoryLegNoticeVerdict, fileHistoryLegNoticeSentence, fileHistoryDeclarationOfBody, createFileHistoryDeclarationLedger, } from './fileHistoryLegNotice.js';
109
118
  export type { FileHistoryDeclarationFact, FileHistoryLegNoticeVerdict, FileHistoryLegNoticeInput, FileHistoryDeclarationLedger } from './fileHistoryLegNotice.js';
@@ -114,6 +123,7 @@ export * from './sealedKeyCapability.js';
114
123
  export * from './storePostureCapability.js';
115
124
  export * from './centerWiringCapability.js';
116
125
  export * from './registryQuotaUsage.js';
126
+ export * from './engineDirectory.js';
117
127
  export * from './selfOrchestrationWireCaps.js';
118
128
  export * from './skillsWireCaps.js';
119
129
  export * from './ultracodeWireCaps.js';
@@ -123,6 +133,7 @@ export * from './liveModelCatalog.js';
123
133
  export * from './modelBudgetRule.js';
124
134
  export * from './modelIdentityResolvability.js';
125
135
  export * from './sessionModelLatch.js';
136
+ export * from './modelSwitchFallback.js';
126
137
  export * from './effortWire.js';
127
138
  export * from './adapter/types.js';
128
139
  export * from './adapter/downstream/turnUsageToModelUsage.js';
@@ -137,8 +148,8 @@ export { disableSkillsDeclaration, disableSkillsDeclarationSettled } from './dis
137
148
  export { approvalReachDeclaration, approvalReachDeclarationSettled } from './approvalReachWire.js';
138
149
  export type { ApprovalReachDeclaration, ApprovalReachWithheldCause, ApprovalReachWord } from './approvalReachWire.js';
139
150
  export type { DisableSkillsDeclaration } from './disableSkillsWire.js';
140
- export { PERMISSIONS_KEPT_REASONS, WIRE_RULE_TRUST_ORDER, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
141
- export type { PermissionsClientOwnedStatement, PermissionsDeclaration, PermissionsDeclarationBuckets, PermissionsDeclarationInput, PermissionsDeclarationReport, PermissionsKeptReason, PermissionsKeptRule, PermissionsRewrittenRule, PermissionsUncheckedRule, PermissionsUnreachableRule, WireRuleOrigin, WireRuleOrigins, } from './permissionsDeclaration.js';
151
+ export { PERMISSIONS_KEPT_REASONS, WIRE_RULE_TRUST_ORDER, permissionsAllowKeptNotice, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
152
+ export type { PermissionsAllowKeptFacts, PermissionsClientOwnedStatement, PermissionsDeclaration, PermissionsDeclarationBuckets, PermissionsDeclarationInput, PermissionsDeclarationReport, PermissionsKeptReason, PermissionsKeptRule, PermissionsRewrittenRule, PermissionsUncheckedRule, PermissionsUnreachableRule, WireRuleOrigin, WireRuleOrigins, } from './permissionsDeclaration.js';
142
153
  export * from './clientSlice.js';
143
154
  export * from './host.js';
144
155
  export { abortableSleep } from './abortableSleep.js';
@@ -153,9 +164,10 @@ export * from './limitsWire.js';
153
164
  export * from './interactiveToolsWire.js';
154
165
  export * from './headlessPermissionModeWire.js';
155
166
  export * from './headlessReconnectWire.js';
156
- export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows, TERMINAL_FLEET_TASK_STATUSES, wireResumable, wireRowUsage, } from './fleet/fleetProjection.js';
167
+ export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows, wireResumable, wireRowUsage, } from './fleet/fleetProjection.js';
157
168
  export type { FleetRowUsage, FleetTaskStatus, FleetTaskView, FleetWorkflowView, NotProjectedEntry, ProjectTasksOptions, } from './fleet/fleetProjection.js';
158
169
  export * from './fleet/fleetLedger.js';
170
+ export * from './fleet/bgSubagentRow.js';
159
171
  export * from './fleet/workflowSizeWarning.js';
160
172
  export * from './subagent/engineDelegatedPrompt.js';
161
173
  export * from './subagent/engineRowStopGate.js';
@@ -178,8 +190,6 @@ export * from './corruptSessionCopy.js';
178
190
  export { classifyToolHistoryMismatch, readToolHistoryMismatchKey, resolveToolHistoryRewindTarget } from './toolHistoryMismatch.js';
179
191
  export type { ToolHistoryMismatchRowKey } from './toolHistoryMismatch.js';
180
192
  export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
181
- export { classifyRegistryConflict, isScopeGoneError } from './registryConflict.js';
182
- export type { RegistryConflictClass } from './registryConflict.js';
183
193
  export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
184
194
  export type { DeviceFlowPollingPlan } from './deviceFlowPolling.js';
185
195
  export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
@@ -188,12 +198,12 @@ export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
188
198
  export type { UserAttachmentDescriptor, UserAttachmentNotebookCell } from './userAttachmentEnvelope.js';
189
199
  export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
190
200
  export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, } from './humanTurn.js';
191
- export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat, forgetAttachmentSeatReading, __resetAttachmentSeatReadingsForTests, } from './attachmentSeatCapability.js';
201
+ export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat, __resetAttachmentSeatReadingsForTests, } from './attachmentSeatCapability.js';
192
202
  export type { AttachmentSeatReading } from './attachmentSeatCapability.js';
193
203
  export * from './resumeRefusalCopy.js';
194
204
  export * from './wireRefusalCopy.js';
195
205
  export * from './inheritEnvWire.js';
196
- export { SUPPORT_FLOOR, supportFloorOf, engineVersionTier, coreVersionTier } from './supportFloor.js';
206
+ export { SUPPORT_FLOOR, supportFloorOf, engineVersionTier, engineSupportFloorEffective, coreVersionTier } from './supportFloor.js';
197
207
  export type { SupportFloor, SupportFloorComponent, EngineVersionTier } from './supportFloor.js';
198
208
  export * from './decideReceipt.js';
199
209
  export * from './sessionMap.js';
@@ -215,8 +225,9 @@ export type { ActiveGate, ApprovalsResourceLike, AskAnswer, AssistantResourceLik
215
225
  export * from './hitl/suspendedReopen.js';
216
226
  export * from './hitl/approvalOutcomeNote.js';
217
227
  export * from './hitl/approvalResolution.js';
218
- export { toolEndOutputText, ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
219
- export { _resetHitlHostSurfaceForTest, CANCEL_DENY_BUDGET_MS, CANCEL_DENY_WARN_TEXT, EDIT_NOT_FORWARDED_WARN_TEXT, EDIT_REFUSED_ON_BLIND_ASK_WARN_TEXT, hitlHostSurfaceFor, hitlHostSurfaceMisses, hitlHostSurfaceMissesFor, installHitlHostSurface, installHitlHostSurfaceFor, observeCancelByDeny, REMEMBER_NOT_APPLIED_WARN_TEXT, REPLAYED_APPROVAL_LIST_UNREADABLE_WARN_TEXT, RULE_NOT_SENT_REJECTED_WARN_TEXT, RULE_NOT_SENT_WARN_TEXT, surfaceEditRefusedOnBlindAsk, surfaceForCurrentSession, surfaceRememberNotApplied, } from './hitl/hitlHostSurface.js';
228
+ export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
229
+ export { toolEndOutputText } from './toolResultContent.js';
230
+ export { _resetHitlHostSurfaceForTest, APPROVAL_PARKING_WARN_TEXT, CANCEL_DENY_BUDGET_MS, CANCEL_DENY_WARN_TEXT, EDIT_NOT_FORWARDED_WARN_TEXT, EDIT_REFUSED_ON_BLIND_ASK_WARN_TEXT, hitlHostSurfaceFor, hitlHostSurfaceMisses, hitlHostSurfaceMissesFor, installHitlHostSurface, installHitlHostSurfaceFor, observeCancelByDeny, REMEMBER_NOT_APPLIED_WARN_TEXT, REPLAYED_APPROVAL_LIST_UNREADABLE_WARN_TEXT, RULE_NOT_SENT_REJECTED_WARN_TEXT, RULE_NOT_SENT_WARN_TEXT, surfaceEditRefusedOnBlindAsk, surfaceForCurrentSession, surfaceRememberNotApplied, } from './hitl/hitlHostSurface.js';
220
231
  export type { ClassifierDenyContext, HitlHostSurface, HitlNotice, } from './hitl/hitlHostSurface.js';
221
232
  export * from './hitl/toolApprovalWire.js';
222
233
  export * from './hitl/editedRuleTextPrecheck.js';
@@ -236,17 +247,28 @@ export * from './hitl/sessionPolicyWire.js';
236
247
  export * from './hitl/sessionPolicyDeliverable.js';
237
248
  export * from './hitl/approvalsFeed.js';
238
249
  export * from './hitl/livePendingAsk.js';
239
- export { replayedApprovalDisposition } from './hitl/replayedApproval.js';
250
+ export { replayedApprovalClosesCardFrame, replayedApprovalDisposition, replayedApprovalSentence } from './hitl/replayedApproval.js';
240
251
  export type { ReplayedApprovalDisposition, ReplayPendingBasis } from './hitl/replayedApproval.js';
252
+ export { hasLedgerPositionKey } from './hitl/gateLedger.js';
241
253
  export { MODE_ARBITRATION, automaticAnswerVerdict, mandatedApprovalDetailOf, permissionRequestHookScope, type AutomaticAnswerLane, type AutomaticAnswerAskFace, type AutomaticAnswerFacts, type AutomaticAnswerRoad, type AutomaticAnswerUnknownWhy, type AutomaticAnswerVerdict, type PermissionRequestHookScope, } from './hitl/automaticAnswerVerdict.js';
242
- export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, type DecisionRefusalStanding, type DecisionRefusalClassified, type LiveAskPendingReading, type UndeliverableDecisionEnd, type UndeliverableDecisionFacts, } from './hitl/decisionRefusal.js';
254
+ export { standingRowsOf, type StandingRows, type StandingRowsWhy, type StandingRowWhy, type StandingPersistentRow, type StandingRowsHostFacts, } from './hitl/standingRows.js';
255
+ export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, decisionRefusalAskReading, type DecisionRefusalAskReading, type DecisionRefusalStanding, type DecisionRefusalClassified, type DecisionRefusalConflict, type LiveAskPendingReading, type UndeliverableDecisionEnd, type UndeliverableDecisionFacts, } from './hitl/decisionRefusal.js';
243
256
  export { noAllowCauseOf, type NoAllowCause, type RuleLadderNoAllowFacts } from './hitl/noAllowCause.js';
244
257
  export { policyDenyReason, type PolicyDenyLane, type PolicyDenyReasonFacts } from './hitl/frameRouter.js';
245
- export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, type ApprovalAllowRuleShadow, type ApprovalAllowRuleShadowMember, type AllowRuleShadowedWireMember, } from './hitl/allowRuleShadow.js';
258
+ export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadowSentence, type ApprovalAllowRuleShadow, type ApprovalAllowRuleShadowMember, type AllowRuleShadowedWireMember, } from './hitl/allowRuleShadow.js';
246
259
  export { projectCrashConverged } from './hitl/crashConverged.js';
247
260
  export type { ApprovalsListEnvelope, CrashConvergedOrphanState, CrashConvergedProjection, CrashConvergedRow } from './hitl/crashConverged.js';
248
261
  export * from './hitl/crashConvergedNotice.js';
262
+ export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
263
+ export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
249
264
  export * from './interactiveHalt.js';
265
+ export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
266
+ export type { InteractiveInterruptRuns, InteractiveInterruptOptions } from './interactiveInterrupt.js';
267
+ export { listDevices, readSessionBinding, rebindSession, reconcileRebindOutcome, rebindProvesRequestNotApplied } from './deviceRebind.js';
268
+ export type { DeviceSummary, DeviceListResult, DeviceBinding, DeviceSessionBinding, DeviceRebindRequest, DeviceRevokeRequest, DeviceRebindResult, DeviceEnrollToken, DeviceEnrollRequest, DeviceEnrollResult, DeviceRevokeResult, } from '@sema-agent/sdk';
269
+ export type { DeviceListVerb, DeviceSessionBindingVerb, DeviceRebindVerb, DeviceRosterRow, DeviceBindingReading, DeviceRefused, DeviceLaneAbsent, DeviceTransport, DeviceUnreadable, DeviceUnarmed, DeviceListOutcome, DeviceSessionBindingOutcome, DeviceRebindInput, DeviceRebindUnconfirmed, DeviceRebindOutcome, DeviceRebindReconcileVerdict, } from './deviceRebind.js';
270
+ export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js';
271
+ export type { EngineEnvView, EngineEnvGroupDecl, EngineEnvSourcingInput, EngineEnvTouchedKey, EngineEnvGroupReading, EngineEnvKeyReason, EngineEnvSourcingVerdict, } from './engineEnvSourcing.js';
250
272
  export * from './compensations.js';
251
273
  export * from './request/printNotification.js';
252
274
  export * from './seatContract.js';
@@ -271,3 +293,12 @@ export * from './env/localeTag.js';
271
293
  export * from './env/uiLanguage.js';
272
294
  export type { PendingCheckpoint, RuleSuggestion } from '@sema-agent/sdk';
273
295
  export * from './ruleRemovalConsequence.js';
296
+ export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
297
+ export type { EngineProbeAnswer, EngineCredentialNeed } from './engineCredentialRequirement.js';
298
+ export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
299
+ export type { CredentialAttachWord, CredentialConsent, CredentialFactName, CredentialFacts, CredentialProvenance, CredentialSidecarOwnership, CredentialTargetKind, CredentialTargetProvenance, } from './credentialProvenance.js';
300
+ export { isSessionIdPathSegment } from './sessionIdSegment.js';
301
+ export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
302
+ export type { CutForDisplayOptions, CutForDisplayResult, NoticePresentationAudience, NoticeOutlet, NoticeOccurrence, NoticeSeatClass, NoticeDeployment, NoticePresentationFacts, OutletKind, OutletReachability, OutletReachabilityContext, OutletRenderingPlan, NoticePrintCarrier, NoticePrintLineInput, NoticePrintLineResult, } from './noticePresentation.js';
303
+ export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
304
+ export type { PrintPermissionOutcome, PrintPermissionOutcomeForm } from './printPermissionOutcome.js';