@sema-agent/client-core 0.97.1 → 0.98.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 (281) hide show
  1. package/CHANGELOG.md +408 -0
  2. package/README.md +74 -37
  3. package/dist/adapt/arms.d.ts +1 -0
  4. package/dist/adapt/arms.js +128 -34
  5. package/dist/adapt/ids.d.ts +12 -1
  6. package/dist/adapt/ids.js +59 -8
  7. package/dist/adapt/instanceLedger.d.ts +50 -0
  8. package/dist/adapt/instanceLedger.js +147 -0
  9. package/dist/adapt/textStream.d.ts +1 -0
  10. package/dist/adapt/textStream.js +24 -7
  11. package/dist/adapt/toolCards.d.ts +27 -5
  12. package/dist/adapt/toolCards.js +39 -6
  13. package/dist/adapt/wireShapes.js +6 -2
  14. package/dist/adapt.d.ts +2 -0
  15. package/dist/adapt.js +8 -3
  16. package/dist/adapter/activeRunSelfHeal.d.ts +5 -0
  17. package/dist/adapter/activeRunSelfHeal.js +51 -28
  18. package/dist/adapter/downstream/eventToSdkMessage.d.ts +2 -5
  19. package/dist/adapter/downstream/eventToSdkMessage.js +27 -34
  20. package/dist/adapter/downstream/terminalToSdkResult.js +11 -4
  21. package/dist/adapter/downstream/turnUsageToModelUsage.d.ts +5 -2
  22. package/dist/adapter/downstream/turnUsageToModelUsage.js +2 -0
  23. package/dist/adapter/runStream.js +29 -13
  24. package/dist/adapter/types.d.ts +4 -4
  25. package/dist/agentSession/backgroundView.js +2 -1
  26. package/dist/agentSession/engineAgentRegistryRead.d.ts +2 -2
  27. package/dist/agentSession/engineAgentRegistryRead.js +12 -13
  28. package/dist/agentsWireCaps.d.ts +8 -8
  29. package/dist/agentsWireCaps.js +168 -175
  30. package/dist/approvalDecidedByCapability.d.ts +0 -4
  31. package/dist/approvalDecidedByCapability.js +0 -6
  32. package/dist/approvalsStreamLiveCapability.d.ts +0 -4
  33. package/dist/approvalsStreamLiveCapability.js +0 -6
  34. package/dist/assistantInbox.d.ts +34 -0
  35. package/dist/assistantInbox.js +118 -0
  36. package/dist/centerWiringCapability.js +9 -1
  37. package/dist/clientSlice.d.ts +0 -9
  38. package/dist/clientSlice.js +0 -3
  39. package/dist/cloudConfigWireCaps.d.ts +4 -2
  40. package/dist/cloudConfigWireCaps.js +81 -61
  41. package/dist/compensations.js +1 -1
  42. package/dist/connectorStatus.d.ts +21 -0
  43. package/dist/connectorStatus.js +112 -0
  44. package/dist/controlRouter.d.ts +14 -1
  45. package/dist/controlRouter.js +68 -17
  46. package/dist/coreValuePorts.d.ts +3 -3
  47. package/dist/decideReceipt.d.ts +2 -2
  48. package/dist/decideReceipt.js +5 -2
  49. package/dist/declared/supportFloorDeclared.js +3 -3
  50. package/dist/deviceExecutorManagementCapability.d.ts +0 -4
  51. package/dist/deviceExecutorManagementCapability.js +0 -6
  52. package/dist/deviceRebind.d.ts +49 -1
  53. package/dist/deviceRebind.js +221 -3
  54. package/dist/displayUntrusted.d.ts +1 -0
  55. package/dist/displayUntrusted.js +250 -76
  56. package/dist/engineAgentAbsence.d.ts +1 -1
  57. package/dist/engineAgentPanelStore.d.ts +5 -4
  58. package/dist/engineAgentPanelStore.js +3 -12
  59. package/dist/engineCapReader.d.ts +0 -4
  60. package/dist/engineCapReader.js +1 -5
  61. package/dist/engineCapsCache.d.ts +4 -0
  62. package/dist/engineCapsCache.js +17 -12
  63. package/dist/engineClosedSets.d.ts +1 -0
  64. package/dist/engineClosedSets.js +4 -1
  65. package/dist/engineErrorCodes.d.ts +9 -2
  66. package/dist/engineErrorCodes.js +9 -1
  67. package/dist/engineIdentity.d.ts +1 -0
  68. package/dist/engineIdentity.js +8 -0
  69. package/dist/engineRowRef.d.ts +28 -0
  70. package/dist/engineRowRef.js +111 -0
  71. package/dist/engineSessionMessages.d.ts +67 -0
  72. package/dist/engineSessionMessages.js +364 -0
  73. package/dist/engineToolDirectory.d.ts +0 -9
  74. package/dist/engineToolDirectory.js +1 -94
  75. package/dist/engineUrl.d.ts +18 -0
  76. package/dist/engineUrl.js +52 -0
  77. package/dist/env/uiLanguage.d.ts +9 -0
  78. package/dist/env/uiLanguage.js +35 -0
  79. package/dist/eventLeg.d.ts +92 -0
  80. package/dist/eventLeg.js +285 -0
  81. package/dist/executionLaneCapability.d.ts +0 -4
  82. package/dist/executionLaneCapability.js +3 -16
  83. package/dist/fileHistoryCaptureCapability.d.ts +0 -4
  84. package/dist/fileHistoryCaptureCapability.js +5 -7
  85. package/dist/fleet/fleetLedger.d.ts +0 -3
  86. package/dist/fleet/fleetLedger.js +21 -36
  87. package/dist/fleet/fleetProjection.d.ts +2 -2
  88. package/dist/fleet/fleetProjection.js +10 -8
  89. package/dist/frameBinding.d.ts +5 -0
  90. package/dist/frameBinding.js +23 -0
  91. package/dist/gateFailureCodes.d.ts +2 -0
  92. package/dist/gateFailureCodes.js +15 -0
  93. package/dist/gateOutcome.d.ts +3 -1
  94. package/dist/gateOutcome.js +25 -6
  95. package/dist/gateVocabulary.d.ts +5 -0
  96. package/dist/gateVocabulary.js +64 -2
  97. package/dist/generated/engineAskFaceTables.js +2 -2
  98. package/dist/generated/engineFactTables.d.ts +6 -3
  99. package/dist/generated/engineFactTables.js +22 -4
  100. package/dist/generated/engineNoticeTables.js +9 -0
  101. package/dist/generated/toolNameTables.d.ts +1 -0
  102. package/dist/generated/toolNameTables.js +1 -0
  103. package/dist/hitl/allowRuleShadow.d.ts +6 -1
  104. package/dist/hitl/allowRuleShadow.js +21 -17
  105. package/dist/hitl/approvalCardReading.d.ts +15 -0
  106. package/dist/hitl/approvalCardReading.js +154 -0
  107. package/dist/hitl/approvalCardReasons.d.ts +13 -0
  108. package/dist/hitl/approvalCardReasons.js +120 -0
  109. package/dist/hitl/approvalHolds.d.ts +47 -15
  110. package/dist/hitl/approvalHolds.js +134 -28
  111. package/dist/hitl/approvalResolution.d.ts +51 -26
  112. package/dist/hitl/approvalResolution.js +86 -122
  113. package/dist/hitl/approvalsFeed.js +6 -18
  114. package/dist/hitl/askClassPair.d.ts +2 -0
  115. package/dist/hitl/askClassPair.js +1 -0
  116. package/dist/hitl/askGateWire.d.ts +20 -2
  117. package/dist/hitl/askGateWire.js +49 -1
  118. package/dist/hitl/askParkRowRouting.d.ts +5 -0
  119. package/dist/hitl/askParkRowRouting.js +32 -1
  120. package/dist/hitl/askSettlementLine.d.ts +18 -0
  121. package/dist/hitl/askSettlementLine.js +79 -0
  122. package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
  123. package/dist/hitl/automaticAnswerVerdict.js +21 -5
  124. package/dist/hitl/crashConverged.d.ts +11 -20
  125. package/dist/hitl/crashConverged.js +56 -0
  126. package/dist/hitl/crashConvergedNotice.d.ts +3 -1
  127. package/dist/hitl/crashConvergedNotice.js +48 -11
  128. package/dist/hitl/decisionConflict.js +3 -10
  129. package/dist/hitl/decisionRefusal.d.ts +40 -1
  130. package/dist/hitl/decisionRefusal.js +199 -42
  131. package/dist/hitl/frameRouter.d.ts +5 -2
  132. package/dist/hitl/frameRouter.js +20 -16
  133. package/dist/hitl/gateLedger.d.ts +2 -0
  134. package/dist/hitl/gateLedger.js +50 -13
  135. package/dist/hitl/hitlBridge.d.ts +1 -2
  136. package/dist/hitl/hitlBridge.js +10 -7
  137. package/dist/hitl/livePendingAsk.d.ts +3 -3
  138. package/dist/hitl/livePendingAsk.js +7 -18
  139. package/dist/hitl/parkResolver.d.ts +2 -24
  140. package/dist/hitl/parkResolver.js +61 -97
  141. package/dist/hitl/persistedRulesWire.d.ts +24 -0
  142. package/dist/hitl/persistedRulesWire.js +122 -2
  143. package/dist/hitl/planReviewWire.d.ts +26 -13
  144. package/dist/hitl/planReviewWire.js +112 -78
  145. package/dist/hitl/refusedToolNameProse.d.ts +0 -1
  146. package/dist/hitl/refusedToolNameProse.js +0 -3
  147. package/dist/hitl/replayedApproval.d.ts +4 -3
  148. package/dist/hitl/replayedApproval.js +7 -4
  149. package/dist/hitl/sessionPolicyDeliverable.js +2 -4
  150. package/dist/hitl/sessionPolicyWire.d.ts +32 -20
  151. package/dist/hitl/sessionPolicyWire.js +162 -52
  152. package/dist/hitl/standingRows.d.ts +20 -2
  153. package/dist/hitl/standingRows.js +69 -8
  154. package/dist/hitl/toolApprovalWire.d.ts +87 -152
  155. package/dist/hitl/toolApprovalWire.js +591 -380
  156. package/dist/hookMatcherVerdict.d.ts +6 -1
  157. package/dist/hookMatcherVerdict.js +14 -7
  158. package/dist/hooksWireCaps.d.ts +2 -2
  159. package/dist/hooksWireCaps.js +59 -55
  160. package/dist/i18n/messages.en.d.ts +121 -0
  161. package/dist/i18n/messages.en.js +119 -0
  162. package/dist/i18n/messages.zh.d.ts +3 -0
  163. package/dist/i18n/messages.zh.js +120 -0
  164. package/dist/i18n/translate.d.ts +25 -0
  165. package/dist/i18n/translate.js +127 -0
  166. package/dist/index.d.ts +53 -20
  167. package/dist/index.js +38 -11
  168. package/dist/inheritEnvCapability.d.ts +31 -0
  169. package/dist/inheritEnvCapability.js +104 -0
  170. package/dist/liveModelCatalog.d.ts +1 -2
  171. package/dist/liveModelCatalog.js +2 -6
  172. package/dist/liveQuestionStore.d.ts +2 -21
  173. package/dist/mcpLiveness.d.ts +2 -1
  174. package/dist/mcpProbeWire.d.ts +6 -1
  175. package/dist/mcpProbeWire.js +1 -1
  176. package/dist/mcpWireCaps.d.ts +13 -2
  177. package/dist/mcpWireCaps.js +48 -0
  178. package/dist/memoryEntriesWire.d.ts +4 -9
  179. package/dist/model/modelSupplyRules.d.ts +0 -2
  180. package/dist/model/modelSupplyRules.js +3 -12
  181. package/dist/model/modelsPolicy.d.ts +0 -5
  182. package/dist/model/modelsPolicy.js +6 -36
  183. package/dist/model/subagentModelWord.d.ts +31 -0
  184. package/dist/model/subagentModelWord.js +261 -0
  185. package/dist/notifications.d.ts +6 -0
  186. package/dist/notifications.js +71 -23
  187. package/dist/outputStyleSeatCapability.d.ts +0 -3
  188. package/dist/outputStyleSeatCapability.js +0 -3
  189. package/dist/ownKey.d.ts +15 -0
  190. package/dist/ownKey.js +60 -3
  191. package/dist/panelReduce.d.ts +15 -9
  192. package/dist/panelReduce.js +680 -549
  193. package/dist/panelStateHolder.d.ts +3 -7
  194. package/dist/panelStateHolder.js +14 -130
  195. package/dist/peerLaneCapability.d.ts +0 -4
  196. package/dist/peerLaneCapability.js +0 -6
  197. package/dist/permissionRulesWriteCapability.d.ts +0 -4
  198. package/dist/permissionRulesWriteCapability.js +0 -6
  199. package/dist/permissionWireCaps.d.ts +2 -2
  200. package/dist/permissionWireCaps.js +2 -0
  201. package/dist/permissionsAllowGrantCapability.d.ts +0 -4
  202. package/dist/permissionsAllowGrantCapability.js +0 -6
  203. package/dist/permissionsDeclaration.d.ts +0 -11
  204. package/dist/permissionsDeclaration.js +60 -53
  205. package/dist/pluginHooksWire.d.ts +1 -1
  206. package/dist/pluginHooksWire.js +3 -6
  207. package/dist/preemptWire.d.ts +44 -0
  208. package/dist/preemptWire.js +83 -0
  209. package/dist/printToolResultFrame.js +15 -4
  210. package/dist/replayBody.d.ts +3 -0
  211. package/dist/replayBody.js +14 -0
  212. package/dist/request/taskRequest.d.ts +0 -1
  213. package/dist/request/taskRequest.js +0 -3
  214. package/dist/resumeRefusalCopy.d.ts +2 -1
  215. package/dist/resumeRefusalCopy.js +38 -2
  216. package/dist/retryStatus.d.ts +8 -0
  217. package/dist/retryStatus.js +106 -1
  218. package/dist/rewindArchiveCapability.d.ts +0 -4
  219. package/dist/rewindArchiveCapability.js +2 -10
  220. package/dist/rewindArchiveReading.d.ts +0 -1
  221. package/dist/rewindArchiveReading.js +0 -3
  222. package/dist/runCancelContext.d.ts +2 -1
  223. package/dist/runCancelContext.js +4 -2
  224. package/dist/runReattachPolicy.d.ts +31 -0
  225. package/dist/runReattachPolicy.js +46 -0
  226. package/dist/runTerminal.d.ts +3 -6
  227. package/dist/runTerminal.js +8 -9
  228. package/dist/sandboxWire.d.ts +3 -1
  229. package/dist/sandboxWire.js +76 -27
  230. package/dist/scenarioWire.js +1 -1
  231. package/dist/seam.d.ts +24 -2
  232. package/dist/seam.js +15 -3
  233. package/dist/seatContract.d.ts +53 -10
  234. package/dist/seatContract.js +132 -81
  235. package/dist/sessionPolicyCapability.d.ts +0 -4
  236. package/dist/sessionPolicyCapability.js +0 -6
  237. package/dist/sessionSyncFileHistoryCapability.d.ts +0 -3
  238. package/dist/sessionSyncFileHistoryCapability.js +0 -3
  239. package/dist/skillToolListsCapability.d.ts +0 -3
  240. package/dist/skillToolListsCapability.js +0 -3
  241. package/dist/sqlEngineCapability.d.ts +0 -4
  242. package/dist/sqlEngineCapability.js +0 -6
  243. package/dist/steerPriorityCapability.d.ts +0 -3
  244. package/dist/steerPriorityCapability.js +0 -3
  245. package/dist/streamDrainingLegs.d.ts +4 -0
  246. package/dist/streamDrainingLegs.js +6 -1
  247. package/dist/subagent/engineCompactWire.d.ts +0 -1
  248. package/dist/subagent/engineCompactWire.js +7 -5
  249. package/dist/subagent/engineTaskHandleWire.js +4 -7
  250. package/dist/subagentContentStore.js +1 -11
  251. package/dist/submitReopen.d.ts +24 -0
  252. package/dist/submitReopen.js +75 -0
  253. package/dist/terminalStatuses.d.ts +3 -0
  254. package/dist/terminalStatuses.js +10 -2
  255. package/dist/toolResult.d.ts +10 -1
  256. package/dist/toolResult.js +34 -6
  257. package/dist/toolRoster.d.ts +0 -2
  258. package/dist/toolRoster.js +0 -2
  259. package/dist/turnFailurePresentation.d.ts +28 -0
  260. package/dist/turnFailurePresentation.js +205 -0
  261. package/dist/userInvokedSkillsCapability.d.ts +0 -3
  262. package/dist/userInvokedSkillsCapability.js +0 -3
  263. package/dist/webSearchBackendCapability.d.ts +0 -4
  264. package/dist/webSearchBackendCapability.js +0 -6
  265. package/dist/wireErrorTriage.js +5 -24
  266. package/dist/wireFailureShape.d.ts +62 -5
  267. package/dist/wireFailureShape.js +105 -5
  268. package/dist/wireRefusalCopy.d.ts +12 -2
  269. package/dist/wireRefusalCopy.js +50 -52
  270. package/dist/workflowsJournalCapability.d.ts +0 -4
  271. package/dist/workflowsJournalCapability.js +0 -6
  272. package/dist/writeProtectionCapability.d.ts +0 -4
  273. package/dist/writeProtectionCapability.js +0 -6
  274. package/docs/INTEGRATION-CLIENTS.md +1253 -46
  275. package/package.json +5 -4
  276. package/dist/attachmentSeatCapability.d.ts +0 -12
  277. package/dist/attachmentSeatCapability.js +0 -23
  278. package/dist/hitl/approvalOutcomeNote.d.ts +0 -10
  279. package/dist/hitl/approvalOutcomeNote.js +0 -29
  280. package/dist/sessionReadRedactionCapability.d.ts +0 -13
  281. package/dist/sessionReadRedactionCapability.js +0 -35
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './seam.js';
2
2
  export * from './workflow.js';
