@sema-agent/client-core 0.100.0 → 0.101.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 (335) hide show
  1. package/CHANGELOG.md +395 -0
  2. package/README.md +164 -117
  3. package/dist/adapt/arms.js +51 -16
  4. package/dist/adapt/textStream.js +7 -4
  5. package/dist/adapt/toolCards.js +9 -8
  6. package/dist/adapt.js +7 -1
  7. package/dist/adapter/activeRunSelfHeal.d.ts +24 -2
  8. package/dist/adapter/activeRunSelfHeal.js +108 -6
  9. package/dist/adapter/downstream/eventToSdkMessage.js +33 -12
  10. package/dist/adapter/downstream/terminalToSdkResult.d.ts +60 -1
  11. package/dist/adapter/downstream/terminalToSdkResult.js +209 -39
  12. package/dist/adapter/runStream.d.ts +4 -4
  13. package/dist/adapter/runStream.js +158 -43
  14. package/dist/agentsWireCaps.d.ts +2 -7
  15. package/dist/agentsWireCaps.js +1 -2
  16. package/dist/approvalDecidedByCapability.js +2 -2
  17. package/dist/approvalFrameFamilies.d.ts +33 -0
  18. package/dist/approvalFrameFamilies.js +120 -0
  19. package/dist/approvalsStreamLiveCapability.js +2 -2
  20. package/dist/attachmentsWireCaps.js +41 -13
  21. package/dist/callerCwdCapability.js +2 -2
  22. package/dist/centerWiringCapability.js +2 -2
  23. package/dist/clockReading.d.ts +2 -0
  24. package/dist/clockReading.js +4 -0
  25. package/dist/cloudConfigWireCaps.d.ts +19 -5
  26. package/dist/cloudConfigWireCaps.js +193 -56
  27. package/dist/coreValuePorts.d.ts +12 -2
  28. package/dist/coreValuePorts.js +9 -0
  29. package/dist/decideFailureNote.js +5 -3
  30. package/dist/decideReceipt.js +2 -2
  31. package/dist/deviceExecutorManagementCapability.js +2 -2
  32. package/dist/deviceFlowPolling.js +1 -1
  33. package/dist/disableSkillsWire.d.ts +1 -1
  34. package/dist/disableSkillsWire.js +4 -3
  35. package/dist/displayUntrusted.d.ts +1 -0
  36. package/dist/displayUntrusted.js +65 -8
  37. package/dist/engineCapReader.js +1 -1
  38. package/dist/engineConfigDrift.js +1 -1
  39. package/dist/engineErrorCodes.d.ts +14 -5
  40. package/dist/engineErrorCodes.js +27 -6
  41. package/dist/engineGenerationConvergence.d.ts +39 -0
  42. package/dist/engineGenerationConvergence.js +95 -0
  43. package/dist/engineGenerationPort.d.ts +61 -0
  44. package/dist/engineGenerationPort.js +144 -0
  45. package/dist/engineHealthFacts.d.ts +23 -0
  46. package/dist/engineHealthFacts.js +92 -0
  47. package/dist/engineIdentity.d.ts +4 -0
  48. package/dist/engineIdentity.js +11 -0
  49. package/dist/engineNoticeCodes.d.ts +2 -5
  50. package/dist/engineRowRef.js +3 -0
  51. package/dist/engineSessionMessages.js +2 -2
  52. package/dist/engineToolDirectory.js +2 -2
  53. package/dist/engineWireFor.d.ts +99 -0
  54. package/dist/engineWireFor.js +248 -6
  55. package/dist/engineWireTarget.d.ts +1 -0
  56. package/dist/engineWireTarget.js +8 -0
  57. package/dist/env/uiLanguage.js +1 -1
  58. package/dist/errorSupplementRoles.d.ts +3 -0
  59. package/dist/errorSupplementRoles.js +37 -0
  60. package/dist/executionLaneCapability.js +2 -2
  61. package/dist/fileHistoryCaptureCapability.js +3 -3
  62. package/dist/finalVerifyWire.d.ts +6 -3
  63. package/dist/finalVerifyWire.js +6 -23
  64. package/dist/flagInput.d.ts +4 -0
  65. package/dist/flagInput.js +24 -0
  66. package/dist/fleet/fleetLedger.js +5 -2
  67. package/dist/fleet/fleetProjection.d.ts +1 -0
  68. package/dist/fleet/fleetProjection.js +15 -2
  69. package/dist/gateVocabulary.js +3 -0
  70. package/dist/generated/engineFactTables.d.ts +7 -3
  71. package/dist/generated/engineFactTables.js +52 -0
  72. package/dist/generated/engineNoticeTables.js +12 -0
  73. package/dist/generated/settingsSchemaActiveTiers.d.ts +1 -0
  74. package/dist/generated/settingsSchemaActiveTiers.js +14 -0
  75. package/dist/generated/settingsSchemaCallerTextEcho.d.ts +1 -0
  76. package/dist/generated/settingsSchemaCallerTextEcho.js +8 -0
  77. package/dist/generated/settingsSchemaControlAndBidi.d.ts +1 -0
  78. package/dist/generated/settingsSchemaControlAndBidi.js +8 -0
  79. package/dist/generated/settingsSchemaDefaultModel.d.ts +11 -0
  80. package/dist/generated/settingsSchemaDefaultModel.js +25 -0
  81. package/dist/generated/settingsSchemaFns.d.ts +54 -0
  82. package/dist/generated/settingsSchemaFns.js +26 -1
  83. package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
  84. package/dist/generated/settingsSchemaMcpRequestEntry.js +1 -7
  85. package/dist/generated/settingsSchemaSafetyMergeSpec.d.ts +1 -0
  86. package/dist/generated/settingsSchemaSafetyMergeSpec.js +95 -0
  87. package/dist/generated/settingsSchemaSettingsSources.d.ts +1 -0
  88. package/dist/generated/settingsSchemaSettingsSources.js +58 -0
  89. package/dist/generated/settingsSchemaTables.d.ts +2 -0
  90. package/dist/generated/settingsSchemaTables.js +13 -0
  91. package/dist/generated/settingsSchemaUrlPattern.d.ts +1 -0
  92. package/dist/generated/settingsSchemaUrlPattern.js +183 -0
  93. package/dist/headlessPermissionModeWire.d.ts +18 -2
  94. package/dist/headlessPermissionModeWire.js +30 -19
  95. package/dist/hitl/allowRuleShadow.js +7 -5
  96. package/dist/hitl/approvalCardReading.d.ts +3 -0
  97. package/dist/hitl/approvalCardReading.js +17 -0
  98. package/dist/hitl/approvalCompleteParked.js +1 -1
  99. package/dist/hitl/approvalDelivery.d.ts +87 -0
  100. package/dist/hitl/approvalDelivery.js +193 -0
  101. package/dist/hitl/approvalResolution.d.ts +11 -0
  102. package/dist/hitl/approvalResolution.js +50 -11
  103. package/dist/hitl/askClassPair.d.ts +6 -0
  104. package/dist/hitl/askClassPair.js +30 -3
  105. package/dist/hitl/askParkAutoReopenBlock.d.ts +30 -0
  106. package/dist/hitl/askParkAutoReopenBlock.js +117 -0
  107. package/dist/hitl/askParkRowRouting.js +4 -1
  108. package/dist/hitl/attributionLadder.d.ts +42 -3
  109. package/dist/hitl/attributionLadder.js +79 -8
  110. package/dist/hitl/automaticAnswerVerdict.d.ts +6 -1
  111. package/dist/hitl/automaticAnswerVerdict.js +46 -11
  112. package/dist/hitl/crashConverged.js +2 -2
  113. package/dist/hitl/decisionConflict.d.ts +6 -2
  114. package/dist/hitl/decisionConflict.js +24 -9
  115. package/dist/hitl/decisionRefusal.d.ts +20 -10
  116. package/dist/hitl/decisionRefusal.js +99 -54
  117. package/dist/hitl/decisionSend.d.ts +3 -0
  118. package/dist/hitl/decisionSend.js +87 -103
  119. package/dist/hitl/frameRouter.d.ts +1 -0
  120. package/dist/hitl/frameRouter.js +9 -2
  121. package/dist/hitl/hitlBridge.d.ts +18 -6
  122. package/dist/hitl/hitlBridge.js +41 -37
  123. package/dist/hitl/livePendingAsk.js +4 -3
  124. package/dist/hitl/noAllowCause.js +1 -1
  125. package/dist/hitl/parkResolver.js +3 -2
  126. package/dist/hitl/persistedRulesWire.js +1 -0
  127. package/dist/hitl/planReviewWire.d.ts +4 -0
  128. package/dist/hitl/planReviewWire.js +59 -30
  129. package/dist/hitl/resumeRunningCard.d.ts +3 -2
  130. package/dist/hitl/resumeRunningCard.js +17 -11
  131. package/dist/hitl/sessionPolicyDeliverable.d.ts +5 -2
  132. package/dist/hitl/sessionPolicyDeliverable.js +62 -29
  133. package/dist/hitl/sessionPolicyWire.d.ts +13 -3
  134. package/dist/hitl/sessionPolicyWire.js +81 -16
  135. package/dist/hitl/standingRows.js +1 -1
  136. package/dist/hitl/toolApprovalWire.d.ts +9 -10
  137. package/dist/hitl/toolApprovalWire.js +72 -54
  138. package/dist/hookMatcherVerdict.d.ts +2 -0
  139. package/dist/hookMatcherVerdict.js +12 -0
  140. package/dist/hooksCompactTransition.d.ts +19 -0
  141. package/dist/hooksCompactTransition.js +41 -0
  142. package/dist/hooksWireCaps.d.ts +1 -1
  143. package/dist/hooksWireCaps.js +202 -203
  144. package/dist/host.d.ts +1 -14
  145. package/dist/host.js +0 -8
  146. package/dist/hostCallbackGuard.d.ts +1 -0
  147. package/dist/hostCallbackGuard.js +1 -1
  148. package/dist/hostSettingsSource.d.ts +172 -0
  149. package/dist/hostSettingsSource.js +675 -0
  150. package/dist/hostTurnSettings.d.ts +73 -17
  151. package/dist/hostTurnSettings.js +594 -97
  152. package/dist/httpHookPolicy.d.ts +37 -0
  153. package/dist/httpHookPolicy.js +176 -0
  154. package/dist/humanTurn.d.ts +2 -1
  155. package/dist/humanTurn.js +37 -7
  156. package/dist/humanTurnRead.js +4 -3
  157. package/dist/humanTurnSentences.d.ts +10 -0
  158. package/dist/humanTurnSentences.js +74 -0
  159. package/dist/i18n/messages.en.d.ts +184 -2
  160. package/dist/i18n/messages.en.js +187 -5
  161. package/dist/i18n/messages.zh.js +197 -5
  162. package/dist/i18n/translate.js +3 -3
  163. package/dist/index.d.ts +69 -15
  164. package/dist/index.js +45 -13
  165. package/dist/inheritEnvCapability.d.ts +3 -1
  166. package/dist/inheritEnvCapability.js +31 -17
  167. package/dist/inheritEnvWire.d.ts +2 -1
  168. package/dist/inheritEnvWire.js +11 -5
  169. package/dist/interactiveToolsWire.d.ts +4 -2
  170. package/dist/interactiveToolsWire.js +5 -5
  171. package/dist/jsonFaithful.d.ts +20 -0
  172. package/dist/jsonFaithful.js +152 -0
  173. package/dist/limitsWire.d.ts +7 -2
  174. package/dist/limitsWire.js +19 -13
  175. package/dist/liveInitToolFace.d.ts +6 -1
  176. package/dist/liveInitToolFace.js +5 -3
  177. package/dist/liveModelCatalog.d.ts +22 -0
  178. package/dist/liveModelCatalog.js +132 -18
  179. package/dist/mcpPanel.js +1 -1
  180. package/dist/mcpProbeCapability.js +2 -2
  181. package/dist/mcpStatusSupersetKeys.d.ts +24 -0
  182. package/dist/mcpStatusSupersetKeys.js +45 -0
  183. package/dist/mcpToolToggles.js +2 -1
  184. package/dist/mcpWireCaps.d.ts +39 -1
  185. package/dist/mcpWireCaps.js +254 -50
  186. package/dist/memoryComplianceCapability.js +2 -2
  187. package/dist/memoryOriginCapability.js +2 -2
  188. package/dist/model/catalogDefault.d.ts +24 -0
  189. package/dist/model/catalogDefault.js +4 -0
  190. package/dist/model/liveCatalogShape.js +5 -4
  191. package/dist/model/modelsPolicy.js +4 -3
  192. package/dist/model/onboardJudgement.d.ts +1 -0
  193. package/dist/model/onboardJudgement.js +1 -1
  194. package/dist/model/subagentModelWord.js +2 -2
  195. package/dist/modelCapabilityProbe.js +6 -6
  196. package/dist/modelIdentityResolvability.d.ts +10 -1
  197. package/dist/modelIdentityResolvability.js +62 -39
  198. package/dist/modsKernelIdentity.d.ts +10 -0
  199. package/dist/modsKernelIdentity.js +103 -0
  200. package/dist/modsKernelTransit.d.ts +8 -0
  201. package/dist/modsKernelTransit.js +6 -0
  202. package/dist/notifications.d.ts +30 -12
  203. package/dist/notifications.js +241 -53
  204. package/dist/outputStyleSeatCapability.js +2 -2
  205. package/dist/ownKey.d.ts +11 -0
  206. package/dist/ownKey.js +164 -3
  207. package/dist/panelReduce.js +1 -1
  208. package/dist/peerFrames.d.ts +1 -1
  209. package/dist/peerFrames.js +6 -2
  210. package/dist/peerLaneCapability.js +2 -2
  211. package/dist/permissionModesCapability.js +4 -4
  212. package/dist/permissionRuleIssue.js +2 -0
  213. package/dist/permissionRulesWriteCapability.js +2 -2
  214. package/dist/permissionsAllowGrantCapability.js +2 -2
  215. package/dist/permissionsDeclaration.d.ts +43 -4
  216. package/dist/permissionsDeclaration.js +102 -35
  217. package/dist/pluginHooksWire.d.ts +20 -4
  218. package/dist/pluginHooksWire.js +92 -53
  219. package/dist/prepareRefusal.d.ts +3 -2
  220. package/dist/prepareRefusal.js +27 -9
  221. package/dist/printInitToolFace.js +2 -2
  222. package/dist/printModelStatus.js +1 -1
  223. package/dist/projectMemory.d.ts +32 -0
  224. package/dist/projectMemory.js +70 -0
  225. package/dist/promptBlockedCopy.d.ts +2 -1
  226. package/dist/promptBlockedCopy.js +2 -1
  227. package/dist/promptDelivery.d.ts +23 -3
  228. package/dist/promptDelivery.js +169 -30
  229. package/dist/providerRejection.d.ts +19 -1
  230. package/dist/providerRejection.js +75 -4
  231. package/dist/queuedDelivery.d.ts +48 -0
  232. package/dist/queuedDelivery.js +233 -0
  233. package/dist/reattachWindow.d.ts +94 -0
  234. package/dist/reattachWindow.js +127 -0
  235. package/dist/request/printNotification.d.ts +1 -1
  236. package/dist/request/printNotification.js +5 -1
  237. package/dist/request/submissionIdentity.d.ts +37 -0
  238. package/dist/request/submissionIdentity.js +65 -0
  239. package/dist/request/taskRequest.d.ts +12 -4
  240. package/dist/request/taskRequest.js +221 -152
  241. package/dist/resultFrameKeys.d.ts +1 -0
  242. package/dist/resultFrameKeys.js +4 -1
  243. package/dist/retryStatus.d.ts +8 -0
  244. package/dist/retryStatus.js +57 -9
  245. package/dist/rewindArchiveCapability.js +2 -2
  246. package/dist/rewindEngineAction.d.ts +2 -0
  247. package/dist/rewindEngineAction.js +23 -1
  248. package/dist/rowKind.d.ts +36 -0
  249. package/dist/rowKind.js +97 -0
  250. package/dist/ruleCompileVerdict.d.ts +18 -0
  251. package/dist/ruleCompileVerdict.js +67 -2
  252. package/dist/ruleReadings.d.ts +58 -0
  253. package/dist/ruleReadings.js +132 -0
  254. package/dist/ruleRefusalSentence.d.ts +4 -0
  255. package/dist/ruleRefusalSentence.js +9 -3
  256. package/dist/runCancelContext.d.ts +0 -1
  257. package/dist/runCancelContext.js +1 -2
  258. package/dist/runTerminal.d.ts +5 -0
  259. package/dist/runTerminal.js +52 -17
  260. package/dist/sandboxWire.d.ts +1 -1
  261. package/dist/sandboxWire.js +4 -6
  262. package/dist/scenarioRefusal.js +1 -1
  263. package/dist/scenarioSkills.d.ts +20 -0
  264. package/dist/scenarioSkills.js +72 -0
  265. package/dist/scenarioWire.d.ts +5 -2
  266. package/dist/scenarioWire.js +9 -9
  267. package/dist/sealedKeyCapability.js +2 -2
  268. package/dist/seam.d.ts +2 -0
  269. package/dist/seam.js +2 -2
  270. package/dist/seatContract.d.ts +46 -1
  271. package/dist/seatContract.js +49 -19
  272. package/dist/selfOrchestrationDenial.js +1 -1
  273. package/dist/sessionPolicyCapability.js +2 -2
  274. package/dist/sessionRulesChildrenReadLive.d.ts +6 -0
  275. package/dist/sessionRulesChildrenReadLive.js +5 -0
  276. package/dist/sessionRulesNamespaceFormsCapability.d.ts +12 -0
  277. package/dist/sessionRulesNamespaceFormsCapability.js +29 -0
  278. package/dist/sessionSyncFileHistoryCapability.js +2 -2
  279. package/dist/settingsCredentialKeyPaths.js +60 -5
  280. package/dist/settingsHooksSalvage.d.ts +1 -0
  281. package/dist/settingsHooksSalvage.js +7 -1
  282. package/dist/settingsLayerAdmission.d.ts +4 -0
  283. package/dist/settingsLayerAdmission.js +16 -0
  284. package/dist/skillToolListsCapability.js +6 -5
  285. package/dist/skillsWireCaps.d.ts +14 -0
  286. package/dist/skillsWireCaps.js +47 -16
  287. package/dist/slashCommandGate.d.ts +24 -0
  288. package/dist/slashCommandGate.js +74 -0
  289. package/dist/slashCommandTable.d.ts +14 -0
  290. package/dist/slashCommandTable.js +99 -0
  291. package/dist/sqlEngineCapability.js +2 -2
  292. package/dist/steerPriorityCapability.js +2 -2
  293. package/dist/storePostureCapability.js +2 -2
  294. package/dist/subagent/agentStateDetail.js +1 -1
  295. package/dist/subagent/engineDelegatedPrompt.d.ts +9 -0
  296. package/dist/subagent/engineDelegatedPrompt.js +38 -7
  297. package/dist/subagent/engineRowStopGate.js +2 -2
  298. package/dist/subagent/engineSubagentResume.js +3 -3
  299. package/dist/subagent/engineTaskHandleWire.d.ts +1 -0
  300. package/dist/subagent/engineTaskHandleWire.js +10 -0
  301. package/dist/submitFailure.d.ts +8 -0
  302. package/dist/submitFailure.js +17 -0
  303. package/dist/supportFloor.d.ts +1 -0
  304. package/dist/supportFloor.js +7 -0
  305. package/dist/terminationIntent.d.ts +55 -0
  306. package/dist/terminationIntent.js +352 -0
  307. package/dist/toolHistoryMismatch.d.ts +8 -0
  308. package/dist/toolHistoryMismatch.js +37 -6
  309. package/dist/toolResult.d.ts +13 -3
  310. package/dist/toolResult.js +158 -9
  311. package/dist/toolResultContent.d.ts +13 -0
  312. package/dist/toolResultContent.js +82 -7
  313. package/dist/toolRoster.d.ts +18 -0
  314. package/dist/toolRoster.js +64 -0
  315. package/dist/turnFailurePresentation.js +27 -90
  316. package/dist/usageLimitAutoResume.d.ts +74 -0
  317. package/dist/usageLimitAutoResume.js +227 -0
  318. package/dist/userAttachmentEnvelope.js +1 -1
  319. package/dist/userAttachmentSeat.js +5 -5
  320. package/dist/userInvokedSkillsCapability.js +2 -2
  321. package/dist/webSearchBackendCapability.js +2 -2
  322. package/dist/wireErrorTriage.js +99 -50
  323. package/dist/wireFailureShape.d.ts +25 -1
  324. package/dist/wireFailureShape.js +92 -5
  325. package/dist/wireRefusalCopy.d.ts +24 -1
  326. package/dist/wireRefusalCopy.js +253 -32
  327. package/dist/wiringFleetDoctor.d.ts +3 -0
  328. package/dist/wiringFleetDoctor.js +21 -0
  329. package/dist/workflow.d.ts +2 -1
  330. package/dist/workflow.js +38 -1
  331. package/dist/workflowClient.d.ts +2 -7
  332. package/dist/workflowsJournalCapability.js +2 -2
  333. package/dist/writeProtectionCapability.js +2 -2
  334. package/docs/INTEGRATION-CLIENTS.md +607 -181
  335. package/package.json +14 -3
