@sema-agent/client-core 0.98.0 → 0.100.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 (236) hide show
  1. package/CHANGELOG.md +376 -0
  2. package/README.md +61 -35
  3. package/dist/adapt/arms.js +120 -55
  4. package/dist/adapt/panelTasks.d.ts +3 -2
  5. package/dist/adapt/panelTasks.js +34 -11
  6. package/dist/adapt/textStream.d.ts +1 -1
  7. package/dist/adapt/textStream.js +51 -28
  8. package/dist/adapter/activeRunSelfHeal.d.ts +11 -3
  9. package/dist/adapter/activeRunSelfHeal.js +210 -294
  10. package/dist/adapter/downstream/eventToSdkMessage.d.ts +25 -6
  11. package/dist/adapter/downstream/eventToSdkMessage.js +176 -12
  12. package/dist/adapter/downstream/terminalToSdkResult.js +10 -0
  13. package/dist/adapter/downstream/wiringManifestView.d.ts +3 -1
  14. package/dist/adapter/downstream/wiringManifestView.js +1 -0
  15. package/dist/adapter/runStream.js +82 -40
  16. package/dist/adapter/types.d.ts +2 -0
  17. package/dist/adapter/types.js +2 -1
  18. package/dist/agentSession/engineSessionBackgroundStop.js +16 -8
  19. package/dist/agentsWireCaps.d.ts +7 -3
  20. package/dist/agentsWireCaps.js +133 -39
  21. package/dist/cloudConfigWireCaps.d.ts +10 -1
  22. package/dist/cloudConfigWireCaps.js +181 -65
  23. package/dist/compactionStatus.d.ts +34 -0
  24. package/dist/compactionStatus.js +196 -0
  25. package/dist/controlRouter.d.ts +4 -2
  26. package/dist/controlRouter.js +39 -51
  27. package/dist/coreValuePorts.d.ts +26 -1
  28. package/dist/coreValuePorts.js +10 -0
  29. package/dist/corruptSessionCopy.d.ts +2 -1
  30. package/dist/corruptSessionCopy.js +3 -3
  31. package/dist/decideFailureNote.js +3 -3
  32. package/dist/declared/supportFloorDeclared.js +1 -1
  33. package/dist/detachWire.js +3 -2
  34. package/dist/devicesFace.d.ts +34 -0
  35. package/dist/devicesFace.js +90 -0
  36. package/dist/displayUntrusted.d.ts +1 -0
  37. package/dist/displayUntrusted.js +153 -5
  38. package/dist/engineAgentPanelStore.d.ts +14 -4
  39. package/dist/engineAgentPanelStore.js +14 -0
  40. package/dist/engineCapReader.d.ts +2 -1
  41. package/dist/engineCapReader.js +7 -5
  42. package/dist/engineCapsCache.d.ts +8 -0
  43. package/dist/engineCapsCache.js +59 -6
  44. package/dist/engineCapsChange.d.ts +2 -0
  45. package/dist/engineCapsChange.js +9 -0
  46. package/dist/engineErrorCodes.d.ts +11 -2
  47. package/dist/engineErrorCodes.js +11 -12
  48. package/dist/engineRowRef.js +4 -0
  49. package/dist/engineSessionMessages.d.ts +1 -0
  50. package/dist/engineSessionMessages.js +7 -1
  51. package/dist/engineTargetSeat.d.ts +27 -0
  52. package/dist/engineTargetSeat.js +199 -0
  53. package/dist/engineToolDirectory.d.ts +3 -0
  54. package/dist/engineToolDirectory.js +4 -2
  55. package/dist/engineWireFor.js +3 -8
  56. package/dist/env/uiLanguage.d.ts +2 -1
  57. package/dist/env/uiLanguage.js +3 -2
  58. package/dist/eventLeg.d.ts +7 -5
  59. package/dist/eventLeg.js +68 -49
  60. package/dist/fileHistoryCaptureCapability.d.ts +2 -4
  61. package/dist/fileHistoryCaptureCapability.js +12 -22
  62. package/dist/fileHistoryLegNotice.d.ts +2 -1
  63. package/dist/fileHistoryLegNotice.js +3 -3
  64. package/dist/frameBinding.d.ts +3 -0
  65. package/dist/frameBinding.js +12 -0
  66. package/dist/gateOutcome.js +16 -2
  67. package/dist/gateVocabulary.d.ts +8 -7
  68. package/dist/gateVocabulary.js +71 -73
  69. package/dist/generated/engineFactTables.d.ts +18 -1
  70. package/dist/generated/engineFactTables.js +56 -0
  71. package/dist/generated/engineNoticeTables.js +12 -3
  72. package/dist/generated/settingsSchemaFns.d.ts +18 -0
  73. package/dist/generated/settingsSchemaFns.js +70 -0
  74. package/dist/generated/settingsSchemaHooksClassifier.d.ts +2 -0
  75. package/dist/generated/settingsSchemaHooksClassifier.js +254 -0
  76. package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -0
  77. package/dist/generated/settingsSchemaMcpRequestEntry.js +162 -0
  78. package/dist/generated/settingsSchemaTables.d.ts +2 -0
  79. package/dist/generated/settingsSchemaTables.js +9 -0
  80. package/dist/generated/settingsSchemaTypes.d.ts +133 -0
  81. package/dist/generated/settingsSchemaTypes.js +1 -0
  82. package/dist/hitl/allowRuleShadow.d.ts +2 -1
  83. package/dist/hitl/allowRuleShadow.js +18 -15
  84. package/dist/hitl/approvalCardReasons.d.ts +3 -2
  85. package/dist/hitl/approvalCardReasons.js +29 -30
  86. package/dist/hitl/approvalHolds.d.ts +17 -0
  87. package/dist/hitl/approvalHolds.js +114 -29
  88. package/dist/hitl/askClassPair.d.ts +2 -2
  89. package/dist/hitl/askClassPair.js +16 -0
  90. package/dist/hitl/askGateWire.js +2 -1
  91. package/dist/hitl/askSettlementLine.d.ts +14 -4
  92. package/dist/hitl/askSettlementLine.js +67 -47
  93. package/dist/hitl/attributionLadder.d.ts +23 -0
  94. package/dist/hitl/attributionLadder.js +67 -0
  95. package/dist/hitl/automaticAnswerVerdict.d.ts +2 -1
  96. package/dist/hitl/automaticAnswerVerdict.js +8 -8
  97. package/dist/hitl/crashConvergedNotice.d.ts +5 -4
  98. package/dist/hitl/crashConvergedNotice.js +28 -41
  99. package/dist/hitl/decisionLedger.d.ts +55 -0
  100. package/dist/hitl/decisionLedger.js +156 -0
  101. package/dist/hitl/decisionRefusal.d.ts +1 -0
  102. package/dist/hitl/decisionRefusal.js +1 -1
  103. package/dist/hitl/decisionSend.d.ts +113 -0
  104. package/dist/hitl/decisionSend.js +579 -0
  105. package/dist/hitl/frameRouter.js +7 -8
  106. package/dist/hitl/hitlBridge.d.ts +1 -0
  107. package/dist/hitl/hitlBridge.js +21 -9
  108. package/dist/hitl/persistedRulesWire.d.ts +6 -5
  109. package/dist/hitl/persistedRulesWire.js +55 -73
  110. package/dist/hitl/planReviewWire.d.ts +5 -0
  111. package/dist/hitl/planReviewWire.js +53 -76
  112. package/dist/hitl/sessionPolicyDeliverable.d.ts +2 -0
  113. package/dist/hitl/sessionPolicyDeliverable.js +49 -9
  114. package/dist/hitl/sessionPolicyWire.d.ts +2 -1
  115. package/dist/hitl/sessionPolicyWire.js +23 -24
  116. package/dist/hitl/suspendedReopen.d.ts +2 -1
  117. package/dist/hitl/suspendedReopen.js +7 -10
  118. package/dist/hitl/toolApprovalWire.d.ts +17 -5
  119. package/dist/hitl/toolApprovalWire.js +120 -147
  120. package/dist/hooksWireCaps.js +145 -56
  121. package/dist/host.d.ts +21 -0
  122. package/dist/hostTurnSettings.d.ts +110 -0
  123. package/dist/hostTurnSettings.js +692 -0
  124. package/dist/humanTurn.d.ts +15 -1
  125. package/dist/humanTurn.js +100 -12
  126. package/dist/humanTurnRead.d.ts +2 -0
  127. package/dist/humanTurnRead.js +22 -1
  128. package/dist/i18n/messages.en.d.ts +713 -0
  129. package/dist/i18n/messages.en.js +713 -0
  130. package/dist/i18n/messages.zh.js +854 -1
  131. package/dist/index.d.ts +45 -13
  132. package/dist/index.js +27 -9
  133. package/dist/inheritEnvCapability.d.ts +4 -2
  134. package/dist/inheritEnvCapability.js +12 -5
  135. package/dist/inheritEnvWire.d.ts +3 -2
  136. package/dist/inheritEnvWire.js +14 -16
  137. package/dist/injectionLaneNotice.d.ts +5 -0
  138. package/dist/injectionLaneNotice.js +46 -0
  139. package/dist/interactiveHalt.js +17 -6
  140. package/dist/liveModelCatalog.d.ts +2 -1
  141. package/dist/liveModelCatalog.js +14 -8
  142. package/dist/mcpPanel.d.ts +10 -1
  143. package/dist/mcpPanel.js +42 -13
  144. package/dist/mcpProbeCapability.d.ts +2 -1
  145. package/dist/mcpProbeCapability.js +7 -11
  146. package/dist/mcpProbeWire.d.ts +3 -1
  147. package/dist/mcpProbeWire.js +5 -0
  148. package/dist/mcpReconnect.js +2 -2
  149. package/dist/mcpToolToggles.d.ts +6 -0
  150. package/dist/mcpToolToggles.js +46 -0
  151. package/dist/mcpWireCaps.d.ts +43 -3
  152. package/dist/mcpWireCaps.js +194 -59
  153. package/dist/mcpWireTransport.d.ts +4 -0
  154. package/dist/mcpWireTransport.js +18 -0
  155. package/dist/memoryEntriesWire.js +5 -10
  156. package/dist/model/onboardJudgement.d.ts +93 -0
  157. package/dist/model/onboardJudgement.js +415 -0
  158. package/dist/model/tierVocabulary.d.ts +2 -0
  159. package/dist/model/tierVocabulary.js +17 -5
  160. package/dist/modelCapabilityProbe.d.ts +65 -0
  161. package/dist/modelCapabilityProbe.js +601 -0
  162. package/dist/modelIdentityResolvability.d.ts +5 -0
  163. package/dist/modelIdentityResolvability.js +49 -22
  164. package/dist/ownKey.d.ts +33 -0
  165. package/dist/ownKey.js +109 -0
  166. package/dist/panelReduce.d.ts +11 -1
  167. package/dist/panelReduce.js +95 -16
  168. package/dist/panelStateHolder.d.ts +1 -0
  169. package/dist/panelStateHolder.js +10 -1
  170. package/dist/permissionRuleIssue.d.ts +2 -1
  171. package/dist/permissionRuleIssue.js +23 -20
  172. package/dist/permissionRulesWriteCapability.d.ts +2 -1
  173. package/dist/permissionRulesWriteCapability.js +8 -6
  174. package/dist/pluginHooksWire.d.ts +46 -3
  175. package/dist/pluginHooksWire.js +220 -12
  176. package/dist/prepareRefusal.d.ts +8 -0
  177. package/dist/prepareRefusal.js +72 -0
  178. package/dist/printModelStatus.d.ts +63 -0
  179. package/dist/printModelStatus.js +155 -0
  180. package/dist/request/taskRequest.d.ts +16 -10
  181. package/dist/request/taskRequest.js +195 -58
  182. package/dist/resumeRefusalCopy.d.ts +14 -9
  183. package/dist/resumeRefusalCopy.js +89 -144
  184. package/dist/retryStatus.d.ts +55 -0
  185. package/dist/retryStatus.js +155 -19
  186. package/dist/ruleRefusalSentence.d.ts +4 -0
  187. package/dist/ruleRefusalSentence.js +58 -0
  188. package/dist/sandboxWire.d.ts +2 -1
  189. package/dist/sandboxWire.js +55 -21
  190. package/dist/scenarioRefusal.d.ts +10 -0
  191. package/dist/scenarioRefusal.js +111 -0
  192. package/dist/seam.d.ts +48 -9
  193. package/dist/seam.js +54 -5
  194. package/dist/seatContract.d.ts +272 -14
  195. package/dist/seatContract.js +711 -23
  196. package/dist/selfOrchestrationDenial.js +7 -19
  197. package/dist/sessionIdSegment.d.ts +6 -0
  198. package/dist/sessionIdSegment.js +24 -0
  199. package/dist/sessionMemoryStatus.js +6 -11
  200. package/dist/sessionPolicyCapability.d.ts +2 -1
  201. package/dist/sessionPolicyCapability.js +8 -6
  202. package/dist/settingsCredentialKeyPaths.d.ts +8 -0
  203. package/dist/settingsCredentialKeyPaths.js +219 -0
  204. package/dist/settingsHooksSalvage.d.ts +44 -0
  205. package/dist/settingsHooksSalvage.js +211 -0
  206. package/dist/skillToolListsCapability.d.ts +2 -1
  207. package/dist/skillToolListsCapability.js +8 -6
  208. package/dist/skillsWireCaps.d.ts +0 -3
  209. package/dist/skillsWireCaps.js +1 -2
  210. package/dist/sseIdleTriage.js +3 -2
  211. package/dist/subagent/engineSubagentResume.js +15 -9
  212. package/dist/subagentContentStore.d.ts +4 -0
  213. package/dist/subagentContentStore.js +157 -27
  214. package/dist/toolHistoryMismatch.js +3 -2
  215. package/dist/toolRoster.d.ts +3 -2
  216. package/dist/toolRoster.js +21 -20
  217. package/dist/toolsFlagNames.d.ts +8 -0
  218. package/dist/toolsFlagNames.js +110 -0
  219. package/dist/turnFailurePresentation.d.ts +12 -1
  220. package/dist/turnFailurePresentation.js +220 -15
  221. package/dist/usageAnalytics.js +6 -11
  222. package/dist/userAttachmentEnvelope.d.ts +1 -0
  223. package/dist/userAttachmentEnvelope.js +37 -7
  224. package/dist/userAttachmentSeat.d.ts +21 -0
  225. package/dist/userAttachmentSeat.js +75 -0
  226. package/dist/userInvokedSkillsCapability.d.ts +11 -1
  227. package/dist/userInvokedSkillsCapability.js +31 -7
  228. package/dist/wireErrorTriage.d.ts +7 -0
  229. package/dist/wireErrorTriage.js +23 -1
  230. package/dist/wireFailureShape.js +2 -1
  231. package/dist/wireRefusalCopy.d.ts +62 -16
  232. package/dist/wireRefusalCopy.js +307 -148
  233. package/dist/workflowsJournalCapability.d.ts +2 -1
  234. package/dist/workflowsJournalCapability.js +8 -6
  235. package/docs/INTEGRATION-CLIENTS.md +951 -42
  236. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -16,10 +16,10 @@ export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