3
- export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort, installWorkflowStatusProbe, isEngineWorkflowNotified, isHookNoticeFrame, isOwnWorkflowRun, isTaskNotificationObjective, isWorkflowCompletionCardEnqueued, listOwnWorkflowRuns, markEngineWorkflowNotified, normalizeTaskNotification, noteOwnWorkflowRun, noteWorkflowCompletionCardEnqueued, notificationDropCounters, notificationQueuePortMisses, outstandingAbandonedCount, outstandingBgTaskPrompt, outstandingDeliverableWorkflowCount, outstandingWorkflowCount, parseTranscriptNotificationSeeds, registerOutstandingBgTask, registerOutstandingWorkflowRun, renderTaskNotificationXml, splitApiErrorSupplement, subscribeOutstandingWorkflows, taskNotificationDedupKey, taskNotificationDedupKeyFromWire, taskNotificationDeliverySupplement, } from './notifications.js';
3
+ export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort, installWorkflowStatusProbe, isEngineWorkflowNotified, isHookNoticeFrame, isOwnWorkflowRun, isTaskNotificationObjective, isWorkflowCompletionCardEnqueued, listOwnWorkflowRuns, markEngineWorkflowNotified, normalizeTaskNotification, noteOwnWorkflowRun, noteWorkflowCompletionCardEnqueued, notificationDropCounters, notificationQueuePortMisses, outstandingAbandonedCount, outstandingBgTaskPrompt, outstandingDeliverableWorkflowCount, outstandingWorkflowCount, parseTranscriptNotificationSeeds, readTaskNotificationXml, registerOutstandingBgTask, registerOutstandingWorkflowRun, renderTaskNotificationXml, splitApiErrorSupplement, subscribeOutstandingWorkflows, taskNotificationDedupKey, taskNotificationDedupKeyFromWire, taskNotificationDeliverySupplement, } from './notifications.js';
4
4
  export * from './peerFrames.js';
