@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
@@ -1,5 +1,6 @@
1
1
  import { engineCapsLandingOf } from './engineCapsCache.js';
2
2
  import { engineWireTarget } from './engineWireTarget.js';
3
+ import { msg, renderMessage } from './i18n/translate.js';
3
4
  function laneOrder() {
4
5
  return ['processEnv', 'settingsEnv', 'modelCatalogFile', 'followedSettingsFile', 'followedProviderEnv'];
5
6
  }
@@ -30,6 +31,10 @@ function routeGapOf(reading) {
30
31
  const v = own(reading, 'routeGap')?.v;
31
32
  return v === 'endpoint_missing' || v === 'lane_credential_missing' || v === 'none' ? v : undefined;
32
33
  }
34
+ function catalogAdoptionOf(reading) {
35
+ const v = own(reading, 'catalogAdoption')?.v;
36
+ return v === 'absent' || v === 'refused' || v === 'undetermined' ? v : undefined;
37
+ }
33
38
  function analyse(reading) {
34
39
  try {
35
40
  if (!isPlainObject(reading))
@@ -46,25 +51,30 @@ function analyse(reading) {
46
51
  const lanesHit = own(reading, 'lanes')?.v;
47
52
  const order = laneOrder();
48
53
  if (!isPlainObject(lanesHit)) {
49
- return { verdict: 'unknown', why: 'lanes', unreadable: [], unreported: [...order], unusable: [], catalogUnconfirmed: null, catalogRefused: false };
54
+ return { verdict: 'unknown', why: 'lanes', unreadable: [], unreported: [...order], unusable: [], catalogUnconfirmed: null, catalogRefused: null };
50
55
  }
51
56
  const partial = [];
52
57
  const unreadable = [];
53
58
  const unreported = [];
54
59
  const unusable = [];
55
- let catalogRefused = false;
60
+ let catalogRefused = null;
56
61
  let catalogUnconfirmed = null;
57
62
  for (const lane of order) {
58
63
  const s = laneState(lanesHit, lane);
59
64
  if (lane === 'modelCatalogFile') {
60
65
  if (s === 'complete') {
66
+ if (catalogAdoptionOf(reading) === 'refused') {
67
+ partial.push(lane);
68
+ catalogRefused = 'adoption';
69
+ continue;
70
+ }
61
71
  const bit = own(reading, 'engineAcceptsCatalogDefault');
62
72
  const evidence = catalogDefaultEvidence(s, bit?.v);
63
73
  if (evidence !== undefined)
64
74
  return { verdict: 'resolvable', why: 'catalog_default', evidence };
65
75
  if (bit !== undefined && bit.v === false) {
66
76
  partial.push(lane);
67
- catalogRefused = true;
77
+ catalogRefused = 'engine';
68
78
  }
69
79
  else {
70
80
  catalogUnconfirmed = bit === undefined || bit.v === undefined ? 'not_reported' : 'unusable';
@@ -99,19 +109,30 @@ function analyse(reading) {
99
109
  export function modelIdentityResolvability(reading) {
100
110
  return analyse(reading).verdict;
101
111
  }
112
+ const LANE_LABEL_KEYS = Object.freeze({
113
+ processEnv: 'model.identity.lane.processEnv',
114
+ settingsEnv: 'model.identity.lane.settingsEnv',
115
+ modelCatalogFile: 'model.identity.lane.modelCatalogFile',
116
+ followedSettingsFile: 'model.identity.lane.followedSettingsFile',
117
+ followedProviderEnv: 'model.identity.lane.followedProviderEnv',
118
+ });
102
119
  function laneLabel(lane) {
103
- switch (lane) {
104
- case 'processEnv':
105
- return 'the environment this client was started with';
106
- case 'settingsEnv':
107
- return "this client's settings file";
108
- case 'modelCatalogFile':
109
- return 'the local model catalog file';
110
- case 'followedSettingsFile':
111
- return "another tool's settings file that this client follows";
112
- case 'followedProviderEnv':
113
- return 'the provider environment variables this client follows';
114
- }
120
+ return renderMessage(msg(LANE_LABEL_KEYS[lane]));
121
+ }
122
+ const ROUTE_GAP_FACT_KEYS = Object.freeze({
123
+ endpoint_missing: 'model.identity.routeGap.fact.endpointMissing',
124
+ lane_credential_missing: 'model.identity.routeGap.fact.laneCredentialMissing',
125
+ });
126
+ const isRouteGapKind = (v) => typeof v === 'string' && Object.hasOwn(ROUTE_GAP_FACT_KEYS, v);
127
+ const isLane = (v) => typeof v === 'string' && Object.hasOwn(LANE_LABEL_KEYS, v);
128
+ function routeGapSentenceRef(lane, gap) {
129
+ return msg('model.identity.routeGap.sentence', { lane: msg(LANE_LABEL_KEYS[lane]), fact: msg(ROUTE_GAP_FACT_KEYS[gap]) });
130
+ }
131
+ export function modelRouteGapSentence(lane, gap, lang) {
132
+ return isLane(lane) && isRouteGapKind(gap) ? renderMessage(routeGapSentenceRef(lane, gap), lang) : undefined;
133
+ }
134
+ export function modelRouteGapFact(gap, lang) {
135
+ return isRouteGapKind(gap) ? renderMessage(msg(ROUTE_GAP_FACT_KEYS[gap]), lang) : undefined;
115
136
  }
116
137
  function joinPhrases(xs) {
117
138
  if (xs.length <= 1)
@@ -133,16 +154,19 @@ export function modelIdentityDetail(reading) {
133
154
  }
134
155
  return `${laneLabel(a.lane)} supplies a model name for the local engine — whether the engine also has a route to reach that model (an endpoint, or credentials for the channel it names) and whether its gateway accepts the name are separate checks`;
135
156
  case 'not_resolvable': {
136
- if (a.why === 'route_gap') {
137
- return a.gap === 'endpoint_missing'
138
- ? `${laneLabel(a.lane)} supplies a model name, but the local engine has no route to reach it — the model rides the OpenAI-compatible route and no gateway address (MODEL_GATEWAY_BASEURL) is set, and the engine refuses to start without one`
139
- : `${laneLabel(a.lane)} supplies a model name, but the local engine has no route to reach it — the anthropic channel is selected (MODEL_PROVIDER=anthropic), neither ANTHROPIC_API_KEY nor ANTHROPIC_AUTH_TOKEN is set, and there is no gateway address (MODEL_GATEWAY_BASEURL) to fall back to, so the engine cannot start on any route`;
140
- }
157
+ if (a.why === 'route_gap')
158
+ return renderMessage(routeGapSentenceRef(a.lane, a.gap));
141
159
  const others = a.catalogRefused ? a.partial.filter((l) => l !== 'modelCatalogFile') : a.partial;
142
160
  const partialClause = others.length > 0
143
161
  ? `${joinPhrases(others.map(laneLabel))} ${others.length > 1 ? 'carry' : 'carries'} part of a model configuration (such as a gateway address or a credential) but no model name`
144
162
  : '';
145
- if (a.catalogRefused) {
163
+ if (a.catalogRefused === 'adoption') {
164
+ const clause = msg('model.identity.catalogAdoption.refused', { lane: msg(LANE_LABEL_KEYS.modelCatalogFile) });
165
+ return partialClause !== ''
166
+ ? renderMessage(msg('model.identity.catalogAdoption.notResolvableWithPartial', { clause, partial: partialClause }))
167
+ : renderMessage(msg('model.identity.catalogAdoption.notResolvable', { clause }));
168
+ }
169
+ if (a.catalogRefused === 'engine') {
146
170
  return (`no model name is configured for the local engine to start with — ${laneLabel('modelCatalogFile')} names a default model, but the local engine is reported not to accept a catalog default in place of a startup model name` +
147
171
  (partialClause !== '' ? `, and ${partialClause}` : '') +
148
172
  ', and the engine does not start without one');
@@ -170,7 +194,10 @@ export function modelIdentityDetail(reading) {
170
194
  else if (a.catalogUnconfirmed === 'unusable') {
171
195
  parts.push(`${laneLabel('modelCatalogFile')} names a default model, but the report of whether the local engine accepts a catalog default in place of a startup model name gave no usable reading`);
172
196
  }
173
- else if (a.catalogRefused) {
197
+ else if (a.catalogRefused === 'adoption') {
198
+ parts.push(renderMessage(msg('model.identity.catalogAdoption.refused', { lane: msg(LANE_LABEL_KEYS.modelCatalogFile) })));
199
+ }
200
+ else if (a.catalogRefused === 'engine') {
174
201
  parts.push(`${laneLabel('modelCatalogFile')} names a default model, but the local engine is reported not to accept a catalog default in place of a startup model name`);
175
202
  }
176
203
  return `whether the local engine has a model name is unknown — ${joinPhrases(parts)}, and no other place this client reads provides one`;
package/dist/ownKey.d.ts CHANGED
@@ -24,5 +24,38 @@ export interface ContextUsageReading {
24
24
  sections?: readonly ContextUsageSectionRow[];
25
25
  }
26
26
  export declare function contextUsageReadingOf(payload: {} | null | undefined): ContextUsageReading | undefined;
27
+ export interface HumanInputAttachmentView {
28
+ ordinal: number;
29
+ kind?: string;
30
+ outcome: string;
31
+ label?: string;
32
+ }
33
+ export declare function humanInputAttachmentsOf(frame: {} | null | undefined): HumanInputAttachmentView[] | undefined;
27
34
  export declare function markMcpSectionDroppedNamedRows(rows: object, dropped: ReadonlyMap<string, number>): void;
28
35
  export declare function mcpSectionDroppedNamedRowsOf(rows: object | null | undefined, name: string): number;
36
+ export interface PromptManifestSectionRow {
37
+ id: string;
38
+ chars: number;
39
+ band?: string;
40
+ locale?: string;
41
+ variant?: string;
42
+ contentHash?: string;
43
+ slot?: string;
44
+ }
45
+ export interface PromptManifestIdentityRow {
46
+ readonly artifact: string;
47
+ readonly layers: PromptIdentityLayersRow;
48
+ readonly epoch: number;
49
+ readonly activatedBy: string;
50
+ }
51
+ export interface PromptIdentityLayersRow {
52
+ readonly catalog: string;
53
+ readonly renderers: Readonly<Record<string, number>>;
54
+ readonly center?: string;
55
+ readonly deploy?: string;
56
+ readonly task?: string;
57
+ readonly binding: string;
58
+ }
59
+ export declare function promptManifestSectionViewOf(row: object): PromptManifestSectionRow | undefined;
60
+ export declare function promptManifestIdentityOfFrame(frame: object): PromptManifestIdentityRow | undefined;
61
+ export declare function promptManifestIdentityOf(raw: {} | null | undefined): PromptManifestIdentityRow | undefined;
package/dist/ownKey.js CHANGED
@@ -131,6 +131,40 @@ export function contextUsageReadingOf(payload) {
131
131
  return undefined;
132
132
  }
133
133
  }
134
+ const HUMAN_INPUT_ATTACHMENT_ROWS_MAX = 256;
135
+ export function humanInputAttachmentsOf(frame) {
136
+ try {
137
+ if (typeof frame !== 'object' || frame === null || Array.isArray(frame))
138
+ return undefined;
139
+ const raw = guardedRead(() => readOwnDataValue(frame, 'attachments'));
140
+ if (!Array.isArray(raw))
141
+ return undefined;
142
+ const n = guardedRead(() => readOwnDataFiniteNumber(raw, 'length'));
143
+ if (n === undefined)
144
+ return undefined;
145
+ const rows = [];
146
+ for (let i = 0; i < Math.min(n, HUMAN_INPUT_ATTACHMENT_ROWS_MAX); i++) {
147
+ const row = guardedRead(() => {
148
+ const r = readOwnDataValue(raw, String(i));
149
+ if (typeof r !== 'object' || r === null || Array.isArray(r))
150
+ return undefined;
151
+ const ordinal = readOwnDataValue(r, 'ordinal');
152
+ const outcome = readOwnDataNonEmptyString(r, 'outcome');
153
+ if (typeof ordinal !== 'number' || !Number.isSafeInteger(ordinal) || ordinal < 1 || outcome === undefined)
154
+ return undefined;
155
+ const kind = readOwnDataNonEmptyString(r, 'kind');
156
+ const label = readOwnDataNonEmptyString(r, 'label');
157
+ return { ordinal, ...(kind !== undefined ? { kind } : {}), outcome, ...(label !== undefined ? { label } : {}) };
158
+ });
159
+ if (row !== undefined)
160
+ rows.push(row);
161
+ }
162
+ return rows.length > 0 ? rows : undefined;
163
+ }
164
+ catch {
165
+ return undefined;
166
+ }
167
+ }
134
168
  const DROPPED_NAMED_ROWS = Symbol.for('@sema-agent/client-core/mcpSectionDroppedNamedRows');
135
169
  export function markMcpSectionDroppedNamedRows(rows, dropped) {
136
170
  if (dropped.size === 0)
@@ -155,3 +189,78 @@ export function mcpSectionDroppedNamedRowsOf(rows, name) {
155
189
  return 0;
156
190
  }
157
191
  }
192
+ export function promptManifestSectionViewOf(row) {
193
+ const o = row;
194
+ const str = (v) => (typeof v === 'string' && v.length > 0 ? v : undefined);
195
+ const id = str(o.id);
196
+ const chars = typeof o.chars === 'number' && Number.isFinite(o.chars) && o.chars >= 0 ? o.chars : undefined;
197
+ if (id === undefined || chars === undefined)
198
+ return undefined;
199
+ const band = str(o.band);
200
+ const locale = str(o.locale);
201
+ const variant = str(o.variant);
202
+ const contentHash = band !== undefined ? str(o.contentHash) : undefined;
203
+ const slot = str(o.slot);
204
+ return {
205
+ id,
206
+ chars,
207
+ ...(band !== undefined ? { band } : {}),
208
+ ...(locale !== undefined ? { locale } : {}),
209
+ ...(variant !== undefined ? { variant } : {}),
210
+ ...(contentHash !== undefined ? { contentHash } : {}),
211
+ ...(slot !== undefined ? { slot } : {}),
212
+ };
213
+ }
214
+ export function promptManifestIdentityOfFrame(frame) {
215
+ let raw;
216
+ try {
217
+ raw = frame.identity;
218
+ }
219
+ catch {
220
+ return undefined;
221
+ }
222
+ return promptManifestIdentityOf(typeof raw === 'object' && raw !== null ? raw : undefined);
223
+ }
224
+ export function promptManifestIdentityOf(raw) {
225
+ try {
226
+ const plain = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
227
+ const str = (v) => (typeof v === 'string' && v.length > 0 ? v : undefined);
228
+ if (!plain(raw))
229
+ return undefined;
230
+ const artifact = str(raw.artifact);
231
+ const activatedBy = str(raw.activatedBy);
232
+ const epochRaw = raw.epoch;
233
+ const epoch = typeof epochRaw === 'number' && Number.isInteger(epochRaw) && epochRaw >= 0 ? epochRaw : undefined;
234
+ const layersRaw = raw.layers;
235
+ if (artifact === undefined || activatedBy === undefined || epoch === undefined || !plain(layersRaw))
236
+ return undefined;
237
+ const catalog = str(layersRaw.catalog);
238
+ const binding = str(layersRaw.binding);
239
+ if (catalog === undefined || binding === undefined)
240
+ return undefined;
241
+ const optional = {};
242
+ for (const k of ['center', 'deploy', 'task']) {
243
+ const v = layersRaw[k];
244
+ if (v === undefined)
245
+ continue;
246
+ const t = str(v);
247
+ if (t === undefined)
248
+ return undefined;
249
+ optional[k] = t;
250
+ }
251
+ const renderersRaw = layersRaw.renderers;
252
+ if (!plain(renderersRaw))
253
+ return undefined;
254
+ const entries = [];
255
+ for (const [k, v] of Object.entries(renderersRaw)) {
256
+ if (typeof v !== 'number' || !Number.isFinite(v))
257
+ return undefined;
258
+ entries.push([k, v]);
259
+ }
260
+ const renderers = Object.fromEntries(entries);
261
+ return { artifact, layers: { catalog, renderers, ...optional, binding }, epoch, activatedBy };
262
+ }
263
+ catch {
264
+ return undefined;
265
+ }
266
+ }
@@ -31,6 +31,11 @@ export type PanelFrame = EngineAgentPanelEvent | {
31
31
  kind: 'anchor';
32
32
  taskId: string;
33
33
  transcriptId: string;
34
+ } | {
35
+ kind: 'start';
36
+ taskId: string;
37
+ startedAt?: number;
38
+ workflowRunId?: string;
34
39
  };
35
40
  export interface PanelRowFields {
36
41
  name?: string;
@@ -97,7 +102,7 @@ export interface PanelStep {
97
102
  readonly deltas: PanelDelta[];
98
103
  readonly facts: PanelFact[];
99
104
  }
100
- export declare function panelEndFact(taskId: string, isError: boolean, extra?: Pick<EndArm, 'report' | 'cycleSeq' | 'startedAt'>): EndArm;
105
+ export declare function panelEndFact(taskId: string, isError: boolean, extra?: Pick<EndArm, 'report' | 'cycleSeq' | 'startedAt' | 'sessionId'>): EndArm;
101
106
  export interface EnginePanelTaskIdentity {
102
107
  readonly taskId: string;
103
108
  readonly origin: 'fleet-row' | 'wire';
@@ -111,6 +116,11 @@ export declare function reducePanelFrame(state: PanelReduceState, frame: PanelFr
111
116
  };
112
117
  export declare function panelRowSnapshot(state: PanelReduceState): PanelDelta[];
113
118
  export declare function panelResolveTaskId(state: PanelReduceState, wireTaskId: string): EnginePanelTaskIdentity;
119
+ export interface PanelSubagentIdentity {
120
+ readonly key: string;
121
+ readonly ids: readonly string[];
122
+ }
123
+ export declare function panelSubagentOf(state: PanelReduceState, id: string): PanelSubagentIdentity | undefined;
114
124
  export declare function panelIsResident(state: PanelReduceState, taskId: string): boolean;
115
125
  export declare function panelAnchorOf(state: PanelReduceState, taskId: string): string | undefined;
116
126
  export declare function panelPresenceSize(state: PanelReduceState, sessionKey: string): number;
@@ -1,6 +1,6 @@
1
1
  import { rowIdTail } from './workflow.js';
2
2
  import { isSdkFleetTaskTerminal, isSdkFleetTaskTerminalNotSuccess } from './terminalStatuses.js';
3
- import { carryCycle, cycleEmpty, cycleKeysChanged, cycleOf, cycleOrder, mergeCycle, } from './cycleOrder.js';
3
+ import { carryCycle, cycleEmpty, cycleKeysChanged, cycleOf, cycleOrder, cycleSeqValue, mergeCycle, } from './cycleOrder.js';
4
4
  export function isStaleEngineAgentPanelEnd(end, current) {
5
5
  return cycleOrder(end, current) === 'before';
6
6
  }
@@ -394,6 +394,7 @@ function merge(d, a, b) {
394
394
  held: rs.held ?? rl.held,
395
395
  resident: rs.resident ?? rl.resident,
396
396
  anchor: rs.anchor ?? rl.anchor,
397
+ startedAt: rs.startedAt ?? rl.startedAt,
397
398
  row: merged.row,
398
399
  });
399
400
  for (const id of idsOf(rl))
@@ -423,6 +424,7 @@ function merge(d, a, b) {
423
424
  mintTerminal(d, key, merged.row.isError === true, merged.row.report, 'end');
424
425
  }
425
426
  }
427
+ fillStartedAt(d, s);
426
428
  return s;
427
429
  }
428
430
  function genOf(r) {
@@ -513,6 +515,7 @@ export function panelEndFact(taskId, isError, extra) {
513
515
  ...(extra?.cycleSeq !== undefined ? { cycleSeq: extra.cycleSeq } : {}),
514
516
  ...(extra?.startedAt !== undefined ? { startedAt: extra.startedAt } : {}),
515
517
  ...(extra?.report !== undefined ? { report: extra.report } : {}),
518
+ ...(typeof extra?.sessionId === 'string' && extra.sessionId.length > 0 ? { sessionId: extra.sessionId } : {}),
516
519
  };
517
520
  }
518
521
  function terminalDelta(key, isError, report, cause) {
@@ -572,10 +575,26 @@ function fullUsage(key, row) {
572
575
  return undefined;
573
576
  return usageDelta(key, { ...(row.totalTokens !== undefined ? { totalTokens: row.totalTokens } : {}), ...(row.toolUses !== undefined ? { toolUses: row.toolUses } : {}), ...(fin !== undefined ? { final: fin } : {}) });
574
577
  }
578
+ function ownDataOf(o, key) {
579
+ if (typeof o !== 'object' || o === null)
580
+ return undefined;
581
+ try {
582
+ const d = Object.getOwnPropertyDescriptor(o, key);
583
+ return d !== undefined && 'value' in d ? d.value : undefined;
584
+ }
585
+ catch {
586
+ return undefined;
587
+ }
588
+ }
589
+ function publisherFinality(f) {
590
+ return { ...(ownDataOf(f, 'totalTokens') === true ? { totalTokens: true } : {}), ...(ownDataOf(f, 'toolUses') === true ? { toolUses: true } : {}) };
591
+ }
575
592
  function fleetCarrier(ev) {
576
- const f = ev.final;
577
- const final = { ...(f?.totalTokens === true ? { totalTokens: true } : {}), ...(f?.toolUses === true ? { toolUses: true } : {}) };
578
- return { totalTokens: ev.totalTokens, toolUses: ev.toolUses, final };
593
+ return { totalTokens: ev.totalTokens, toolUses: ev.toolUses, final: publisherFinality(ownDataOf(ev, 'final')) };
594
+ }
595
+ function tickCycleOf(ev) {
596
+ const c = cycleSeqValue(ownDataOf(ev, 'cycleSeq'));
597
+ return c === undefined ? undefined : { cycleSeq: c };
579
598
  }
580
599
  function finalityOf(tokens, toolUses) {
581
600
  if (tokens === undefined && toolUses === undefined)
@@ -625,26 +644,30 @@ function announce(d, rid) {
625
644
  if (r === undefined || row === undefined || row.announced)
626
645
  return;
627
646
  const key = keyOf(r);
628
- d.put(rid, { consumerKey: key, announceSeq: d.counts.nextAnnounce, row: { ...row, announced: true } });
647
+ const fields = row.fields.startedAt === undefined && r.startedAt !== undefined ? { ...row.fields, startedAt: r.startedAt } : row.fields;
648
+ d.put(rid, { consumerKey: key, announceSeq: d.counts.nextAnnounce, row: { ...row, fields, announced: true } });
629
649
  d.counts.nextAnnounce++;
630
- d.deltas.push({ op: 'upsert', canonicalId: key, created: true, fields: { ...row.fields } });
650
+ d.deltas.push({ op: 'upsert', canonicalId: key, created: true, fields: { ...fields } });
631
651
  const u = fullUsage(key, row);
632
652
  if (u !== undefined)
633
653
  d.deltas.push(u);
634
654
  if (row.phase === 'ended')
635
655
  mintTerminal(d, key, row.isError === true, row.report, 'end');
636
656
  }
637
- function foldTick(d, rid, ev, cardBound) {
657
+ function foldTick(d, rid, ev, cardBound, final) {
638
658
  const r = d.rec(rid);
639
659
  if (r === undefined)
640
660
  return;
641
661
  const row = r.row;
642
662
  const gate = cardBound ? { gateBound: true } : {};
643
663
  const wireId = ev.wireTaskId ?? ev.taskId;
644
- const attributable = !hasCycleSeq(r.cycle) && (r.currentRun === undefined || r.currentRun === wireId);
664
+ const tickCycle = tickCycleOf(ev);
665
+ const attributable = hasCycleSeq(r.cycle)
666
+ ? tickCycle !== undefined && cycleOrder(tickCycle, r.cycle) === 'same'
667
+ : r.currentRun === undefined || r.currentRun === wireId;
645
668
  if (!attributable)
646
669
  d.counts.unattributedTicks++;
647
- const carrier = attributable ? { totalTokens: ev.totalTokens, toolUses: ev.toolUses } : {};
670
+ const carrier = attributable ? { totalTokens: ev.totalTokens, toolUses: ev.toolUses, final } : {};
648
671
  if (row === undefined || !row.announced) {
649
672
  const base = row !== undefined
650
673
  ? { ...row, ...gate, tickSeen: true, fields: { ...row.fields, ...tickFields(ev) } }
@@ -785,28 +808,37 @@ function foldAbsence(d, rid, a) {
785
808
  d.deltas.push({ op: 'upsert', canonicalId: keyOf(r), fields: { absence } });
786
809
  d.put(rid, { row: { ...row, fields: { ...row.fields, absence } } });
787
810
  }
788
- function stripCardBound(ev) {
789
- const { cardBound: _cardBound, ...rest } = ev;
790
- void _cardBound;
791
- return rest;
811
+ function tickFactBase(ev) {
812
+ const out = {};
813
+ for (const k of Reflect.ownKeys(ev)) {
814
+ if (typeof k !== 'string' || k === 'cardBound' || k === 'final' || k === 'cycleSeq')
815
+ continue;
816
+ if (!Object.prototype.propertyIsEnumerable.call(ev, k))
817
+ continue;
818
+ out[k] = Reflect.get(ev, k);
819
+ }
820
+ return out;
792
821
  }
793
822
  function emitTick(d, ev) {
794
823
  const found = d.find(ev.taskId);
795
824
  const fr = found !== undefined ? d.rec(found) : undefined;
796
825
  if (fr !== undefined && formerGeneration(fr, ev.taskId))
797
826
  return;
827
+ const tickCycle = tickCycleOf(ev);
828
+ if (fr !== undefined && tickCycle !== undefined && cycleOrder(tickCycle, genOf(fr)) === 'before')
829
+ return;
798
830
  const rid = found ?? d.create({ id: ev.taskId });
799
831
  d.records.touch(rid);
800
832
  const r = d.rec(rid);
801
833
  if (r === undefined)
802
834
  return;
803
835
  const key = keyOf(r);
804
- const plain = stripCardBound(ev);
836
+ const plain = { ...tickFactBase(ev), ...(tickCycle !== undefined ? { cycleSeq: tickCycle.cycleSeq } : {}) };
805
837
  const fact = key === ev.taskId
806
838
  ? { ...plain, taskIdOrigin: 'wire' }
807
839
  : { ...plain, taskId: key, wireTaskId: ev.taskId, taskIdOrigin: key === r.tail ? 'fleet-row' : 'wire' };
808
840
  d.facts.push({ ch: 'event', ev: fact });
809
- foldTick(d, rid, fact, ev.cardBound === true);
841
+ foldTick(d, rid, fact, ev.cardBound === true, publisherFinality(ownDataOf(ev, 'final')));
810
842
  }
811
843
  function flushHeld(d, wireTaskId) {
812
844
  const held = d.pending.get(wireTaskId);
@@ -861,7 +893,8 @@ function publishFleetRow(d, ev) {
861
893
  const stale = order === 'after';
862
894
  let newGen = false;
863
895
  if (!stale) {
864
- const endGen = r.row?.phase === 'ended' ? r.row.endCycle : undefined;
896
+ const endedHere = r.ended !== undefined && (r.cycle === undefined || cycleOrder(r.ended, r.cycle) === 'same') ? r.ended : undefined;
897
+ const endGen = r.row?.phase === 'ended' ? (r.row.endCycle ?? endedHere) : undefined;
865
898
  newGen = order === 'before' || (endGen !== undefined && cycleOrder(endGen, rowCycle) === 'before');
866
899
  if (!newGen && transcript !== undefined && !hasCycleSeq(r.cycle) && !hasCycleSeq(rowCycle) && r.currentRun !== undefined && r.currentRun !== transcript) {
867
900
  newGen = true;
@@ -901,6 +934,36 @@ function publishTick(d, ev) {
901
934
  }
902
935
  d.pending.set(ev.taskId, { ev, beats: 0 });
903
936
  }
937
+ function publishStart(d, ev) {
938
+ if (typeof ev.workflowRunId === 'string' && ev.workflowRunId.length > 0)
939
+ return;
940
+ if (typeof ev.taskId !== 'string' || ev.taskId.length === 0)
941
+ return;
942
+ const startedAt = typeof ev.startedAt === 'number' && Number.isFinite(ev.startedAt) ? ev.startedAt : undefined;
943
+ if (startedAt === undefined)
944
+ return;
945
+ const found = d.find(ev.taskId);
946
+ const former = found !== undefined ? d.rec(found) : undefined;
947
+ if (former !== undefined && formerGeneration(former, ev.taskId))
948
+ return;
949
+ if (found === undefined && d.records.size >= MAX_RECORDS)
950
+ return;
951
+ const rid = found ?? d.create({ id: ev.taskId });
952
+ const r = d.rec(rid);
953
+ if (r === undefined)
954
+ return;
955
+ if (r.startedAt === undefined)
956
+ d.put(rid, { startedAt });
957
+ fillStartedAt(d, rid);
958
+ }
959
+ function fillStartedAt(d, rid) {
960
+ const r = d.rec(rid);
961
+ const row = r?.row;
962
+ if (r === undefined || r.startedAt === undefined || row === undefined || !row.announced || row.phase !== 'running' || row.fields.startedAt !== undefined)
963
+ return;
964
+ d.deltas.push({ op: 'upsert', canonicalId: keyOf(r), fields: { startedAt: r.startedAt } });
965
+ d.put(rid, { row: { ...row, fields: { ...row.fields, startedAt: r.startedAt } } });
966
+ }
904
967
  function releaseHeld(d, rid, endCycle) {
905
968
  const held = d.rec(rid)?.held;
906
969
  if (held === undefined)
@@ -921,6 +984,15 @@ function settle(d, rid, cycle) {
921
984
  d.put(rid, { running: undefined, ended: older ? r.ended : mergeCycle(cycleOf(cycle), r.ended) });
922
985
  }
923
986
  function publishEnd(d, ev) {
987
+ const sessionId = typeof ev.sessionId === 'string' && ev.sessionId.length > 0 && ev.sessionId !== ev.taskId ? ev.sessionId : undefined;
988
+ if (sessionId !== undefined) {
989
+ const at = d.find(ev.taskId);
990
+ const ra = at !== undefined ? d.rec(at) : undefined;
991
+ const evCycle = frameCycleOn(ra, ev.taskId, ev);
992
+ const provablyOld = ra !== undefined && (isStaleEngineAgentPanelEnd(evCycle, ra.cycle) || isStaleEngineAgentPanelEnd(evCycle, ra.ended));
993
+ if (!provablyOld)
994
+ bind(d, ev.taskId, 'tail', sessionId, cycleOf(ev));
995
+ }
924
996
  const pre = d.find(ev.taskId);
925
997
  const pr = pre !== undefined ? d.rec(pre) : undefined;
926
998
  if (pre !== undefined && pr !== undefined)
@@ -1187,6 +1259,9 @@ export function stepPanelFrame(state, frame) {
1187
1259
  case 'resident-clear-wire':
1188
1260
  clearResidentByWire(d, frame.taskId, frame.cycle);
1189
1261
  break;
1262
+ case 'start':
1263
+ publishStart(d, frame);
1264
+ break;
1190
1265
  case 'anchor':
1191
1266
  if (frame.taskId && frame.transcriptId)
1192
1267
  d.put(bind(d, frame.taskId, 'unknown', frame.transcriptId, undefined), { anchor: frame.transcriptId });
@@ -1231,6 +1306,10 @@ export function panelResolveTaskId(state, wireTaskId) {
1231
1306
  return { taskId: wireTaskId, origin: 'wire' };
1232
1307
  return { taskId: r.tail, origin: 'fleet-row', ...cycleOf(bindingOf(r, wireTaskId)?.gen) };
1233
1308
  }
1309
+ export function panelSubagentOf(state, id) {
1310
+ const r = recordOfId(state, id);
1311
+ return r === undefined ? undefined : { key: keyOf(r), ids: idsOf(r) };
1312
+ }
1234
1313
  export function panelIsResident(state, taskId) {
1235
1314
  return recordOfId(state, taskId)?.resident === true;
1236
1315
  }
@@ -1,5 +1,6 @@
1
1
  import { type PanelDelta, type PanelFact, type PanelFrame, type PanelReduceState } from './panelReduce.js';
2
2
  export declare function panelStateNow(): PanelReduceState;
3
+ export declare function panelSubagentIdsNow(id: string): readonly string[] | undefined;
3
4
  export declare function stepEnginePanel(frame: PanelFrame): void;
4
5
  export declare function replaceEnginePanelState(fn: (s: PanelReduceState) => PanelReduceState): void;
5
6
  export declare function clearEnginePanelIdentity(): void;
@@ -1,9 +1,17 @@
1
- import { createPanelReduceState, panelClearAnchors, panelClearIdentity, panelClearRows, panelRowSnapshot, stepPanelFrame, } from './panelReduce.js';
1
+ import { createPanelReduceState, panelClearAnchors, panelClearIdentity, panelClearRows, panelRowSnapshot, panelSubagentOf, stepPanelFrame, } from './panelReduce.js';
2
+ import { bindSubagentIdentityReader } from './subagentContentStore.js';
2
3
  let state = createPanelReduceState();
3
4
  export function panelStateNow() {
4
5
  return state;
5
6
  }
7
+ export function panelSubagentIdsNow(id) {
8
+ return panelSubagentOf(state, id)?.ids;
9
+ }
10
+ function bindIdentityReader() {
11
+ bindSubagentIdentityReader(panelSubagentIdsNow);
12
+ }
6
13
  export function stepEnginePanel(frame) {
14
+ bindIdentityReader();
7
15
  const r = stepPanelFrame(state, frame);
8
16
  state = r.state;
9
17
  if (rowListener !== null)
@@ -18,6 +26,7 @@ export function stepEnginePanel(frame) {
18
26
  }
19
27
  }
20
28
  export function replaceEnginePanelState(fn) {
29
+ bindIdentityReader();
21
30
  state = fn(state);
22
31
  }
23
32
  export function clearEnginePanelIdentity() {
@@ -1,3 +1,4 @@
1
+ import type { UiLanguage } from './env/uiLanguage.js';
1
2
  export declare const PERMISSION_RULE_ISSUE_CODES: readonly string[];
2
3
  export declare const RETIRED_PERMISSION_RULE_ISSUE_CODES: readonly string[];
3
- export declare function permissionRuleIssueDetail(code: unknown, message: unknown, rule?: string): string;
4
+ export declare function permissionRuleIssueDetail(code: unknown, message: unknown, rule?: string, lang?: UiLanguage): string;