16
16
  export { engineRefOf, sameEngineRef, TRANSCRIPT_ROW_SIDECAR_KEYS } from './engineRowRef.js';
17
17
  export type { EngineRowRef, SameEngineRefVerdict, EngineBoundRun } from './engineRowRef.js';
18
18
  export { isReplayMarked } from './replayBody.js';
19
- export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE } from './eventLeg.js';
20
- export type { EventLeg, EventLegBindCause, EventLegBoundInfo, EventLegElicitationFrame, EventLegFrameInfo, EventLegHitlEnvelope, EventLegHitlPorts, EventLegIdleTriagePorts, EventLegKind, EventLegLiveSpec, EventLegOwnerPorts, EventLegPortName, EventLegPorts, EventLegQuestionFrame, EventLegRefusal, EventLegReport, EventLegRow, EventLegRunPorts, EventLegRunSpec, EventLegSpec, EventLegStage, EventLegStreamContext, EventLegStreamDecorator, EventLegTap, EventLegToolApprovalFrame, } from './eventLeg.js';
19
+ export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE, approvalFrameContextOf } from './eventLeg.js';
20
+ export type { ApprovalFrameContext, EventLeg, EventLegBindCause, EventLegBoundInfo, EventLegElicitationFrame, EventLegFrameInfo, EventLegHitlEnvelope, EventLegHitlPorts, EventLegIdleTriagePorts, EventLegKind, EventLegLiveSpec, EventLegOwnerPorts, EventLegPortName, EventLegPorts, EventLegQuestionFrame, EventLegRefusal, EventLegReport, EventLegRow, EventLegRunPorts, EventLegRunSpec, EventLegSpec, EventLegStage, EventLegTap, EventLegToolApprovalFrame, } from './eventLeg.js';
21
21
  export { frameBindingOf, inheritFrameBinding } from './frameBinding.js';