5
5
  export * from './steering.js';
6
6
  export * from './retryStatus.js';
@@ -11,6 +11,10 @@ export * from './adapt/textSegmentAuthority.js';
11
11
  export * from './engineHttpTools.js';
12
12
  export * from './sdkWireTransit.js';
13
13
  export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
14
+ export { engineRefOf, sameEngineRef, TRANSCRIPT_ROW_SIDECAR_KEYS } from './engineRowRef.js';
15
+ export { isReplayMarked } from './replayBody.js';
16
+ export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE } from './eventLeg.js';
17
+ export { frameBindingOf, inheritFrameBinding } from './frameBinding.js';
14
18
  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';
15
19
  export * from './engineAgentPanelStore.js';
16
20
  export * from './engineAgentAbsence.js';
@@ -27,7 +31,7 @@ export * from './executionLaneCapability.js';
27
31
  export * from './approvalsStreamLiveCapability.js';
28
32
  export * from './peerLaneCapability.js';
29
33
  export * from './permissionRulesWriteCapability.js';
30
- export { __resetPermissionsAllowGrantReadingsForTests, noteEngineCapsForPermissionsAllowGrant, observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
34
+ export { observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
31
35
  export * from './sessionPolicyCapability.js';
32
36
  export * from './memoryComplianceCapability.js';
33
37
  export * from './memoryOriginCapability.js';
@@ -56,14 +60,17 @@ export * from './skillToolListsCapability.js';
56
60
  export * from './steerPriorityCapability.js';
57
61
  export * from './permissionModesCapability.js';
58
62
  export * from './approvalDecidedByCapability.js';
59
- export * from './sessionReadRedactionCapability.js';
60
63
  export * from './outputStyleSeatCapability.js';
61
64
  export * from './mcpProbeWire.js';
65
+ export * from './connectorStatus.js';
62
66
  export * from './effectiveFacts.js';
63
67
  export * from './gateOutcome.js';
64
68
  export * from './postureKnob.js';
65
69
  export * from './engineIdentity.js';
66
70
  export { transportFailureScene } from './engineWireFor.js';
71
+ export { engineUrlTransportVerdict, normalizeEngineBaseUrl } from './engineUrl.js';
72
+ export { submitStreamWithBoundedReopen } from './submitReopen.js';
73
+ export { createStreamDrainingLegs } from './streamDrainingLegs.js';
67
74
  export * from './engineConfigDrift.js';
68
75
  export * from './gateVocabulary.js';
69
76
  export * from './permissionRuleIssue.js';
@@ -75,18 +82,20 @@ export * from './classifierStatus.js';
75
82
  export * from './engineToolLabelStore.js';
76
83
  export * from './fleetTaskDesc.js';
77
84
  export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
85
+ export { isDiagnosticValueWord } from './displayUntrusted.js';
78
86
  export * from './hostEnv.js';
79
87
  export * from './unrefTimer.js';
80
88
  export { ControlRouter, ControlSafetyError, errCodes, steerBodyOf, steerRefusalAdviceOf, steeringRefusedBeforeEngine, } from './controlRouter.js';
89
+ export { preemptReceiptLine } from './preemptWire.js';
81
90
  export { readSteerReceipt } from './steerReceipt.js';
82
91
  export * from './sseIdleTriage.js';
83
92
  export * from './engineWireSdk.js';
84
93
  export * from './classifierVerdictWire.js';
85
94
  export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
86
95
  export { findSystemReminderOpenTag } from './systemReminderTag.js';
87
- 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, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, 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, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, 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';
96
+ 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, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, 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, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, 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, 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';
88
97
  export * from './agentsWireCaps.js';
89
- export { engineToolDirectoryOf, excludeToolsAgainstDirectory } from './engineToolDirectory.js';
98
+ export { engineToolDirectoryOf } from './engineToolDirectory.js';
90
99
  export * from './attachmentsWireCaps.js';
91
100
  export * from './clientContextWireCaps.js';
92
101
  export * from './cloudConfigWireCaps.js';
@@ -132,6 +141,7 @@ export * from './request/taskRequest.js';
132
141
  export { disableSkillsDeclaration, disableSkillsDeclarationSettled } from './disableSkillsWire.js';
133
142
  export { approvalReachDeclaration, approvalReachDeclarationSettled } from './approvalReachWire.js';
134
143
  export { PERMISSIONS_KEPT_REASONS, WIRE_RULE_TRUST_ORDER, permissionsAllowKeptNotice, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
144
+ export { ASSEMBLY_REFUSAL_CAUSES, assemblyRefusalOf } from './wireFailureShape.js';
135
145
  export * from './clientSlice.js';
136
146
  export * from './host.js';
137
147
  export { abortableSleep } from './abortableSleep.js';
@@ -164,6 +174,12 @@ export * from './engineSessionParam.js';
164
174
  export { engineWireTarget, engineWireTargetFor, installEngineWireTarget, installEngineWireTargetFor, } from './engineWireTarget.js';
165
175
  export * from './principalWire.js';
166
176
  export * from './wireErrorTriage.js';
177
+ export { WIRE_FAILURE_UNRENDERABLE_TEXT, wireFailureCoreOf, wireFailureTextsOf } from './wireFailureShape.js';
178
+ export { guardedRead, readOwnDataFiniteNumber, readOwnDataNonEmptyString } from './ownKey.js';
179
+ export { contextUsageReadingOf } from './ownKey.js';
180
+ export { TURN_FAILURE_CATEGORIES, turnFailurePresentation } from './turnFailurePresentation.js';
181
+ export { readSeatTurnFailure, seatTurnFailureOf } from './turnFailurePresentation.js';
182
+ export { REATTACH_BUDGET_FRESH, REATTACH_MAX_TRIES, runReattachPolicy, } from './runReattachPolicy.js';
167
183
  export * from './corruptSession.js';
168
184
  export * from './corruptSessionCopy.js';
169
185
  export { classifyToolHistoryMismatch, readToolHistoryMismatchKey, resolveToolHistoryRewindTarget } from './toolHistoryMismatch.js';
@@ -172,10 +188,11 @@ export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
172
188
  export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
173
189
  export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
174
190
  export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
175
- export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat, __resetAttachmentSeatReadingsForTests, } from './attachmentSeatCapability.js';
191
+ export { projectEngineSessionMessages } from './engineSessionMessages.js';
176
192
  export * from './resumeRefusalCopy.js';
177
193
  export * from './wireRefusalCopy.js';
178
194
  export * from './inheritEnvWire.js';
195
+ export * from './inheritEnvCapability.js';
179
196
  export { SUPPORT_FLOOR, supportFloorOf, engineVersionTier, engineSupportFloorEffective, coreVersionTier } from './supportFloor.js';
180
197
  export * from './decideReceipt.js';
181
198
  export * from './sessionMap.js';
@@ -187,18 +204,20 @@ export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS
187
204
  export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
188
205
  export { hookMatcherVerdict } from './hookMatcherVerdict.js';
189
206
  export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
207
+ export { BUILTIN_SUBAGENT_TYPES } from './engineClosedSets.js';
190
208
  export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinTiers } from './readDenyTiers.js';
191
209
  export * from './liveInitToolFace.js';
192
210
  export * from './printInitToolFace.js';
193
211
  export * from './model/providerPresets.js';
194
212
  export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
195
213
  export * from './hitl/suspendedReopen.js';
196
- export * from './hitl/approvalOutcomeNote.js';
197
- export * from './hitl/approvalResolution.js';
214
+ export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, } from './hitl/approvalResolution.js';
198
215
  export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