@@ -1,17 +1,18 @@
1
- import { PROTOCOL_ERROR_NAME, protocolErrorNameOf, readBlockedBy, readErrorNumber, readErrorString, readErrorStringList, readThrownSlot, readThrownStatusSlot, thrownIsInstanceOf, THROWN_SLOT_UNREADABLE, WIRE_FAILURE_UNRENDERABLE_TEXT, } from './wireFailureShape.js';
1
+ import { PROTOCOL_ERROR_NAME, effectiveWireCodeReading, isSlotCarrier, protocolErrorNameOf, readErrorNumber, readErrorString, readErrorStringList, readThrownSlot, readThrownStatusSlot, thrownIsInstanceOf, THROWN_SLOT_UNREADABLE, WIRE_FAILURE_UNRENDERABLE_TEXT, } from './wireFailureShape.js';
2
2
  import { capForDisplay, escapeDisplayControlChars } from './fleetTaskDesc.js';
3
3
  import { readOwnDataValue } from './ownKey.js';
4
4
  import { fleetLeaseUnavailableFromError } from './wireRefusalCopy.js';
5
- import { CORRUPT_ROW_ERROR_CODE, DRAINING_ERROR_CODE, FLEET_LEASE_UNAVAILABLE, isCorruptSessionCode, RESUME_AT_ERROR_CODE_PREFIX, RESUME_POLICY_FOLD_CODE, RESUME_RETRY_LATER_CODES, RESUME_USAGE_WINDOW_EXHAUSTED, SCENARIO_NOT_ALLOWED_ERROR_CODE, } from './engineErrorCodes.js';
5
+ import { answerReadingOf, captureAnswer, captureUnanswered, causeSlotReadOf, effectiveCodeOf, noteTriageReading, ownReadingSlot } from './engineWireFor.js';
6
+ import { CORRUPT_ROW_ERROR_CODE, DRAINING_ERROR_CODE, FLEET_LEASE_UNAVAILABLE, isCorruptSessionCode, RESUME_AT_ERROR_CODE_PREFIX, RESUME_RETRY_LATER_CODES, RESUME_USAGE_WINDOW_EXHAUSTED, SCENARIO_NOT_ALLOWED_ERROR_CODE, } from './engineErrorCodes.js';
6
7
  export const WIRE_NETWORK_ERROR_PATTERN = /fetch failed|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EAI_AGAIN|ENOTFOUND|EHOSTUNREACH|ENETUNREACH|EPIPE|socket hang up|UND_ERR|\bterminated\b|\bother side closed\b/i;