22
- 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';
22
+ 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, subagentContentEventOf, } from './subagentContentStore.js';
23
23
  export type { BgTerminalFacts, SubagentContentEvent, SubagentContentItem, SubagentContentSnapshot, SubagentContentStoreConfig, SubagentOwnerRecord, SubagentOwnerSessionConflict, SubagentViewSlot, } from './subagentContentStore.js';
24
24
  export * from './engineAgentPanelStore.js';
25
25
  export * from './engineAgentAbsence.js';
@@ -30,8 +30,11 @@ export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay,
30
30
  export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame, } from './liveQuestionStore.js';
31
31
  export * from './engineInlineTaskStats.js';
32
32
  export * from './printToolResultFrame.js';
33
- export { __resetEngineCapsCacheForTests, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
34
- export type { EngineCapState, EngineCapsLanding, EngineCapsProbeRotation, EngineCapValueState, } from './engineCapsCache.js';
33
+ export * from './printModelStatus.js';
34
+ export * from './compactionStatus.js';
35
+ export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
36
+ export { onEngineCapsChange } from './engineCapsChange.js';
37
+ export type { EngineCapState, EngineCapsChange, EngineCapsLanding, EngineCapsProbeRotation, EngineCapsReprobe, EngineCapValueState, } from './engineCapsCache.js';
35
38
  export * from './sqlEngineCapability.js';
36
39
  export * from './writeProtectionCapability.js';
37
40
  export * from './webSearchBackendCapability.js';
@@ -96,13 +99,13 @@ export * from './modelCapabilityProbe.js';
96
99
  export * from './classifierStatus.js';
97
100
  export * from './engineToolLabelStore.js';
98
101
  export * from './fleetTaskDesc.js';
99
- export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
102
+ export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
100
103
  export type { DisplayUntrustedOptions, DisplayMark, DisplayMarkSpan, DisplayUntrustedMarked } from './displayUntrusted.js';
101
104
  export { isDiagnosticValueWord } from './displayUntrusted.js';
102
105
  export type * from './types/engineState.js';
103
106
  export * from './hostEnv.js';
104
107
  export * from './unrefTimer.js';
105
- export { ControlRouter, ControlSafetyError, errCodes, steerBodyOf, steerRefusalAdviceOf, steeringRefusedBeforeEngine, type AssistantPreemptLike, type ControlClientLike, type ControlRouterOptions, type ControlRouterSteerOptions, type ControlSafetyCode, type ErrCodes, type PreemptOptions, type RunsResourceLike, type SteerBody, type SteerBodyInput, type SteerRefusalAdvice, type SteeringRefusedBeforeEngine, } from './controlRouter.js';
108
+ export { ControlRouter, ControlSafetyError, errCodes, steerBodyOf, steerRefusalAdviceOf, steeringRefusedBeforeEngine, type AssistantPreemptLike, type ControlClientLike, type ControlRouterOptions, type ControlRouterSteerOptions, type ControlSafetyCode, type ErrCodes, type PreemptOptions, type RunsResourceLike, type SteerBody, type SteerBodyInput, type SteerHostQueueFact, type SteerRefusalAdvice, type SteeringRefusedBeforeEngine, } from './controlRouter.js';
106
109
  export { preemptReceiptLine, type PreemptOutcome, type PreemptParkedStatus } from './preemptWire.js';
107
110
  export { readSteerReceipt, type SteerReceiptReading } from './steerReceipt.js';
108
111
  export * from './sseIdleTriage.js';
@@ -110,8 +113,9 @@ export * from './engineWireSdk.js';
110
113
  export * from './classifierVerdictWire.js';
111
114
  export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
112
115
  export { findSystemReminderOpenTag, type SystemReminderOpenTagSpan } from './systemReminderTag.js';
113
- 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';
116
+ export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_K8S_LANE_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, CONFIG_TOOL_FACE_CONTROL, 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, 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, PROMPT_ASSEMBLED_ROLE_REFUSED, 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, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
114
117
  export type { DelegationCapDisposition, ModelFallbackReason, OperatorGateRefusal, RunDeathVerdictCode, } from './engineErrorCodes.js';
118
+ export { imageInvalidFailureNoteOf, prepareRefusalCodeOf, prepareRefusalNoteOf, type PrepareRefusalCode, type PrepareRefusalNoteFacts } from './prepareRefusal.js';
115
119
  export * from './agentsWireCaps.js';
116
120
  export { engineToolDirectoryOf } from './engineToolDirectory.js';
117
121
  export type { EngineToolDirectory, EngineToolDirectorySource } from './engineToolDirectory.js';
@@ -219,8 +223,13 @@ export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredP
219
223
  export type { PromptDeliveryLedger, PromptDeliveryRecord } from './promptDelivery.js';
220
224
  export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
221
225
  export type { UserAttachmentDescriptor, UserAttachmentNotebookCell } from './userAttachmentEnvelope.js';
222
- export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
223
- export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, } from './humanTurn.js';
226
+ export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
227
+ export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, HumanTurnNotice, } from './humanTurn.js';
228
+ export type { UserAttachment } from '@sema-agent/sdk';
229
+ export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
230
+ export type { UserAttachmentSeatReading, UserAttachmentSeatPresent, UserAttachmentSeatLimits } from './userAttachmentSeat.js';
231
+ export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
232
+ export type { ScenarioRefusalReading } from './scenarioRefusal.js';
224
233
  export { projectEngineSessionMessages } from './engineSessionMessages.js';