199
216
  export { toolEndOutputText } from './toolResultContent.js';
200
- 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';
217
+ export { _resetHitlHostSurfaceForTest, APPROVAL_PARKING_WARN_TEXT, approvalParkingNoticeText, 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';
201
218
  export * from './hitl/toolApprovalWire.js';
219
+ export * from './hitl/approvalCardReading.js';
220
+ export * from './hitl/approvalCardReasons.js';
202
221
  export * from './hitl/editedRuleTextPrecheck.js';
203
222
  export * from './coreValuePorts.js';
204
223
  export { ruleToolNameVerdictOf } from './protocolSegment.js';
@@ -219,9 +238,10 @@ export * from './hitl/approvalsFeed.js';
219
238
  export * from './hitl/livePendingAsk.js';
220
239
  export { replayedApprovalClosesCardFrame, replayedApprovalDisposition, replayedApprovalSentence } from './hitl/replayedApproval.js';
221
240
  export { hasLedgerPositionKey } from './hitl/gateLedger.js';
241
+ export { durableSeqOf } from './hitl/gateLedger.js';
222
242
  export { MODE_ARBITRATION, automaticAnswerVerdict, mandatedApprovalDetailOf, permissionRequestHookScope, } from './hitl/automaticAnswerVerdict.js';
223
- export { standingRowsOf, } from './hitl/standingRows.js';
224
- export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, decisionRefusalAskReading, } from './hitl/decisionRefusal.js';
243
+ export { standingRowsOf, rememberOfferable, localAllowRuleEnforceable, } from './hitl/standingRows.js';
244
+ export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, decisionRefusalAskReading, readDecisionRefusalReading, } from './hitl/decisionRefusal.js';
225
245
  export { noAllowCauseOf } from './hitl/noAllowCause.js';