7
- function readTurnErrorSlots(err) {
8
+ function readTurnErrorSlots(err, status, topCause) {
8
9
  if (err === null || err === undefined)
9
10
  return { status: undefined, errorCode: undefined, message: undefined, cause: undefined, name: undefined };
10
11
  return {
11
- status: readThrownSlot(err, 'status', 'data'),
12
+ status,
12
13
  errorCode: readThrownSlot(err, 'errorCode', 'data'),
13
14
  message: readThrownSlot(err, 'message'),
14
- cause: readThrownSlot(err, 'cause'),
15
+ cause: topCause !== undefined ? topCause.value : undefined,
15
16
  name: typeof err === 'object' ? readThrownSlot(err, 'name') : undefined,
16
17
  };
17
18
  }
@@ -29,52 +30,108 @@ function wireErrorDetailOf(slots, err) {
29
30
  (typeof slots.message === 'string' && slots.message.length > 0 && slots.message) ||
30
31
  renderedText(err));
31
32
  }
32
- function isTransportShape(slots, detail) {
33
+ function isTransportShape(slots, detail, chain) {
33
34
  if (typeof slots.status === 'number' || slots.status === THROWN_SLOT_UNREADABLE)
34
35
  return false;
35
- return (slots.cause !== undefined && slots.cause !== THROWN_SLOT_UNREADABLE) || WIRE_NETWORK_ERROR_PATTERN.test(detail());
36
+ if (chain.reading === 'answered')
37
+ return false;
38
+ if (chain.reading === 'transient')
39
+ return true;
40
+ if (slots.cause !== undefined && slots.cause !== THROWN_SLOT_UNREADABLE && ownReadingSlot(chain, 'chainEnd') !== 'unreadable')
41
+ return true;
42
+ return WIRE_NETWORK_ERROR_PATTERN.test(detail()) || (typeof slots.message === 'string' && WIRE_NETWORK_ERROR_PATTERN.test(slots.message));
43
+ }
44
+ function topStatusOf(err, ans) {
45
+ if (ans.answer === THROWN_SLOT_UNREADABLE)
46
+ return ans.chain.reading === 'answered' ? undefined : THROWN_SLOT_UNREADABLE;
47
+ return ans.answer !== undefined && ans.answer.layer === err ? ans.answer.status : undefined;
48
+ }
49
+ function httpVerdictOf(captured, fallbackMessage, topLocal, topCause) {
50
+ const source = captured.layer;
51
+ const errorCode = captured.code.state === 'read' ? captured.code.wire : undefined;
52
+ const rawMessage = readThrownSlot(source, 'message');
53
+ const message = typeof rawMessage === 'string' && rawMessage.length > 0 ? rawMessage : fallbackMessage();
54
+ const effectiveCode = effectiveCodeOf(captured.code);
55
+ const storedRowWhere = isSlotCarrier(source) ? storedRowWhereOf(source, effectiveCode) : undefined;
56
+ const sessionUnreadable = isCorruptSessionCode(effectiveCode);
57
+ const leaseUnavailable = errorCode === FLEET_LEASE_UNAVAILABLE && fleetLeaseUnavailableFromError(source) !== null;
58
+ const verdict = {
59
+ kind: 'http',
60
+ status: captured.status,
61
+ ...(errorCode !== undefined ? { errorCode } : {}),
62
+ message,
63
+ ...(storedRowWhere !== undefined ? { storedRowWhere } : {}),
64
+ ...(sessionUnreadable ? { sessionUnreadable: true } : {}),
65
+ ...(leaseUnavailable ? { leaseUnavailable: true } : {}),
66
+ };
67
+ noteTriageReading(verdict, { answer: captured, ...(topLocal !== undefined ? { topLocalCode: topLocal } : {}), ...(topCause !== undefined ? { topCause } : {}), transport: false });
68
+ return verdict;
69
+ }
70
+ function noted(verdict, ans, captured, transport, err, topCode, topCauseRead) {
71
+ const a = ans.answer;
72
+ const topLocalCode = ownReadingSlot(ans, 'topLocalCode');
73
+ const unanswered = a === undefined && isSlotCarrier(err) ? { unanswered: captureUnanswered(err, topCode, topLocalCode, ownReadingSlot(ans, 'topStatusSlot')) } : {};
74
+ const topLocal = topLocalOf(err, a, topLocalCode);
75
+ const topCause = topCauseRecordOf(err, topCauseRead);
76
+ noteTriageReading(verdict, {
77
+ answer: a === THROWN_SLOT_UNREADABLE ? a : captured,
78
+ ...unanswered,
79
+ ...(topLocal !== undefined ? { topLocalCode: topLocal } : {}),
80
+ ...(topCause !== undefined ? { topCause } : {}),
81
+ transport,
82
+ ...(ownReadingSlot(ans.chain, 'chainEnd') === 'unreadable' ? { chainEnd: 'unreadable' } : {}),
83
+ });
84
+ return verdict;
85
+ }
86
+ function topCauseReadFor(err, ans) {
87
+ const walked = ownReadingSlot(ans, 'topCause');
88
+ if (walked !== undefined)
89
+ return walked;
90
+ return isSlotCarrier(err) ? causeSlotReadOf(err) : undefined;
91
+ }
92
+ function topCauseRecordOf(err, read) {
93
+ return read !== undefined && isSlotCarrier(err) ? Object.freeze({ layer: err, read }) : undefined;
94
+ }
95
+ function topLocalOf(err, a, topLocalCode) {
96
+ if (topLocalCode === undefined || a === undefined || (a !== THROWN_SLOT_UNREADABLE && a.layer === err) || !isSlotCarrier(err))
97
+ return undefined;
98
+ return Object.freeze({ layer: err, localCode: topLocalCode.value });
36
99
  }
37
100
  export function classifyTurnWireError(err) {
38
- const slots = readTurnErrorSlots(err);
39
- if (typeof slots.status === 'number') {
40
- const errorCode = typeof slots.errorCode === 'string' && slots.errorCode.length > 0 ? slots.errorCode : undefined;
41
- const message = typeof slots.message === 'string' && slots.message.length > 0 ? slots.message : renderedText(err);
42
- const effectiveCode = typeof err === 'object' && err !== null ? foldedWireErrorCode(err, errorCode) : undefined;
43
- const storedRowWhere = typeof err === 'object' && err !== null ? storedRowWhereOf(err, effectiveCode) : undefined;
44
- const sessionUnreadable = isCorruptSessionCode(effectiveCode);
45
- const leaseUnavailable = slots.errorCode === FLEET_LEASE_UNAVAILABLE && fleetLeaseUnavailableFromError(err) !== null;
46
- return {
47
- kind: 'http',
48
- status: slots.status,
49
- ...(errorCode !== undefined ? { errorCode } : {}),
50
- message,
51
- ...(storedRowWhere !== undefined ? { storedRowWhere } : {}),
52
- ...(sessionUnreadable ? { sessionUnreadable: true } : {}),
53
- ...(leaseUnavailable ? { leaseUnavailable: true } : {}),
54
- };
55
- }
101
+ const ans = answerReadingOf(err);
102
+ const a = ans.answer;
103
+ const captured = a !== undefined && a !== THROWN_SLOT_UNREADABLE ? captureAnswer(a, readThrownSlot(a.layer, 'errorCode', 'data')) : undefined;
104
+ const topCauseRead = topCauseReadFor(err, ans);
105
+ if (captured !== undefined && captured.layer === err)
106
+ return httpVerdictOf(captured, () => renderedText(err), undefined, topCauseRecordOf(err, topCauseRead));
107
+ const slots = readTurnErrorSlots(err, topStatusOf(err, ans), topCauseRead);
56
108
  if (slots.status !== THROWN_SLOT_UNREADABLE && slots.name === 'StreamEndedWithoutTerminalError') {
57
- return { kind: 'stream-ended-without-terminal' };
109
+ return noted({ kind: 'stream-ended-without-terminal' }, ans, captured, transportShapeOf(slots, err, ans), err, slots.errorCode, topCauseRead);
110
+ }
111
+ if (captured !== undefined) {
112
+ const top = slots.message;
113
+ return httpVerdictOf(captured, () => (typeof top === 'string' && top.length > 0 ? top : renderedText(err)), topLocalOf(err, captured, ownReadingSlot(ans, 'topLocalCode')), topCauseRecordOf(err, topCauseRead));
58
114
  }
59
115
  const detail = wireErrorDetailOf(slots, err);
60
- if (isTransportShape(slots, () => detail))
61
- return { kind: 'transport', detail };
116
+ if (ans.answer === undefined && isTransportShape(slots, () => detail, ans.chain))
117
+ return noted({ kind: 'transport', detail }, ans, undefined, true, err, slots.errorCode, topCauseRead);
62
118
  const name = thrownIsInstanceOf(err, Error) && slots.name !== THROWN_SLOT_UNREADABLE ? slots.name : typeof err;
63
- return { kind: 'internal', name, detail };
119
+ return noted({ kind: 'internal', name, detail }, ans, undefined, false, err, slots.errorCode, topCauseRead);
120
+ }
121
+ function transportShapeOf(slots, err, ans) {
122
+ return ans.answer === undefined && isTransportShape(slots, () => wireErrorDetailOf(slots, err), ans.chain);
64
123
  }
65
124
  export function isWireTransportError(err) {
66
- const slots = readTurnErrorSlots(err);
67
- return isTransportShape(slots, () => wireErrorDetailOf(slots, err));
125
+ const ans = answerReadingOf(err);
126
+ return transportShapeOf(readTurnErrorSlots(err, topStatusOf(err, ans), topCauseReadFor(err, ans)), err, ans);
68
127
  }
69
128
  export function isPreStreamDrainingReject(err) {
70
129
  return readThrownSlot(err, 'status', 'data') === 503 && readThrownSlot(err, 'errorCode', 'data') === DRAINING_ERROR_CODE;
71
130
  }
72
131
  export function effectiveWireErrorCode(err) {
73
- if (typeof err !== 'object' || err === null)
132
+ if (!isSlotCarrier(err))
74
133
  return undefined;
75
- const outerRaw = readThrownSlot(err, 'errorCode', 'data');
76
- const outer = typeof outerRaw === 'string' && outerRaw.length > 0 ? outerRaw : undefined;
77
- return foldedWireErrorCode(err, outer);
134
+ return effectiveWireCodeReading(err).code;
78
135
  }
79
136
  export function isNotFoundFailure(e) {
80
137
  try {
@@ -98,15 +155,9 @@ export function isNotFoundFailure(e) {
98
155
  }
99
156
  }
100
157
  const NOT_FOUND_CODE_PREFIX = 'not_found.';
101
- function foldedWireErrorCode(err, outer) {
102
- if (outer !== RESUME_POLICY_FOLD_CODE)
103
- return outer;
104
- const inner = readBlockedBy(err);
105
- return inner.kind === 'named' ? inner.code : outer;
106
- }
107
158
  export function corruptStoredRowWhere(err) {
108
159
  const code = effectiveWireErrorCode(err);
109
- return typeof err === 'object' && err !== null ? storedRowWhereOf(err, code) : undefined;
160
+ return isSlotCarrier(err) ? storedRowWhereOf(err, code) : undefined;
110
161
  }
111
162
  function storedRowWhereOf(err, effectiveCode) {
112
163
  if (effectiveCode !== CORRUPT_ROW_ERROR_CODE)
@@ -164,17 +215,15 @@ export function streamDrainingDecision(frame, attempt, opts) {
164
215
  return { reconnectAfterMs: drainingRetryDelayMs(null, attempt, opts?.ladder !== undefined ? { ladder: opts.ladder } : undefined) };
165
216
  }
166
217
  export function scenarioDenyFromError(err) {
167
- if (typeof err !== 'object' || err === null)
218
+ if (!isSlotCarrier(err))
168
219
  return null;
169
220
  const status = readThrownSlot(err, 'status', 'data');
170
221
  if (status !== 400 && status !== 409)
171
222
  return null;
172
- if (status === 409) {
173
- const outer = readThrownSlot(err, 'errorCode', 'data');
174
- if (outer !== RESUME_POLICY_FOLD_CODE)
175
- return null;
176
- }
177
- if (effectiveWireErrorCode(err) !== SCENARIO_NOT_ALLOWED_ERROR_CODE)
223
+ const coded = effectiveWireCodeReading(err);
224
+ if (status === 409 && !coded.folded)
225
+ return null;
226
+ if (coded.code !== SCENARIO_NOT_ALLOWED_ERROR_CODE)
178
227
  return null;
179
228
  const allowlist = (readErrorStringList(err, 'allowlist') ?? []).filter((x) => x.length > 0);
180
229
  return { allowlist };
@@ -209,7 +258,7 @@ export function scenarioNotAllowedContent(detail, requestedScenario, surface) {
209
258
  return parts.join(' · ');
210
259
  }
211
260
  export function resumeRetryLaterFromError(err) {
212
- if (typeof err !== 'object' || err === null)
261
+ if (!isSlotCarrier(err))
213
262
  return null;
214
263
  const code = readThrownSlot(err, 'errorCode', 'data');
215
264
  if (typeof code !== 'string' || !RESUME_RETRY_LATER_CODES.includes(code))
@@ -11,6 +11,7 @@ interface WireFailureShape {
11
11
  message: string;
12
12
  }
13
13
  export declare const THROWN_SLOT_UNREADABLE: unique symbol;
14
+ export declare function isSlotCarrier(x: {} | null | undefined): x is object;
14
15
  export declare function readThrownSlot(o: unknown, key: string, own?: boolean | 'data'): unknown;
15
16
  export declare function thrownIsInstanceOf<C extends abstract new (...args: never[]) => unknown>(e: unknown, cls: C): e is InstanceType<C>;
16
17
  export type ThrownExtraReading = {
@@ -55,7 +56,14 @@ export type ProtocolErrorNameReading = {
55
56
  export declare function protocolErrorNameReading(e: object): ProtocolErrorNameReading;
56
57
  export declare function protocolErrorNameOf(e: object): ProtocolErrorName | undefined;
57
58
  export type ThrownStatusReading = number | undefined | typeof THROWN_SLOT_UNREADABLE;
58
- export declare function readThrownStatusSlot(o: object): ThrownStatusReading;
59
+ export declare function readThrownStatusSlot(o: object, notePresence?: (presence: SlotPresence) => void): ThrownStatusReading;
60
+ export type SlotPresence = 'absent' | 'present' | 'unreadable';
61
+ export interface OwnSlotRead {
62
+ readonly value: {} | null | undefined;
63
+ readonly presence: SlotPresence;
64
+ }
65
+ export declare function slotPresenceOf(o: object, key: string): SlotPresence;
66
+ export declare function slotReadOf(o: object, key: string): OwnSlotRead;
59
67
  export declare function readErrorNumber(o: object, key: string): number | undefined;
60
68
  export declare function readErrorRecord(o: object, key: string): object | undefined;
61
69
  export declare function readErrorString(o: object, key: string): string | undefined;
@@ -83,7 +91,23 @@ export type BlockedByReading = {
83
91
  kind: 'unreadable';
84
92
  };
85
93
  export declare function readBlockedBy(o: object): BlockedByReading;
94
+ export interface FoldedCodeReading {
95
+ readonly code: string | undefined;
96
+ readonly folded: boolean;
97
+ }
98
+ export declare function foldedWireCodeReading(o: object, outer: string | undefined): FoldedCodeReading;
99
+ export declare function effectiveWireCodeReading(o: object): FoldedCodeReading;
100
+ export interface FoldedCodeBits {
101
+ readonly errorCode: string | undefined;
102
+ readonly blockedBy: string | undefined;
103
+ }
104
+ export declare function ownFoldedCodeBitsOf(wire: {
105
+ readonly errorCode?: string;
106
+ readonly blockedBy?: string;
107
+ } | undefined): FoldedCodeBits;
86
108
  export declare function readRefusalField(o: object): string | undefined;
109
+ export declare const REFUSAL_PROBLEMS_READ_MAX = 1000;
110
+ export declare function readRefusalNamedFields(o: object): readonly string[];
87
111
  export declare function isDisplayableWireCode(s: string): boolean;
88
112
  export declare const ASSEMBLY_REFUSAL_CAUSES: readonly ["ports_missing", "judge_unanswerable", "input_malformed", "agents_projection_failed", "agents_not_ready"];
89
113
  export interface AssemblyRefusal {
@@ -1,12 +1,16 @@
1
1
  import { msg, renderMessage } from './i18n/translate.js';
2
2
  import { guardedRead, ownDataField, readOwnDataValue } from './ownKey.js';
3
+ import { RESUME_POLICY_FOLD_CODE } from './engineErrorCodes.js';
3
4
  export const THROWN_SLOT_UNREADABLE = Symbol('thrown-slot-unreadable');
5
+ export function isSlotCarrier(x) {
6
+ return (typeof x === 'object' && x !== null) || typeof x === 'function';
7
+ }
4
8
  export function readThrownSlot(o, key, own = false) {
5
9
  try {
6
10
  if (own === 'data') {
7
11
  if (o === null || o === undefined)
8
12
  return THROWN_SLOT_UNREADABLE;
9
- return typeof o === 'object' || typeof o === 'function' ? ownDataField(o, key) : undefined;
13
+ return isSlotCarrier(o) ? ownDataField(o, key) : undefined;
10
14
  }
11
15
  if (own && !Object.hasOwn(o, key))
12
16
  return undefined;
@@ -150,13 +154,48 @@ export function protocolErrorNameOf(e) {
150
154
  const r = protocolErrorNameReading(e);
151
155
  return r.state === 'named' ? r.name : undefined;
152
156
  }
153
- export function readThrownStatusSlot(o) {
154
- const st = readThrownSlot(o, 'status', 'data');
155
- const raw = st !== THROWN_SLOT_UNREADABLE && (st === undefined || st === null) ? readThrownSlot(o, 'statusCode', 'data') : st;
157
+ export function readThrownStatusSlot(o, notePresence) {
158
+ const withPresence = notePresence !== undefined;
159
+ const offCarrier = { value: o === null || o === undefined ? THROWN_SLOT_UNREADABLE : undefined, presence: 'unreadable' };
160
+ const st = isSlotCarrier(o) ? readOwnSlot(o, 'status', withPresence) : offCarrier;
161
+ let raw = st.value;
162
+ let presence = st.presence;
163
+ if (raw !== THROWN_SLOT_UNREADABLE && (raw === undefined || raw === null)) {
164
+ const sc = isSlotCarrier(o) ? readOwnSlot(o, 'statusCode', withPresence) : offCarrier;
165
+ raw = sc.value;
166
+ if (presence === 'absent')
167
+ presence = sc.presence;
168
+ }
169
+ notePresence?.(presence);
156
170
  if (raw === undefined)
157
171
  return undefined;
158
172
  return typeof raw === 'number' ? raw : THROWN_SLOT_UNREADABLE;
159
173
  }
174
+ function readOwnSlot(o, key, withPresence) {
175
+ let d;
176
+ try {
177
+ d = Object.getOwnPropertyDescriptor(o, key);
178
+ }
179
+ catch {
180
+ return { value: THROWN_SLOT_UNREADABLE, presence: 'unreadable' };
181
+ }
182
+ if (d !== undefined)
183
+ return Object.hasOwn(d, 'value') ? { value: d.value, presence: 'present' } : { value: THROWN_SLOT_UNREADABLE, presence: 'unreadable' };
184
+ if (!withPresence)
185
+ return { value: undefined, presence: 'unreadable' };
186
+ try {
187
+ return { value: undefined, presence: key in o ? 'unreadable' : 'absent' };
188
+ }
189
+ catch {
190
+ return { value: undefined, presence: 'unreadable' };
191
+ }
192
+ }
193
+ export function slotPresenceOf(o, key) {
194
+ return slotReadOf(o, key).presence;
195
+ }
196
+ export function slotReadOf(o, key) {
197
+ return readOwnSlot(o, key, true);
198
+ }
160
199
  function readErrorSlot(obj, key, accept) {
161
200
  try {
162
201
  const topRaw = readThrownSlot(obj, key, 'data');
@@ -338,6 +377,24 @@ export function readBlockedBy(o) {
338
377
  return { kind: 'unreadable' };
339
378
  }
340
379
  }
380
+ export function foldedWireCodeReading(o, outer) {
381
+ if (outer !== RESUME_POLICY_FOLD_CODE)
382
+ return { code: outer, folded: false };
383
+ const inner = readBlockedBy(o);
384
+ return inner.kind === 'named' ? { code: inner.code, folded: true } : { code: outer, folded: false };
385
+ }
386
+ export function effectiveWireCodeReading(o) {
387
+ const outerRaw = readThrownSlot(o, 'errorCode', 'data');
388
+ const outer = typeof outerRaw === 'string' && outerRaw.length > 0 ? outerRaw : undefined;
389
+ return foldedWireCodeReading(o, outer);
390
+ }
391
+ export function ownFoldedCodeBitsOf(wire) {
392
+ const bit = (key) => {
393
+ const v = readThrownSlot(wire, key, 'data');
394
+ return typeof v === 'string' ? v : undefined;
395
+ };
396
+ return Object.freeze({ errorCode: bit('errorCode'), blockedBy: bit('blockedBy') });
397
+ }
341
398
  export function readRefusalField(o) {
342
399
  const str = (rec) => {
343
400
  const v = guardedRead(() => readOwnDataValue(rec, 'field'));
@@ -349,7 +406,37 @@ export function readRefusalField(o) {
349
406
  if (fromExtra !== undefined)
350
407
  return fromExtra;
351
408
  }
352
- return str(o);
409
+ const top = readThrownSlot(o, 'field', 'data');
410
+ return typeof top === 'string' && top !== '' ? top : undefined;
411
+ }
412
+ export const REFUSAL_PROBLEMS_READ_MAX = 1000;
413
+ export function readRefusalNamedFields(o) {
414
+ const out = [];
415
+ const add = (v) => {
416
+ if (typeof v === 'string' && v !== '' && !out.includes(v))
417
+ out.push(v);
418
+ };
419
+ add(guardedRead(() => readRefusalField(o)));
420
+ const detail = guardedRead(() => readErrorRecord(o, 'detail'));
421
+ if (detail !== undefined) {
422
+ add(guardedRead(() => readOwnDataValue(detail, 'field')));
423
+ try {
424
+ const list = readOwnDataValue(detail, 'problems');
425
+ if (Array.isArray(list)) {
426
+ const n = list.length;
427
+ const len = typeof n === 'number' && Number.isSafeInteger(n) && n > 0 ? Math.min(n, REFUSAL_PROBLEMS_READ_MAX) : 0;
428
+ for (let i = 0; i < len; i += 1) {
429
+ const item = guardedRead(() => readOwnDataValue(list, String(i)));
430
+ if (typeof item !== 'object' || item === null)
431
+ continue;
432
+ add(guardedRead(() => readOwnDataValue(item, 'field')));
433
+ }
434
+ }
435
+ }
436
+ catch {
437
+ }
438
+ }
439
+ return Object.freeze(out);
353
440
  }
354
441
  const DISPLAYABLE_WIRE_CODE = /^[A-Za-z0-9._:-]{1,64}$/;
355
442
  export function isDisplayableWireCode(s) {
@@ -16,6 +16,17 @@ export interface UsageWindowExhaustedDetail {
16
16
  }
17
17
  export declare function usageWindowExhaustedFromError(err: unknown): UsageWindowExhaustedDetail | null;
18
18
  export declare function usageWindowExhaustedContent(detail: UsageWindowExhaustedDetail, lang?: UiLanguage): string;
19
+ export interface QuotaExhaustedView {
20
+ readonly windowType?: 'fiveHour' | 'weekly' | 'budget';
21
+ readonly remaining?: number;
22
+ readonly resetAt?: string | null;
23
+ readonly isEstimate?: boolean;
24
+ readonly pool?: string;
25
+ readonly retryAfterSec?: number;
26
+ }
27
+ export declare function quotaExhaustedFromError(err: {} | null | undefined): QuotaExhaustedView | null;
28
+ export declare function quotaResetInstantText(resetAtIso: string, nowMs: number, lang?: UiLanguage): string | undefined;
29
+ export declare function quotaExhaustedContent(detail: QuotaExhaustedView, nowMs: number, lang?: UiLanguage): string;
19
30
  export interface FleetLeaseUnavailableDetail {
20
31
  code: typeof FLEET_LEASE_UNAVAILABLE;
21
32
  reason?: string;
@@ -52,7 +63,6 @@ export interface SettingsPermissionBucketRefusalDetail {
52
63
  readonly index?: number;
53
64
  readonly folded?: true;
54
65
  }
55
- export declare function settingsPermissionBucketRefusalFromError(err: unknown): SettingsPermissionBucketRefusalDetail | null;
56
66
  export type FieldLimitRefusalReason = 'over_cap' | 'too_long' | 'bad_entry';
57
67
  export interface FieldLimitRefusalDetail {
58
68
  readonly field: string;
@@ -63,6 +73,7 @@ export interface FieldLimitRefusalDetail {
63
73
  readonly folded?: true;
64
74
  }
65
75
  export declare function fieldLimitRefusalFromError(err: {} | null | undefined): FieldLimitRefusalDetail | null;
76
+ export declare function fieldLimitRefusalOfSettingsHooks(refusal: SettingsHooksRefusal | null | undefined): FieldLimitRefusalDetail | null;
66
77
  export declare function fieldLimitRefusalContent(detail: FieldLimitRefusalDetail, lang?: UiLanguage): string;
67
78
  export declare function settingsPermissionBucketRefusalContent(detail: SettingsPermissionBucketRefusalDetail, lang?: UiLanguage): string;
68
79
  declare const PAYLOAD_TOO_LARGE = "request.payload_too_large";
@@ -129,6 +140,18 @@ export interface AutonomyLaneRefusalDetail {
129
140
  }
130
141
  export declare function autonomyLaneRefusalFromError(err: unknown): AutonomyLaneRefusalDetail | null;
131
142
  export declare function autonomyLaneRefusalContent(lang?: UiLanguage): string;
143
+ export interface UnsupportedRuleRefusalProblem {
144
+ readonly code: string;
145
+ readonly field?: string;
146
+ readonly entry?: string;
147
+ }
148
+ export interface UnsupportedRuleRefusalDetail {
149
+ readonly code: string;
150
+ readonly problems?: readonly UnsupportedRuleRefusalProblem[];
151
+ readonly folded?: true;
152
+ }
153
+ export declare function unsupportedRuleRefusalFromError(err: {} | null | undefined): UnsupportedRuleRefusalDetail | null;
154
+ export declare function unsupportedRuleRefusalContent(detail: UnsupportedRuleRefusalDetail, lang?: UiLanguage): string;
132
155
  export interface UserAttachmentRefusalDetail {
133
156
  readonly code: typeof USER_ATTACHMENT_INVALID_ERROR_CODE;
134
157
  readonly retryable: false;