225
234
  export type { EngineHistoryProjection, EngineHistoryProjectionOpts, EngineHistoryMessage, EngineHistoryMessageBody, EngineHistoryBlock, EngineHistoryTextBlock, EngineHistoryThinkingBlock, EngineHistoryToolUseBlock, EngineHistoryToolResultBlock, EngineHistoryMediaBlock, EngineHistoryOpaqueBlock, EngineHistoryBase64Source, EngineHistoryJson, EngineHistorySkipped, } from './engineSessionMessages.js';
226
235
  export * from './resumeRefusalCopy.js';
@@ -235,7 +244,9 @@ export * from './detachWire.js';
235
244
  export * from './workflowMonitor.js';
236
245
  export * from './workflowClient.js';
237
246
  export * from './hooksWireCaps.js';
238
- export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, } from './pluginHooksWire.js';
247
+ export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, userPromptSubmitExecutorOf, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, type SettingsHooksSalvageRow, type PluginHookModuleVerdict, type SessionHookVerdict, } from './pluginHooksWire.js';
248
+ export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, type HooksSalvage, type HooksSalvageDrop, type HooksSalvageRejection, type HooksSalvageOutcome, type HooksSalvageDropCode, type HooksSalvageRejectionCode, } from './settingsHooksSalvage.js';
249
+ export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, type HostSuppliedKey, type HostSettingCause, type HostSettingDisposition, type HostSettingPlane, type HostSettingNoticeId, type HostSettingRow, type HostSettingNotice, type HostTurnVerdict, type HostTurnSettingsSources, type HostTurnSettingsInput, type HostSettingsCarried, type HostTurnSettings, } from './hostTurnSettings.js';
239
250
  export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
240
251
  export { hookMatcherVerdict } from './hookMatcherVerdict.js';
241
252
  export type { HookMatcherVerdict, HookMatcherUnjudgedReason, HookMatcherRefusedReason } from './hookMatcherVerdict.js';
@@ -245,7 +256,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
245
256
  export * from './liveInitToolFace.js';
246
257
  export * from './printInitToolFace.js';
247
258
  export * from './model/providerPresets.js';
248
- export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
259
+ export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
249
260
  export type { ActiveGate, ApprovalsResourceLike, AskAnswer, AssistantResourceLike, DecideOperationEnd, DecideOperationEvent, DecideOperationIdentity, DecideOperationObserver, DecideOperationSpan, DecideOperationStart, FindPendingOutcome, GateCurrentPending, GatePrompt, HitlBackendDenyDecision, HitlBridgeOptions, HitlCanUseToolFn, HitlClientLike, HitlDecideDenyOutcome, HitlPermissionDecisionLike, HitlSafetyCode, PlanReviewModeAfter, PlanReviewOutcome, } from './hitl/hitlBridge.js';
250
261
  export * from './hitl/suspendedReopen.js';
251
262
  export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, type ApprovalResolution, type ApprovalResolutionDecided, type ApprovalResolutionNotSent, type ApprovalResolutionUnsettled, type ApprovalResolutionLane, type ApprovalNotSentCause, type ApprovalUnsettledCause, type ApprovalDenyFacts, } from './hitl/approvalResolution.js';
@@ -262,6 +273,10 @@ export { ruleToolNameVerdictOf } from './protocolSegment.js';
262
273
  export type { RuleToolNameReading } from './protocolSegment.js';
263
274
  export * from './hitl/askGateWire.js';
264
275
  export * from './hitl/planReviewWire.js';
276
+ export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
277
+ export type { DecisionIdentity } from './hitl/decisionLedger.js';
278
+ export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, } from './hitl/decisionSend.js';
279
+ export type { HitlApprovalDecisionRequest, HitlAskDecisionRequest, HitlDecisionApplied, HitlDecisionFamily, HitlDecisionGate, HitlDecisionNotApplied, HitlDecisionNotAppliedCause, HitlDecisionNotSent, HitlDecisionNotSentCause, HitlDecisionSendClient, HitlDecisionSendDeps, HitlDecisionSendOutcome, HitlDecisionSendRequest, HitlDecisionSettledElsewhere, HitlDecisionUnconfirmed, HitlDecisionUnconfirmedCause, HitlElicitationDecisionRequest, } from './hitl/decisionSend.js';
265
280
  export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
266
281
  export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
267
282
  export * from './hitl/parkOwnership.js';