226
246
  export { policyDenyReason } from './hitl/frameRouter.js';
227
247
  export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadowSentence, } from './hitl/allowRuleShadow.js';
@@ -229,15 +249,18 @@ export { projectCrashConverged } from './hitl/crashConverged.js';
229
249
  export * from './hitl/crashConvergedNotice.js';
230
250
  export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
231
251
  export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
252
+ export * from './hitl/askSettlementLine.js';
232
253
  export * from './interactiveHalt.js';
233
254
  export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
234
255
  export { listDevices, readSessionBinding, rebindSession, reconcileRebindOutcome, rebindProvesRequestNotApplied } from './deviceRebind.js';
256
+ export { issueEnrollToken, enrollDevice, revokeDevice, deviceIdentityMismatchOf, deviceIdentityMismatchLine, deviceRegistrationOutcomeLine } from './deviceRebind.js';
235
257
  export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js';
236
258
  export * from './compensations.js';
237
259
  export * from './request/printNotification.js';
238
260
  export * from './seatContract.js';
239
261
  export * from './agentSession/contract.js';
240
262
  export * from './agentSession/backgroundView.js';
263
+ export { readAssistantInbox } from './assistantInbox.js';
241
264
  export { READ_CREDENTIAL_NOT_ACCEPTED_NOTICE, isReadCredentialRefusal } from './readCredentialRefusal.js';
242
265
  export { readEngineAgentRegistry, isEngineAgentRegistryListingSuperseded } from './agentSession/engineAgentRegistryRead.js';
243
266
  export { stopEngineSessionBackground, engineSessionBackgroundReceiptReadingOf, ENGINE_SESSION_BACKGROUND_RECEIPT_STATES, } from './agentSession/engineSessionBackgroundStop.js';
@@ -247,11 +270,15 @@ export * from './model/catalogLoader.js';
247
270
  export * from './model/providerAuth.js';
248
271
  export * from './model/providerCatalog.js';
249
272
  export * from './model/tierVocabulary.js';
273
+ export { resolveSubagentModelWord, subagentModelWordProblemLine, } from './model/subagentModelWord.js';
250
274
  export * from './model/modelSupplyRules.js';
251
275
  export * from './websearch/searchProviderPresets.js';
252
276
  export * from './env/localeGeo.js';
253
277
  export * from './env/localeTag.js';
254
278
  export * from './env/uiLanguage.js';
279
+ export { EN_MESSAGES } from './i18n/messages.en.js';
280
+ export { ZH_MESSAGES } from './i18n/messages.zh.js';
281
+ export { createMissLedger, createTranslator, DATA_FACE_LANGUAGE, msg, renderMessage, translate, uiMissLedger, } from './i18n/translate.js';
255
282
  export * from './ruleRemovalConsequence.js';
256
283
  export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
257
284
  export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