@@ -303,6 +318,14 @@ export type { EngineEnvView, EngineEnvGroupDecl, EngineEnvSourcingInput, EngineE
303
318
  export * from './compensations.js';
304
319
  export * from './request/printNotification.js';
305
320
  export * from './seatContract.js';
321
+ export { mcpToolTogglesToExcludeTools } from './mcpToolToggles.js';
322
+ export type { McpToolToggleKey, McpMountedServers } from './mcpToolToggles.js';
323
+ export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
324
+ export type { DevicesFace, DevicesFaceInput, DevicesFaceUnavailableWhy } from './devicesFace.js';
325
+ export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
326
+ export type { CloudLoginFailureContext, EngineTargetReading, EngineTargetWatch } from './engineTargetSeat.js';
327
+ export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
328
+ export type { OnboardJsonObject, OnboardPlanEntry, OnboardProbeBodyReader, OnboardProbeDeps, OnboardProbeFetch, OnboardProbeRequestInit, OnboardProbeResponse, OnboardProbeTarget, OnboardWritePlan, OnboardWritePlanInput, OnboardWriteVerdict, } from './model/onboardJudgement.js';
306
329
  export * from './agentSession/contract.js';
307
330
  export * from './agentSession/backgroundView.js';
308
331
  export { readAssistantInbox } from './assistantInbox.js';
@@ -334,8 +357,17 @@ export { engineCredentialRequirementOf } from './engineCredentialRequirement.js'
334
357
  export type { EngineProbeAnswer, EngineCredentialNeed } from './engineCredentialRequirement.js';
335
358
  export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
336
359
  export type { CredentialAttachWord, CredentialConsent, CredentialFactName, CredentialFacts, CredentialProvenance, CredentialSidecarOwnership, CredentialTargetKind, CredentialTargetProvenance, } from './credentialProvenance.js';
337
- export { isSessionIdPathSegment } from './sessionIdSegment.js';
360
+ export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
361
+ export type { SessionIdRefusal, SessionIdRefusalWhy } from './sessionIdSegment.js';
338
362
  export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
339
363
  export type { CutForDisplayOptions, CutForDisplayResult, NoticePresentationAudience, NoticeOutlet, NoticeOccurrence, NoticeSeatClass, NoticeDeployment, NoticePresentationFacts, OutletKind, OutletReachability, OutletReachabilityContext, OutletRenderingPlan, NoticePrintCarrier, NoticePrintLineInput, NoticePrintLineResult, } from './noticePresentation.js';
340
364
  export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
341
365
  export type { PrintPermissionOutcome, PrintPermissionOutcomeForm } from './printPermissionOutcome.js';
366
+ export { settingsCredentialKeyPaths, isCredentialEnvName, isCredentialConfigKey, credentialNameWords } from './settingsCredentialKeyPaths.js';
367
+ export type { CredentialKeyFinding } from './settingsCredentialKeyPaths.js';
368
+ export { injectionLaneNotice, INJECTION_SOURCES } from './injectionLaneNotice.js';
369
+ export type { InjectionSource } from './injectionLaneNotice.js';
370
+ export { ruleRefusalSentence } from './ruleRefusalSentence.js';
371
+ export type { RuleRefusalRow } from './ruleRefusalSentence.js';
372
+ export { parseToolsFlagNames } from './toolsFlagNames.js';
373
+ export type { ToolsFlagNames } from './toolsFlagNames.js';
package/dist/index.js CHANGED
@@ -13,9 +13,9 @@ export * from './sdkWireTransit.js';
13
13
  export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
14
14
  export { engineRefOf, sameEngineRef, TRANSCRIPT_ROW_SIDECAR_KEYS } from './engineRowRef.js';
15
15
  export { isReplayMarked } from './replayBody.js';
16
- export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE } from './eventLeg.js';
16
+ export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE, approvalFrameContextOf } from './eventLeg.js';
17
17
  export { frameBindingOf, inheritFrameBinding } from './frameBinding.js';
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';
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, subagentContentEventOf, } from './subagentContentStore.js';
19
19
  export * from './engineAgentPanelStore.js';
20
20
  export * from './engineAgentAbsence.js';
21
21
  export * from './fleetAgentPanelProjection.js';
@@ -23,7 +23,10 @@ export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './pan
23
23
  export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
24
24
  export * from './engineInlineTaskStats.js';
25
25
  export * from './printToolResultFrame.js';
26
- export { __resetEngineCapsCacheForTests, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
26
+ export * from './printModelStatus.js';
27
+ export * from './compactionStatus.js';
28
+ export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
29
+ export { onEngineCapsChange } from './engineCapsChange.js';
27
30
  export * from './sqlEngineCapability.js';
28
31
  export * from './writeProtectionCapability.js';
29
32
  export * from './webSearchBackendCapability.js';
@@ -81,7 +84,7 @@ export * from './modelCapabilityProbe.js';
81
84
  export * from './classifierStatus.js';
82
85
  export * from './engineToolLabelStore.js';
83
86
  export * from './fleetTaskDesc.js';
84
- export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
87
+ export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
85
88
  export { isDiagnosticValueWord } from './displayUntrusted.js';
86
89
  export * from './hostEnv.js';
87
90
  export * from './unrefTimer.js';
@@ -93,7 +96,8 @@ export * from './engineWireSdk.js';
93
96
  export * from './classifierVerdictWire.js';
94
97
  export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
95
98
  export { findSystemReminderOpenTag } from './systemReminderTag.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';
99
+ export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_K8S_LANE_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, CONFIG_TOOL_FACE_CONTROL, 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, 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, PROMPT_ASSEMBLED_ROLE_REFUSED, 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, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
100
+ export { imageInvalidFailureNoteOf, prepareRefusalCodeOf, prepareRefusalNoteOf } from './prepareRefusal.js';
97
101
  export * from './agentsWireCaps.js';
98
102
  export { engineToolDirectoryOf } from './engineToolDirectory.js';
99
103
  export * from './attachmentsWireCaps.js';
@@ -187,7 +191,9 @@ export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
187
191
  export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
188
192
  export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
189
193
  export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
190
- export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
194
+ export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
195
+ export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
196
+ export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
191
197
  export { projectEngineSessionMessages } from './engineSessionMessages.js';
192
198
  export * from './resumeRefusalCopy.js';
193
199
  export * from './wireRefusalCopy.js';
@@ -200,7 +206,9 @@ export * from './detachWire.js';
200
206
  export * from './workflowMonitor.js';
201
207
  export * from './workflowClient.js';
202
208
  export * from './hooksWireCaps.js';
203
- export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, } from './pluginHooksWire.js';
209
+ export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, userPromptSubmitExecutorOf, } from './pluginHooksWire.js';
210
+ export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, } from './settingsHooksSalvage.js';
211
+ export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, } from './hostTurnSettings.js';
204
212
  export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
205
213
  export { hookMatcherVerdict } from './hookMatcherVerdict.js';
206
214
  export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
@@ -209,7 +217,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
209
217
  export * from './liveInitToolFace.js';
210
218
  export * from './printInitToolFace.js';
211
219
  export * from './model/providerPresets.js';
212
- export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
220
+ export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
213
221
  export * from './hitl/suspendedReopen.js';
214
222
  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';
215
223
  export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
@@ -223,6 +231,8 @@ export * from './coreValuePorts.js';
223
231
  export { ruleToolNameVerdictOf } from './protocolSegment.js';
224
232
  export * from './hitl/askGateWire.js';
225
233
  export * from './hitl/planReviewWire.js';
234
+ export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
235
+ export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, } from './hitl/decisionSend.js';
226
236
  export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
227
237
  export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
228
238
  export * from './hitl/parkOwnership.js';
@@ -258,6 +268,10 @@ export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js'
258
268
  export * from './compensations.js';
259
269
  export * from './request/printNotification.js';
260
270
  export * from './seatContract.js';
271
+ export { mcpToolTogglesToExcludeTools } from './mcpToolToggles.js';
272
+ export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
273
+ export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
274
+ export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
261
275
  export * from './agentSession/contract.js';