@@ -0,0 +1,31 @@
1
+ import type { RequestLane } from './request/taskRequest.js';
2
+ export type InheritEnvValueShape = 'false' | 'string' | 'number' | 'null' | 'array' | 'object' | 'other';
3
+ export type InheritEnvOwnCredentialsReading = {
4
+ readonly kind: 'confirmed';
5
+ } | {
6
+ readonly kind: 'absent';
7
+ } | {
8
+ readonly kind: 'declined';
9
+ readonly valueShape: InheritEnvValueShape;
10
+ } | {
11
+ readonly kind: 'unreadable';
12
+ } | {
13
+ readonly kind: 'unobserved';
14
+ };
15
+ export declare function observedInheritEnvOwnCredentialsWithheld(baseUrl?: string | undefined): InheritEnvOwnCredentialsReading;
16
+ export type InheritEnvOmitReason = 'lane' | 'project_context' | 'capability_absent' | 'capability_declined' | 'capability_unreadable' | 'identity_unverified';
17
+ export type InheritEnvIntent = {
18
+ readonly send: 'all';
19
+ } | {
20
+ readonly send: 'omit';
21
+ readonly reason: InheritEnvOmitReason;
22
+ };
23
+ export interface InheritEnvIntentInput {
24
+ readonly lane: RequestLane | undefined;
25
+ readonly projectContextConfirmed: boolean;
26
+ readonly ownCredentialsWithheld: InheritEnvOwnCredentialsReading;
27
+ readonly serviceIdentityVerified: boolean;
28
+ }
29
+ export declare function inheritEnvIntentOf(input: InheritEnvIntentInput): InheritEnvIntent;
30
+ export declare function inheritEnvNotConfirmedNotice(lang?: string): string;
31
+ export declare function inheritEnvNoticeOf(intent: InheritEnvIntent, lang?: string): string | undefined;
@@ -0,0 +1,104 @@
1
+ import { engineCapValue } from './engineCapsCache.js';
2
+ import { engineWireTarget } from './engineWireTarget.js';
3
+ const OWN_CREDENTIALS_WITHHELD_KEY = 'inherit_env.own_credentials_withheld';
4
+ const CONFIRMED = Object.freeze({ kind: 'confirmed' });
5
+ const ABSENT = Object.freeze({ kind: 'absent' });
6
+ const UNREADABLE = Object.freeze({ kind: 'unreadable' });
7
+ const UNOBSERVED = Object.freeze({ kind: 'unobserved' });
8
+ function shapeOf(v) {
9
+ if (v === false)
10
+ return 'false';
11
+ if (v === null)
12
+ return 'null';
13
+ if (Array.isArray(v))
14
+ return 'array';
15
+ switch (typeof v) {
16
+ case 'string':
17
+ return 'string';
18
+ case 'number':
19
+ return 'number';
20
+ case 'object':
21
+ return 'object';
22
+ default:
23
+ return 'other';
24
+ }
25
+ }
26
+ export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTarget()?.baseUrl) {
27
+ try {
28
+ const slot = engineCapValue(typeof baseUrl === 'string' ? baseUrl : undefined, OWN_CREDENTIALS_WITHHELD_KEY);
29
+ switch (slot.kind) {
30
+ case 'unobserved':
31
+ return UNOBSERVED;
32
+ case 'not_reported':
33
+ return ABSENT;
34
+ case 'unreadable':
35
+ return UNREADABLE;
36
+ case 'null':
37
+ return Object.freeze({ kind: 'declined', valueShape: 'null' });
38
+ case 'value':
39
+ return slot.value === true ? CONFIRMED : Object.freeze({ kind: 'declined', valueShape: shapeOf(slot.value) });
40
+ }
41
+ }
42
+ catch {
43
+ return UNOBSERVED;
44
+ }
45
+ }
46
+ const ALL = Object.freeze({ send: 'all' });
47
+ const omit = (reason) => Object.freeze({ send: 'omit', reason });
48
+ function fieldOf(input, key) {
49
+ try {
50
+ return input[key];
51
+ }
52
+ catch {
53
+ return undefined;
54
+ }
55
+ }
56
+ function capabilityReasonOf(reading) {
57
+ try {
58
+ if (typeof reading !== 'object' || reading === null)
59
+ return 'capability_unreadable';
60
+ const kind = reading.kind;
61
+ if (kind === 'confirmed')
62
+ return undefined;
63
+ if (kind === 'absent')
64
+ return 'capability_absent';
65
+ if (kind === 'declined')
66
+ return 'capability_declined';
67
+ return 'capability_unreadable';
68
+ }
69
+ catch {
70
+ return 'capability_unreadable';
71
+ }
72
+ }
73
+ export function inheritEnvIntentOf(input) {
74
+ if (typeof input !== 'object' || input === null || Array.isArray(input))
75
+ return omit('lane');
76
+ if (fieldOf(input, 'lane') !== 'interactive')
77
+ return omit('lane');
78
+ if (fieldOf(input, 'projectContextConfirmed') !== true)
79
+ return omit('project_context');
80
+ const cap = capabilityReasonOf(fieldOf(input, 'ownCredentialsWithheld'));
81
+ if (cap !== undefined)
82
+ return omit(cap);
83
+ if (fieldOf(input, 'serviceIdentityVerified') !== true)
84
+ return omit('identity_unverified');
85
+ return ALL;
86
+ }
87
+ const NOT_CONFIRMED_SENTENCE_EN = 'The engine has not confirmed that it withholds its own credentials from tool shells, so the tool shell gets a filtered environment (credential-looking variables such as GH_TOKEN are omitted) until the engine is upgraded.';
88
+ export function inheritEnvNotConfirmedNotice(lang) {
89
+ void lang;
90
+ return NOT_CONFIRMED_SENTENCE_EN;
91
+ }
92
+ export function inheritEnvNoticeOf(intent, lang) {
93
+ try {
94
+ if (typeof intent !== 'object' || intent === null || intent.send !== 'omit')
95
+ return undefined;
96
+ const reason = intent.reason;
97
+ return reason === 'capability_absent' || reason === 'capability_declined' || reason === 'capability_unreadable'
98
+ ? inheritEnvNotConfirmedNotice(lang)
99
+ : undefined;
100
+ }
101
+ catch {
102
+ return undefined;
103
+ }
104
+ }
@@ -15,7 +15,6 @@ export interface LiveModelInfo {
15
15
  }