262
276
  export * from './agentSession/backgroundView.js';
263
277
  export { readAssistantInbox } from './assistantInbox.js';
@@ -282,6 +296,10 @@ export { createMissLedger, createTranslator, DATA_FACE_LANGUAGE, msg, renderMess
282
296
  export * from './ruleRemovalConsequence.js';
283
297
  export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
284
298
  export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
285
- export { isSessionIdPathSegment } from './sessionIdSegment.js';
299
+ export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
286
300
  export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
287
301
  export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
302
+ export { settingsCredentialKeyPaths, isCredentialEnvName, isCredentialConfigKey, credentialNameWords } from './settingsCredentialKeyPaths.js';
303
+ export { injectionLaneNotice, INJECTION_SOURCES } from './injectionLaneNotice.js';
304
+ export { ruleRefusalSentence } from './ruleRefusalSentence.js';
305
+ export { parseToolsFlagNames } from './toolsFlagNames.js';
@@ -1,3 +1,4 @@
1
+ import { type UiLanguage } from './env/uiLanguage.js';
1
2
  import type { RequestLane } from './request/taskRequest.js';
2
3
  export type InheritEnvValueShape = 'false' | 'string' | 'number' | 'null' | 'array' | 'object' | 'other';
3
4
  export type InheritEnvOwnCredentialsReading = {
@@ -13,6 +14,7 @@ export type InheritEnvOwnCredentialsReading = {
13
14
  readonly kind: 'unobserved';
14
15
  };
15
16
  export declare function observedInheritEnvOwnCredentialsWithheld(baseUrl?: string | undefined): InheritEnvOwnCredentialsReading;
17
+ export declare function observedInheritEnvOwnCredentialValuesWithheld(baseUrl?: string | undefined): InheritEnvOwnCredentialsReading;
16
18
  export type InheritEnvOmitReason = 'lane' | 'project_context' | 'capability_absent' | 'capability_declined' | 'capability_unreadable' | 'identity_unverified';
17
19
  export type InheritEnvIntent = {
18
20
  readonly send: 'all';
@@ -27,5 +29,5 @@ export interface InheritEnvIntentInput {
27
29
  readonly serviceIdentityVerified: boolean;
28
30
  }
29
31
  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;
32
+ export declare function inheritEnvNotConfirmedNotice(lang?: UiLanguage | (string & {})): string;
33
+ export declare function inheritEnvNoticeOf(intent: InheritEnvIntent, lang?: UiLanguage | (string & {})): string | undefined;
@@ -1,6 +1,9 @@
1
1
  import { engineCapValue } from './engineCapsCache.js';
2
+ import { isUiLanguage } from './env/uiLanguage.js';
2
3
  import { engineWireTarget } from './engineWireTarget.js';
4
+ import { msg, renderMessage } from './i18n/translate.js';
3
5
  const OWN_CREDENTIALS_WITHHELD_KEY = 'inherit_env.own_credentials_withheld';
6
+ const OWN_CREDENTIAL_VALUES_WITHHELD_KEY = 'inherit_env.own_credential_values_withheld';
4
7
  const CONFIRMED = Object.freeze({ kind: 'confirmed' });
5
8
  const ABSENT = Object.freeze({ kind: 'absent' });
6
9
  const UNREADABLE = Object.freeze({ kind: 'unreadable' });
@@ -23,9 +26,9 @@ function shapeOf(v) {
23
26
  return 'other';
24
27
  }
25
28
  }
26
- export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTarget()?.baseUrl) {
29
+ function inheritEnvWordReading(baseUrl, key) {
27
30
  try {
28
- const slot = engineCapValue(typeof baseUrl === 'string' ? baseUrl : undefined, OWN_CREDENTIALS_WITHHELD_KEY);
31
+ const slot = engineCapValue(typeof baseUrl === 'string' ? baseUrl : undefined, key);
29
32
  switch (slot.kind) {
30
33
  case 'unobserved':
31
34
  return UNOBSERVED;
@@ -43,6 +46,12 @@ export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTar
43
46
  return UNOBSERVED;
44
47
  }
45
48
  }
49
+ export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTarget()?.baseUrl) {
50
+ return inheritEnvWordReading(baseUrl, OWN_CREDENTIALS_WITHHELD_KEY);
51
+ }
52
+ export function observedInheritEnvOwnCredentialValuesWithheld(baseUrl = engineWireTarget()?.baseUrl) {
53
+ return inheritEnvWordReading(baseUrl, OWN_CREDENTIAL_VALUES_WITHHELD_KEY);
54
+ }
46
55
  const ALL = Object.freeze({ send: 'all' });
47
56
  const omit = (reason) => Object.freeze({ send: 'omit', reason });
48
57
  function fieldOf(input, key) {
@@ -84,10 +93,8 @@ export function inheritEnvIntentOf(input) {
84
93
  return omit('identity_unverified');
85
94
  return ALL;
86
95
  }
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
96
  export function inheritEnvNotConfirmedNotice(lang) {
89
- void lang;
90
- return NOT_CONFIRMED_SENTENCE_EN;
97
+ return renderMessage(msg('session.inheritEnv.notConfirmed'), isUiLanguage(lang) ? lang : undefined);
91
98
  }
92
99
  export function inheritEnvNoticeOf(intent, lang) {
93
100
  try {
@@ -1,3 +1,4 @@
1
+ import type { UiLanguage } from './env/uiLanguage.js';
1
2
  import { type InheritEnvWord, type TaskRequestLike } from './request/taskRequest.js';
2
3
  export type InheritEnvWithheldCause = 'server_version_unknown';
3
4
  export interface InheritEnvWithheld {
@@ -11,9 +12,9 @@ export interface InheritEnvDeclaration {
11
12
  readonly withheld?: InheritEnvWithheld;
12
13
  }
13
14
  export declare function inheritEnvDeclaration(word: unknown, serverVersion: string | undefined): InheritEnvDeclaration;
14
- export declare function inheritEnvWithheldNotice(withheld: InheritEnvWithheld): string;
15
+ export declare function inheritEnvWithheldNotice(withheld: InheritEnvWithheld, lang?: UiLanguage): string;
15
16
  export interface InheritEnvRefusalDetail {
16
17
  readonly code: string;
17
18
  }
18
19
  export declare function inheritEnvRefusalFromError(err: unknown, sentRequest: TaskRequestLike | undefined): InheritEnvRefusalDetail | null;
19
- export declare function inheritEnvRefusalContent(_detail: InheritEnvRefusalDetail): string;
20
+ export declare function inheritEnvRefusalContent(_detail: InheritEnvRefusalDetail, lang?: UiLanguage): string;
@@ -1,6 +1,8 @@
1
+ import { msg, renderMessage } from './i18n/translate.js';
1
2
  import { INHERIT_ENV_WORDS, isInheritEnvWord } from './request/taskRequest.js';
2
- import { settingsPermissionBucketRefusalFromError } from './wireRefusalCopy.js';
3
+ import { fieldLimitRefusalFromError } from './wireRefusalCopy.js';
3
4
  import { engineVersionTier } from './supportFloor.js';
5
+ import { guardedRead, readOwnDataValue } from './ownKey.js';
4
6
  const EMPTY_DECLARATION = Object.freeze({ field: Object.freeze({}) });
5
7
  export function inheritEnvDeclaration(word, serverVersion) {
6
8
  if (word === undefined || word === null)
@@ -14,12 +16,15 @@ export function inheritEnvDeclaration(word, serverVersion) {
14
16
  }
15
17
  const WITHHELD_NOTICES = Object.freeze({
16
18
  server_version_unknown: Object.freeze({
17
- all: "Not sent with this request: the engine's version is not known yet, and an engine that does not know the setting that lets the shell inherit this machine's whole environment refuses the whole request, so it was held back; this run's shell gets the default environment, with credential-like variables removed, and on an engine that does know the setting, leaving it out also clears an earlier whole-environment choice for this session.",
18
- scrub: "Not sent with this request: the engine's version is not known yet, so the default-environment setting was left out; that has the same effect, because leaving it out also gives this run the default environment (credential-like variables removed).",
19
+ all: 'session.inheritEnv.withheld.all',
20
+ scrub: 'session.inheritEnv.withheld.scrub',
19
21
  }),
20
22
  });
21
- const WITHHELD_UNKNOWN_NOTICE = 'Not sent with this request: the shell-environment setting was held back for a reason this version does not recognize.';
22
- export function inheritEnvWithheldNotice(withheld) {
23
+ const WITHHELD_UNKNOWN_NOTICE = 'session.inheritEnv.withheld.unknown';
24
+ export function inheritEnvWithheldNotice(withheld, lang) {
25
+ return renderMessage(msg(inheritEnvWithheldKey(withheld)), lang);
26
+ }
27
+ function inheritEnvWithheldKey(withheld) {
23
28
  try {
24
29
  if (typeof withheld !== 'object' || withheld === null)
25
30
  return WITHHELD_UNKNOWN_NOTICE;
@@ -37,12 +42,7 @@ const FIELD_INVALID = 'request.field_invalid';
37
42
  function readGuarded(o, key) {
38
43
  if (typeof o !== 'object' || o === null)
39
44
  return undefined;
40
- try {
41
- return o[key];
42
- }
43
- catch {
44
- return undefined;
45
- }
45
+ return guardedRead(() => readOwnDataValue(o, key));
46
46
  }
47
47
  export function inheritEnvRefusalFromError(err, sentRequest) {
48
48
  try {
@@ -50,7 +50,7 @@ export function inheritEnvRefusalFromError(err, sentRequest) {
50
50
  return null;
51
51
  if (readGuarded(err, 'errorCode') !== FIELD_INVALID)
52
52
  return null;
53
- if (settingsPermissionBucketRefusalFromError(err) !== null)
53
+ if (fieldLimitRefusalFromError(err) !== null)
54
54
  return null;
55
55
  return Object.freeze({ code: FIELD_INVALID });
56
56
  }
@@ -58,8 +58,6 @@ export function inheritEnvRefusalFromError(err, sentRequest) {
58
58
  return null;
59
59
  }
60
60
  }
61
- const REFUSAL_NOT_ACCEPTED = 'The engine refused this request as invalid, under a refusal code that many different request fields share · ' +
62
- "This request asked for the shell to inherit this machine's whole environment, which the engine accepts only when tools run directly on its own machine and the request belongs to a session; if that is what it refused, send it again without that setting (or with the default)";
63
- export function inheritEnvRefusalContent(_detail) {
64
- return REFUSAL_NOT_ACCEPTED;
61
+ export function inheritEnvRefusalContent(_detail, lang) {
62
+ return renderMessage(msg('session.inheritEnv.refusal'), lang);
65
63
  }
@@ -0,0 +1,5 @@
1
+ import type { UiLanguage } from './env/uiLanguage.js';
2
+ import type { ExecutionLaneReading } from './executionLaneCapability.js';
3
+ export declare const INJECTION_SOURCES: readonly ["stdio_mcp", "credentialed_mcp", "task_hooks"];
4
+ export type InjectionSource = (typeof INJECTION_SOURCES)[number];
5
+ export declare function injectionLaneNotice(lane: ExecutionLaneReading, sources: readonly InjectionSource[], lang?: UiLanguage): string | undefined;
@@ -0,0 +1,46 @@
1
+ import { capForDisplay } from './fleetTaskDesc.js';
2
+ import { msg, renderMessage } from './i18n/translate.js';
3
+ export const INJECTION_SOURCES = Object.freeze(['stdio_mcp', 'credentialed_mcp', 'task_hooks']);
4
+ const LANE_WORD_MAX = 40;
5
+ const ITEM_KEYS = Object.freeze({
6
+ stdio_mcp: 'notice.injectionLane.item.stdioMcp',
7
+ credentialed_mcp: 'notice.injectionLane.item.credentialedMcp',
8
+ task_hooks: 'notice.injectionLane.item.taskHooks',
9
+ });
10
+ function remoteLaneWordOf(lane) {
11
+ try {
12
+ if (typeof lane !== 'object' || lane === null || lane.kind !== 'present')
13
+ return undefined;
14
+ const view = lane.view;
15
+ if (typeof view !== 'object' || view === null)
16
+ return undefined;
17
+ if (view.toolsOnThisHost !== false)
18
+ return undefined;
19
+ if (view.isolatedAbsent === 'no_hands' || view.provider === 'in-process')
20
+ return undefined;
21
+ if (typeof view.provider !== 'string' || view.provider === '')
22
+ return undefined;
23
+ return capForDisplay(view.provider, LANE_WORD_MAX);
24
+ }
25
+ catch {
26
+ return undefined;
27
+ }
28
+ }
29
+ export function injectionLaneNotice(lane, sources, lang) {
30
+ const word = remoteLaneWordOf(lane);
31
+ if (word === undefined)
32
+ return undefined;
33
+ let present;
34
+ try {
35
+ present = new Set(Array.isArray(sources) ? sources : []);
36
+ }
37
+ catch {
38
+ return undefined;
39
+ }
40
+ const items = INJECTION_SOURCES.filter((s) => present.has(s));
41
+ if (items.length === 0)
42
+ return undefined;
43
+ const separator = renderMessage(msg('notice.injectionLane.itemSeparator'), lang);
44
+ const list = items.map((s) => renderMessage(msg(ITEM_KEYS[s]), lang)).join(separator);
45
+ return renderMessage(msg('notice.injectionLane.sentence', { lane: word, items: list }), lang);
46
+ }
@@ -3,17 +3,28 @@ export const RUN_LEVEL_STOP_ERROR_CODES = Object.freeze([
3
3
  ]);
4
4
  const RUN_LEVEL_STOP_STATUS = 409;
5
5
  function enginePointsToRunLevelStop(outcome) {
6
- const o = outcome;
7
- return (o?.kind === 'refused' &&
8
- o.status === RUN_LEVEL_STOP_STATUS &&
9
- typeof o.errorCode === 'string' &&
10
- RUN_LEVEL_STOP_ERROR_CODES.includes(o.errorCode));
6
+ const code = ownDataSlot(outcome, 'errorCode');
7
+ return (ownDataSlot(outcome, 'kind') === 'refused' &&
8
+ ownDataSlot(outcome, 'status') === RUN_LEVEL_STOP_STATUS &&
9
+ typeof code === 'string' &&
10
+ RUN_LEVEL_STOP_ERROR_CODES.includes(code));
11
+ }
12
+ function ownDataSlot(o, key) {
13
+ try {
14
+ if (typeof o !== 'object' || o === null)
15
+ return undefined;
16
+ const d = Object.getOwnPropertyDescriptor(o, key);
17
+ return d !== undefined && Object.hasOwn(d, 'value') ? d.value : undefined;
18
+ }
19
+ catch {
20
+ return undefined;
21
+ }
11
22
  }
12
23
  export function planInteractiveHalt(input) {
13
24
  const outcome = input.interruptOutcome;
14
25
  if (outcome === undefined || outcome === null)
15
26
  return { action: 'interrupt', reason: 'first-shot' };
16
- const kind = outcome.kind;
27
+ const kind = ownDataSlot(outcome, 'kind');
17
28
  if (kind === 'halted')
18
29
  return { action: 'none', reason: 'halted' };
19
30
  if (kind === 'refused') {
@@ -1,4 +1,5 @@
1
1
  import type { AgentClient } from '@sema-agent/sdk';
2
+ import type { UiLanguage } from './env/uiLanguage.js';
2
3
  export interface LiveModelInfo {
3
4
  name: string;
4
5
  id?: string;
@@ -80,7 +81,7 @@ export type ModelCandidateRejectedReading = {
80
81
  readonly kind: 'unreadable';
81
82
  };
82
83
  export declare function modelCandidateRejectedOf(catalog?: LiveModelCatalog | null): ModelCandidateRejectedReading;
83
- export declare function modelCandidateRejectedContent(reading: ModelCandidateRejectedReading): string | undefined;
84
+ export declare function modelCandidateRejectedContent(reading: ModelCandidateRejectedReading, lang?: UiLanguage): string | undefined;
84
85
  export interface RoutePairingVerdict {
85
86
  verdict: 'ok' | 'broken' | 'unknown';
86
87
  posture?: string;
@@ -1,4 +1,5 @@
1
1
  import { frozenJsonCopyOf, liveDefaultModelCopy, liveModelRowCopy } from './model/liveCatalogShape.js';
2
+ import { msg, renderMessage } from './i18n/translate.js';
2
3
  let catalog = null;
3
4
  let refresher = null;
4
5
  export function setLiveModelCatalog(next) {
@@ -269,27 +270,32 @@ export function modelCandidateRejectedOf(catalog = getLiveModelCatalog()) {
269
270
  }
270
271
  }
271
272
  const CONFIG_DOMAIN_WORD = /^[a-z][a-z0-9_.-]{0,63}$/;
272
- export function modelCandidateRejectedContent(reading) {
273
+ export function modelCandidateRejectedContent(reading, lang) {
273
274
  try {
274
275
  if (reading === null || typeof reading !== 'object' || reading.kind !== 'rejected')
275
276
  return undefined;
276
277
  const named = reading.domains.filter((w) => CONFIG_DOMAIN_WORD.test(w));
277
278
  const which = named.length > 0 && named.length === reading.domains.length ? ` (${named.join(', ')})` : '';
278
- return `The deployment refused its most recent configuration change${which} and is still running on the configuration before it — models or settings added by that change are not in effect`;
279
+ return renderMessage(msg('model.catalog.candidateRejected', { which }), lang);
279
280
  }
280
281
  catch {
281
282
  return undefined;
282
283
  }
283
284
  }
284
- const ROUTE_PAIRING_OK = new Set(['ok:per-model', 'ok:paired', 'ok:keyless']);
285
- const ROUTE_PAIRING_BROKEN = new Set(['broken:credential_mismatch', 'broken:credential_missing']);
285
+ const ROUTE_PAIRING_VERDICTS = Object.freeze({
286
+ 'ok:per-model': 'ok',
287
+ 'ok:paired': 'ok',
288
+ 'ok:keyless': 'ok',
289
+ 'broken:credential_mismatch': 'broken',
290
+ 'broken:credential_missing': 'broken',
291
+ 'broken:credential_origin_mismatch': 'broken',
292
+ 'broken:credential_answer_conflict': 'broken',
293
+ });
286
294
  export function routePairingVerdict(v) {
287
295
  if (typeof v !== 'string' || v.length === 0)
288
296
  return { verdict: 'unknown' };
289
- if (ROUTE_PAIRING_OK.has(v))
290
- return { verdict: 'ok', posture: v };
291
- if (ROUTE_PAIRING_BROKEN.has(v))
292
- return { verdict: 'broken', posture: v };
297
+ if (Object.hasOwn(ROUTE_PAIRING_VERDICTS, v))
298
+ return { verdict: ROUTE_PAIRING_VERDICTS[v], posture: v };
293
299
  return { verdict: 'unknown', posture: v };
294
300
  }
295
301
  const unreadableCatalog = (why) => Object.freeze({ kind: 'unreadable', why });
@@ -1,6 +1,7 @@
1
1
  import type { AgentClient } from '@sema-agent/sdk';
2
2
  import { type WiringManifestMcpEntryView } from './adapter/downstream/eventToSdkMessage.js';
3
3
  import { type McpEngineLegHealth } from './mcpLiveness.js';
4
+ import { type ScenarioRefusalReading } from './scenarioRefusal.js';
4
5
  export interface McpPanelServerView {
5
6
  name: string;
6
7
  status: string;
@@ -16,14 +17,22 @@ export interface McpPanelLastLegView {
16
17
  at: string;
17
18
  mcp: WiringManifestMcpEntryView[];
18
19
  }
19
- export interface McpPanelView {
20
+ export interface McpPanelServersView {
20
21
  asOf: string;
22
+ lastLegMcp?: McpPanelLastLegView;
23
+ lastLegMcpUnreadable?: true;
21
24
  servers: McpPanelServerView[];
22
25
  degraded?: true;
26
+ }
27
+ export interface McpPanelRefusalView {
28
+ asOf: string;
23
29
  lastLegMcp?: McpPanelLastLegView;
24
30
  lastLegMcpUnreadable?: true;
31
+ scenarioRefusal: ScenarioRefusalReading;
25
32
  }
33
+ export type McpPanelView = McpPanelServersView | McpPanelRefusalView;
26
34
  export declare function projectMcpPanel(body: unknown): McpPanelView | undefined;
35
+ export declare function mcpPanelRefusalOf(view: McpPanelView | undefined): ScenarioRefusalReading | undefined;
27
36
  export declare function fetchMcpPanel(client: Pick<AgentClient, 'sessions'>, sessionId: string, opts?: {
28
37
  signal?: AbortSignal;
29
38
  }): Promise<McpPanelView | undefined>;