16
16
  export interface LiveModelCatalog {
17
17
  models: LiveModelInfo[];
18
- default: string;
19
18
  defaultModel?: {
20
19
  readonly id: string;
21
20
  readonly name?: string;
@@ -94,7 +93,7 @@ export type LiveModelCatalogReading = {
94
93
  readonly defaultModelMalformed?: true;
95
94
  } | {
96
95
  readonly kind: 'unreadable';
97
- readonly why: 'not_an_object' | 'models_not_array' | 'default_missing' | 'unreadable';
96
+ readonly why: 'not_an_object' | 'models_not_array' | 'unreadable';
98
97
  };
99
98
  export declare function readLiveModelCatalog(body: unknown): LiveModelCatalogReading;
100
99
  export type LiveDefaultModelReading = {
@@ -281,7 +281,7 @@ export function modelCandidateRejectedContent(reading) {
281
281
  return undefined;
282
282
  }
283
283
  }
284
- const ROUTE_PAIRING_OK = new Set(['ok:per-model', 'ok:paired', 'ok:unpinned', 'ok:keyless']);
284
+ const ROUTE_PAIRING_OK = new Set(['ok:per-model', 'ok:paired', 'ok:keyless']);
285
285
  const ROUTE_PAIRING_BROKEN = new Set(['broken:credential_mismatch', 'broken:credential_missing']);
286
286
  export function routePairingVerdict(v) {
287
287
  if (typeof v !== 'string' || v.length === 0)
@@ -306,16 +306,12 @@ export function readLiveModelCatalog(body) {
306
306
  if (body === null || typeof body !== 'object' || Array.isArray(body))
307
307
  return unreadableCatalog('not_an_object');
308
308
  const modelsKey = envelopeKey(body, 'models');
309
- const defaultKey = envelopeKey(body, 'default');
310
309
  const defaultModelKey = envelopeKey(body, 'defaultModel');
311
310
  const droppedKey = envelopeKey(body, 'droppedEntries');
312
311
  const candidateKey = envelopeKey(body, 'candidateRejected');
313
312
  const raw = modelsKey.present ? modelsKey.value : undefined;
314
313
  if (!Array.isArray(raw))
315
314
  return unreadableCatalog('models_not_array');
316
- const def = defaultKey.present ? defaultKey.value : undefined;
317
- if (typeof def !== 'string' || def.length === 0)
318
- return unreadableCatalog('default_missing');
319
315
  const n = envelopeKey(raw, 'length');
320
316
  const len = n.present ? n.value : undefined;
321
317
  if (typeof len !== 'number' || !Number.isSafeInteger(len) || len < 0)
@@ -333,7 +329,7 @@ export function readLiveModelCatalog(body) {
333
329
  names.add(row.name);
334
330
  models.push(row);
335
331
  }
336
- const out = { models: Object.freeze(models), default: def };
332
+ const out = { models: Object.freeze(models) };
337
333
  let defaultModelMalformed = false;
338
334
  if (defaultModelKey.present && defaultModelKey.value !== undefined) {
339
335
  const dm = liveDefaultModelCopy(defaultModelKey.value);
@@ -1,23 +1,5 @@
1
- import type { AskAnswer } from './hitl/hitlBridge.js';
2
- export interface AskQuestionOption {
3
- label: string;
4
- description?: string;
5
- }
6
- export interface AskQuestion {
7
- question: string;
8
- header: string;
9
- options: AskQuestionOption[];
10
- multiSelect: boolean;
11
- }
12
- export interface QuestionFrame {
13
- type: 'question' | 'question_complete';
14
- questionId: string;
15
- questions?: AskQuestion[];
16
- outcome?: string;
17
- }
18
- export interface QuestionAnswer {
19
- answers: AskAnswer[];
20
- }
1
+ import type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame } from '@sema-agent/sdk';
2
+ export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame };
21
3
  type QuestionFrameHandler = (frame: QuestionFrame) => void;
22
4
  type RespondFn = (id: string, answer: QuestionAnswer, opts?: {
23
5
  signal?: AbortSignal;
@@ -36,4 +18,3 @@ export declare function respondToQuestion(id: string, answer: QuestionAnswer, op
36
18
  signal?: AbortSignal;
37
19
  }): Promise<unknown>;
38
20
  export declare function _resetLiveQuestionStore(): void;
39
- export {};
@@ -1,5 +1,6 @@
1
+ import type { McpLivenessState } from '@sema-agent/sdk';
1
2
  export declare const MCP_LIVENESS_STATES: readonly ["reachable", "unreachable", "unknown"];
2
- export type McpLivenessState = (typeof MCP_LIVENESS_STATES)[number];
3
+ export type { McpLivenessState };
3
4
  export declare const isMcpLivenessState: (v: unknown) => v is McpLivenessState;
4
5
  export interface McpLivenessView {
5
6
  state: McpLivenessState;
@@ -35,13 +35,18 @@ export type McpProbeOutcome = {
35
35
  status: 'face';
36
36
  face: McpProbeFaceView;
37
37
  } | McpProbeRefused | McpProbeUnknown;
38
+ export type McpDeploymentOutcome = {
39
+ status: 'face';
40
+ face: McpProbeFaceView;
41
+ declaredBy: 'deployment';
42
+ } | McpProbeRefused | McpProbeUnknown;
38
43
  export declare function classifyMcpProbeFailure(e: unknown): McpProbeFailure;
39
44
  export interface McpCapabilitiesCall {
40
45
  capability: McpProbeReading;
41
46
  }
42
47
  export declare function readMcpCapabilities(facade: McpProbeFacade, call: McpCapabilitiesCall, opts?: {
43
48
  signal?: AbortSignal;
44
- }): Promise<McpProbeOutcome>;
49
+ }): Promise<McpDeploymentOutcome>;
45
50
  export interface McpProbeServersCall {
46
51
  specs: McpServerSpec[];
47
52
  capability: McpProbeReading;
@@ -175,7 +175,7 @@ export async function readMcpCapabilities(facade, call, opts) {
175
175
  return unknownBy(narrowed.why, `the per-server MCP status call answered 2xx with a body this client cannot stand behind (${narrowed.what}) — refusing to present it as a reading, ` +
176
176
  'because a normal-looking empty list is exactly the false answer this face exists to remove');
177
177
  }
178
- return { status: 'face', face: narrowed.face };
178
+ return { status: 'face', face: narrowed.face, declaredBy: 'deployment' };
179
179
  }
180
180
  export async function probeMcpServers(facade, call, opts) {
181
181
  if (typeof facade?.probeMcp !== 'function') {
@@ -1,5 +1,5 @@
1
- import type { TaskRequest } from '@sema-agent/sdk';
2
- export type McpServerSpec = NonNullable<TaskRequest['mcpServers']>[number];
1
+ import type { McpServerSpec } from '@sema-agent/sdk';
2
+ export type { McpServerSpec };
3
3
  export declare const MCP_CAPS: {
4
4
  readonly items: 32;
5
5
  };
@@ -10,9 +10,20 @@ export interface McpConfigLike {
10
10
  env?: Record<string, string>;
11
11
  url?: string;
12
12
  headers?: Record<string, string>;
13
+ principalHeader?: string;
14
+ assertionHeader?: string;
13
15
  allowTools?: string[];
14
16
  toolFaces?: unknown;
15
17
  toolAxes?: unknown;
16
18
  }
19
+ export type McpHttpIdentityHeaders = {
20
+ readonly kind: 'ok';
21
+ readonly principalHeader?: string;
22
+ readonly assertionHeader?: string;
23
+ } | {
24
+ readonly kind: 'both_set';
25
+ };
26
+ export declare function readMcpHttpIdentityHeaders(transport: object): McpHttpIdentityHeaders;
17
27
  export declare function mcpConfigToSpec(name: string, c: McpConfigLike): McpServerSpec | null;
18
28
  export declare function mcpConfigsToSpecs(servers: Record<string, McpConfigLike> | undefined): McpServerSpec[];
29
+ export declare function mcpAssertionHeaderNotSentNotice(specs: readonly McpServerSpec[]): string | undefined;
@@ -1,3 +1,6 @@
1
+ import { guardedRead } from './ownKey.js';
2
+ const _mcpServerSpecPin = true;
3
+ void _mcpServerSpecPin;
1
4
  export const MCP_CAPS = { items: 32 };
2
5
  function transparentKeys(c) {
3
6
  return {
@@ -5,6 +8,21 @@ function transparentKeys(c) {
5
8
  ...(c.toolAxes !== undefined ? { toolAxes: c.toolAxes } : {}),
6
9
  };
7
10
  }
11
+ function presentHeaderName(v) {
12
+ return typeof v === 'string' && v.length > 0 ? v : undefined;
13
+ }
14
+ export function readMcpHttpIdentityHeaders(transport) {
15
+ const t = transport;
16
+ const principalHeader = presentHeaderName(t.principalHeader);
17
+ const assertionHeader = presentHeaderName(t.assertionHeader);
18
+ if (principalHeader !== undefined && assertionHeader !== undefined)
19
+ return { kind: 'both_set' };
20
+ return {
21
+ kind: 'ok',
22
+ ...(principalHeader !== undefined ? { principalHeader } : {}),
23
+ ...(assertionHeader !== undefined ? { assertionHeader } : {}),
24
+ };
25
+ }
8
26
  export function mcpConfigToSpec(name, c) {
9
27
  const n = (name ?? '').trim();
10
28
  if (!n)
@@ -28,12 +46,17 @@ export function mcpConfigToSpec(name, c) {
28
46
  if (kind === 'http') {
29
47
  if (!c.url)
30
48
  return null;
49
+ const id = readMcpHttpIdentityHeaders(c);
50
+ if (id.kind === 'both_set')
51
+ return null;
31
52
  return {
32
53
  name: n,
33
54
  transport: {
34
55
  kind: 'http',
35
56
  url: c.url,
36
57
  ...(c.headers ? { headers: c.headers } : {}),
58
+ ...(id.principalHeader !== undefined ? { principalHeader: id.principalHeader } : {}),
59
+ ...(id.assertionHeader !== undefined ? { assertionHeader: id.assertionHeader } : {}),
37
60
  },
38
61
  ...(c.allowTools && c.allowTools.length > 0 ? { allowTools: c.allowTools } : {}),
39
62
  ...transparentKeys(c),
@@ -52,3 +75,28 @@ export function mcpConfigsToSpecs(servers) {
52
75
  }
53
76
  return out;
54
77
  }
78
+ function assertionDeclaringServerName(spec) {
79
+ const t = spec?.transport;
80
+ if (t?.kind !== 'http')
81
+ return undefined;
82
+ const declared = t.assertionHeader;
83
+ return typeof declared === 'string' && declared.length > 0 && typeof spec?.name === 'string' ? spec.name : undefined;
84
+ }
85
+ const ASSERTION_NOTICE_NAMES_SHOWN = 5;
86
+ export function mcpAssertionHeaderNotSentNotice(specs) {
87
+ const count = guardedRead(() => (Array.isArray(specs) ? specs.length : 0)) ?? 0;
88
+ const names = [];
89
+ for (let i = 0; i < count; i++) {
90
+ const name = guardedRead(() => assertionDeclaringServerName(specs[i]));
91
+ if (name !== undefined)
92
+ names.push(name);
93
+ }
94
+ if (names.length === 0)
95
+ return undefined;
96
+ const distinct = [...new Set(names)];
97
+ const parts = distinct.slice(0, ASSERTION_NOTICE_NAMES_SHOWN).map((x) => `"${x}"`);
98
+ if (distinct.length > ASSERTION_NOTICE_NAMES_SHOWN)
99
+ parts.push(`+${distinct.length - ASSERTION_NOTICE_NAMES_SHOWN} more`);
100
+ return (`MCP servers that declare an assertion header (assertionHeader): ${parts.join(', ')} — server versions up to 7.129.1 accept this setting but do not send the header, ` +
101
+ 'and this client cannot tell whether the engine it uses sends it; a connector that requires the header will refuse requests from these servers');
102
+ }
@@ -1,10 +1,11 @@
1
- export type MemoryEntryOriginMark = 'marked' | 'unmarked' | 'undecidable';
1
+ import type { MemoryErasedBinding } from '@sema-agent/sdk';
2
+ export type MemoryEntryOriginMarkReading = 'marked' | 'unmarked' | 'undecidable';
2
3
  export interface MemoryExportEntryRow {
3
4
  id: string;
4
5
  slug: string;
5
6
  scope: string;
6
7
  rev: string;
7
- originMark: MemoryEntryOriginMark;
8
+ originMark: MemoryEntryOriginMarkReading;
8
9
  }
9
10
  export type MemoryExportUnreadableCause = 'body_unreadable' | 'envelope_absent' | 'envelope_unreadable' | 'too_many_rows' | 'rows_unreadable';
10
11
  export type MemoryExportReading = {
@@ -36,13 +37,7 @@ export type ScopeExternalOriginVerdict = {
36
37
  export declare function scopeExternalOriginVerdict(reading: MemoryExportReading, asked: {
37
38
  originAware: boolean;
38
39
  }): ScopeExternalOriginVerdict;
39
- export type MemoryErasedBinding = {
40
- state: 'bound';
41
- scope: string;
42
- slug: string;
43
- } | {
44
- state: 'unbound';
45
- };
40
+ export type { MemoryErasedBinding };
46
41
  export interface MemoryErasedRow {
47
42
  id: string;
48
43
  rev: string;
@@ -25,7 +25,6 @@ export interface TierGroupsView {
25
25
  export interface DeleteWarningsInput {
26
26
  id: string;
27
27
  doc: {
28
- atModelAllowlist?: unknown;
29
28
  atMention?: unknown;
30
29
  tierGroups?: unknown;
31
30
  } | null;
@@ -35,7 +34,6 @@ export interface DeleteWarningsInput {
35
34
  export interface DeleteBlockersInput {
36
35
  id: string;
37
36
  doc: {
38
- default?: unknown;
39
37
  roles?: unknown;
40
38
  } | null;
41
39
  rosters: {
@@ -22,9 +22,7 @@ export function computeDeleteWarnings(input) {
22
22
  if (before.mode === 'only' && after.mode === 'none') {
23
23
  out.push({
24
24
  kind: 'allowlist-empties',
25
- consequence: am.from === 'atModelAllowlist'
26
- ? 'it is the last usable model on your @-mention allowlist — deleting it empties the list, which means EVERY enabled model becomes @-mentionable'
27
- : 'it is the last usable model on your @-mention allowlist — deleting it leaves no model that can be @-mentioned',
25
+ consequence: 'it is the last usable model on your @-mention allowlist — deleting it leaves no model that can be @-mentioned',
28
26
  });
29
27
  }
30
28
  }
@@ -58,24 +56,17 @@ export function computeDeleteBlockers(input) {
58
56
  fix: 'fix or re-save models.json so it can be read, then delete this model',
59
57
  });
60
58
  }
61
- if (policy.defaultUnreadable) {
62
- out.push({
63
- kind: 'unreadable',
64
- where: 'models.json `default` (the default model could not be read)',
65
- fix: 'fix or re-save models.json so its default model can be read, then delete this model',
66
- });
67
- }
68
59
  const dm = policy.defaultModel;
69
60
  if (dm !== undefined && dm.name === id) {
70
61
  out.push({
71
62
  kind: 'default',
72
- where: dm.from === 'default' ? 'models.json `default`' : 'models.json roles.default',
63
+ where: 'models.json roles.default',
73
64
  fix: 'point another model at the default first (Model Hub: select it and press u), then delete this one',
74
65
  });
75
66
  }
76
67
  if (doc && isPlainObject(doc.roles)) {
77
68
  for (const [role, target] of Object.entries(doc.roles)) {
78
- if (role === 'default' && dm?.from === 'roles.default')
69
+ if (role === 'default' && dm !== undefined)
79
70
  continue;
80
71
  if (!isPlainObject(target) || typeof target.model !== 'string')
81
72
  continue;