@sema-agent/client-core 0.108.0 → 0.110.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 (179) hide show
  1. package/CHANGELOG.md +294 -0
  2. package/README.md +77 -40
  3. package/dist/adapt/arms.js +41 -13
  4. package/dist/adapt/textStream.d.ts +2 -0
  5. package/dist/adapt/textStream.js +37 -16
  6. package/dist/adapter/activeRunSelfHeal.js +1 -1
  7. package/dist/adapter/downstream/eventToSdkMessage.js +11 -5
  8. package/dist/agentSession/engineAgentRegistryRead.js +2 -0
  9. package/dist/bashExitReading.d.ts +12 -0
  10. package/dist/bashExitReading.js +44 -0
  11. package/dist/checkpointRowVerdict.d.ts +1 -1
  12. package/dist/checkpointRowVerdict.js +4 -2
  13. package/dist/compensations.js +1 -1
  14. package/dist/declared/supportFloorDeclared.js +1 -1
  15. package/dist/displayUntrusted.js +132 -14
  16. package/dist/engineAgentAbsence.d.ts +2 -0
  17. package/dist/engineAgentAbsence.js +28 -0
  18. package/dist/engineErrorCodes.d.ts +7 -0
  19. package/dist/engineErrorCodes.js +7 -0
  20. package/dist/engineHealthFacts.d.ts +26 -0
  21. package/dist/engineHealthFacts.js +63 -4
  22. package/dist/engineInlineTaskStats.d.ts +4 -3
  23. package/dist/engineInlineTaskStats.js +18 -2
  24. package/dist/engineNoticeCodes.d.ts +138 -0
  25. package/dist/engineNoticeCodes.js +662 -55
  26. package/dist/engineRepoint.d.ts +140 -0
  27. package/dist/engineRepoint.js +285 -0
  28. package/dist/engineRowRef.js +2 -0
  29. package/dist/engineSessionMessages.d.ts +2 -1
  30. package/dist/engineSessionMessages.js +5 -0
  31. package/dist/errorSupplementRoles.js +5 -1
  32. package/dist/fleet/fleetProjection.js +3 -2
  33. package/dist/fleetTaskDesc.js +3 -3
  34. package/dist/generated/engineFactTables.d.ts +3 -0
  35. package/dist/generated/engineFactTables.js +18 -0
  36. package/dist/generated/engineNoticeTables.js +3 -0
  37. package/dist/generated/sdkFactTables.d.ts +1 -0
  38. package/dist/generated/sdkFactTables.js +4 -0
  39. package/dist/hitl/approvalAskers.d.ts +6 -0
  40. package/dist/hitl/approvalAskers.js +30 -0
  41. package/dist/hitl/approvalCardReasons.js +25 -4
  42. package/dist/hitl/approvalRequestFrameReading.d.ts +21 -0
  43. package/dist/hitl/approvalRequestFrameReading.js +90 -0
  44. package/dist/hitl/approvalResolution.d.ts +8 -1
  45. package/dist/hitl/approvalResolution.js +4 -0
  46. package/dist/hitl/approvalsFeed.js +1 -1
  47. package/dist/hitl/askGateWire.js +0 -2
  48. package/dist/hitl/askParkRowRouting.js +5 -2
  49. package/dist/hitl/automaticAnswerVerdict.d.ts +5 -2
  50. package/dist/hitl/automaticAnswerVerdict.js +18 -4
  51. package/dist/hitl/decisionConflict.d.ts +2 -1
  52. package/dist/hitl/decisionConflict.js +10 -4
  53. package/dist/hitl/decisionRefusal.js +1 -0
  54. package/dist/hitl/decisionSend.d.ts +3 -0
  55. package/dist/hitl/decisionSend.js +29 -11
  56. package/dist/hitl/editedApprovalAcceptance.d.ts +25 -0
  57. package/dist/hitl/editedApprovalAcceptance.js +26 -0
  58. package/dist/hitl/frameRouter.js +13 -19
  59. package/dist/hitl/gateLedger.d.ts +0 -4
  60. package/dist/hitl/gateLedger.js +0 -19
  61. package/dist/hitl/hitlBridge.d.ts +5 -0
  62. package/dist/hitl/hitlBridge.js +13 -9
  63. package/dist/hitl/hitlHostSurface.d.ts +1 -0
  64. package/dist/hitl/hitlHostSurface.js +7 -2
  65. package/dist/hitl/hostWithdrawal.d.ts +15 -0
  66. package/dist/hitl/hostWithdrawal.js +38 -0
  67. package/dist/hitl/livePendingAsk.js +17 -16
  68. package/dist/hitl/localAllowRule.js +2 -1
  69. package/dist/hitl/noAllowCause.d.ts +1 -1
  70. package/dist/hitl/noAllowCause.js +4 -2
  71. package/dist/hitl/parkExpiryJudgements.js +26 -1
  72. package/dist/hitl/parkOwnership.d.ts +2 -0
  73. package/dist/hitl/parkOwnership.js +48 -8
  74. package/dist/hitl/parkResolver.js +32 -16
  75. package/dist/hitl/parkedUnresumable.d.ts +13 -0
  76. package/dist/hitl/parkedUnresumable.js +80 -0
  77. package/dist/hitl/permissionRuleScope.d.ts +4 -0
  78. package/dist/hitl/permissionRuleScope.js +31 -0
  79. package/dist/hitl/persistedRulesWire.d.ts +2 -0
  80. package/dist/hitl/persistedRulesWire.js +13 -12
  81. package/dist/hitl/planReviewWire.js +14 -4
  82. package/dist/hitl/sessionAllowRoute.js +5 -4
  83. package/dist/hitl/sessionPolicyWire.js +6 -4
  84. package/dist/hitl/standingRows.d.ts +2 -5
  85. package/dist/hitl/standingRows.js +30 -15
  86. package/dist/hitl/toolApprovalWire.d.ts +42 -9
  87. package/dist/hitl/toolApprovalWire.js +267 -44
  88. package/dist/hooksWireCaps.js +35 -4
  89. package/dist/hostSettingsSource.js +2 -0
  90. package/dist/hostTurnSettings.d.ts +10 -4
  91. package/dist/hostTurnSettings.js +112 -5
  92. package/dist/i18n/messages.en.d.ts +251 -0
  93. package/dist/i18n/messages.en.js +254 -2
  94. package/dist/i18n/messages.zh.js +264 -2
  95. package/dist/index.d.ts +48 -12
  96. package/dist/index.js +29 -7
  97. package/dist/inheritEnvCapability.js +2 -0
  98. package/dist/inputAuthor.d.ts +16 -0
  99. package/dist/inputAuthor.js +44 -0
  100. package/dist/interruptRefusalNote.d.ts +2 -0
  101. package/dist/interruptRefusalNote.js +17 -0
  102. package/dist/liveModelCatalog.d.ts +2 -0
  103. package/dist/liveModelCatalog.js +21 -7
  104. package/dist/liveQuestionStore.d.ts +4 -1
  105. package/dist/liveQuestionStore.js +12 -3
  106. package/dist/localEngineJudge.d.ts +75 -0
  107. package/dist/localEngineJudge.js +242 -0
  108. package/dist/localEngineOccupancy.d.ts +88 -0
  109. package/dist/localEngineOccupancy.js +269 -0
  110. package/dist/localEngineSeatReading.d.ts +29 -0
  111. package/dist/localEngineSeatReading.js +294 -0
  112. package/dist/localEngineSpawn.d.ts +113 -0
  113. package/dist/localEngineSpawn.js +486 -0
  114. package/dist/localEngineStep.d.ts +286 -0
  115. package/dist/localEngineStep.js +1086 -0
  116. package/dist/localEngineStopLadder.d.ts +29 -0
  117. package/dist/localEngineStopLadder.js +139 -0
  118. package/dist/localEngineSwapCard.d.ts +43 -0
  119. package/dist/localEngineSwapCard.js +205 -0
  120. package/dist/localEngineTiming.d.ts +8 -0
  121. package/dist/localEngineTiming.js +8 -0
  122. package/dist/mcpEngineLeg.d.ts +3 -0
  123. package/dist/mcpEngineLeg.js +38 -1
  124. package/dist/mcpPanel.js +2 -0
  125. package/dist/mcpReconnect.d.ts +9 -1
  126. package/dist/mcpReconnect.js +132 -20
  127. package/dist/mcpWireCaps.js +2 -2
  128. package/dist/memoryEntriesWire.d.ts +1 -1
  129. package/dist/memoryEntriesWire.js +5 -0
  130. package/dist/modelCapabilityProbe.js +4 -3
  131. package/dist/modsFace.d.ts +8 -1
  132. package/dist/modsFace.js +27 -0
  133. package/dist/noticePresentation.d.ts +2 -0
  134. package/dist/noticePresentation.js +79 -1
  135. package/dist/notifications.d.ts +17 -6
  136. package/dist/notifications.js +67 -19
  137. package/dist/ownKey.d.ts +5 -0
  138. package/dist/ownKey.js +8 -1
  139. package/dist/peerFrames.d.ts +40 -2
  140. package/dist/peerFrames.js +158 -3
  141. package/dist/pluginHooksWire.d.ts +2 -1
  142. package/dist/pluginHooksWire.js +56 -1
  143. package/dist/replayBody.js +10 -2
  144. package/dist/request/taskRequest.d.ts +5 -0
  145. package/dist/request/taskRequest.js +138 -21
  146. package/dist/resumeRefusalCopy.d.ts +1 -3
  147. package/dist/resumeRefusalCopy.js +2 -1
  148. package/dist/retryStatus.d.ts +2 -2
  149. package/dist/retryStatus.js +2 -0
  150. package/dist/ruleReadings.js +1 -1
  151. package/dist/seam.d.ts +24 -2
  152. package/dist/seam.js +15 -2
  153. package/dist/seatContract.d.ts +125 -10
  154. package/dist/seatContract.js +373 -7
  155. package/dist/sessionBackground.js +4 -1
  156. package/dist/sessionBackgroundHandoff.js +2 -1
  157. package/dist/sessionEngine.d.ts +2 -0
  158. package/dist/sessionEngine.js +111 -0
  159. package/dist/sessionMemoryStatus.d.ts +2 -1
  160. package/dist/sessionSyncFileHistory.d.ts +4 -0
  161. package/dist/sessionSyncFileHistory.js +28 -0
  162. package/dist/sseIdleTriage.d.ts +13 -1
  163. package/dist/sseIdleTriage.js +24 -6
  164. package/dist/subagent/engineSubagentTail.js +6 -0
  165. package/dist/subagentContentStore.d.ts +12 -0
  166. package/dist/subagentContentStore.js +72 -11
  167. package/dist/terminalStatuses.d.ts +1 -0
  168. package/dist/terminalStatuses.js +4 -1
  169. package/dist/toolResult.js +18 -5
  170. package/dist/turnFailurePresentation.js +9 -2
  171. package/dist/typePins.d.ts +11 -0
  172. package/dist/usageAnalytics.d.ts +17 -0
  173. package/dist/usageAnalytics.js +44 -2
  174. package/dist/wireFailureShape.d.ts +22 -5
  175. package/dist/wireFailureShape.js +47 -26
  176. package/dist/wireRefusalCopy.d.ts +31 -1
  177. package/dist/wireRefusalCopy.js +167 -2
  178. package/docs/INTEGRATION-CLIENTS.md +3269 -21
  179. package/package.json +5 -5
@@ -1,5 +1,6 @@
1
1
  import type { FinishReasonUnknownDetail } from '@sema-agent/sdk';
2
2
  import { CORE_TOOL_TURN_INCOMPLETE_CAUSES, CORE_USER_INPUT_UNDRAINED_CAUSES, CORE_USER_INPUT_UNDRAINED_FAMILIES } from './generated/engineNoticeTables.js';
3
+ import { CORE_DISCARDED_DELIVERY_PATHS } from './generated/engineFactTables.js';
3
4
  import type { UiLanguage } from './env/uiLanguage.js';
4
5
  export type NoticeAudience = 'user' | 'operator';
5
6
  export declare const ENGINE_NOTICE_CODES: readonly string[];
@@ -288,6 +289,129 @@ interface SessionLineageRerootedBroken extends SessionLineageRerootedCommon {
288
289
  }
289
290
  export type SessionLineageRerootedFactsView = SessionLineageRerootedWhole | SessionLineageRerootedBroken;
290
291
  export declare function readSessionLineageRerooted(notice: {} | null | undefined): SessionLineageRerootedFactsView | undefined;
292
+ export interface MemorySessionPollutedFactsView {
293
+ reason: string;
294
+ sessionId?: string;
295
+ }
296
+ export declare function readMemorySessionPolluted(notice: {} | null | undefined): MemorySessionPollutedFactsView | undefined;
297
+ export interface MemoryHarvestQuarantinedFactsView {
298
+ count: number;
299
+ moved: number;
300
+ escalated: number;
301
+ indexRolledBack?: true;
302
+ reportId?: string;
303
+ sessionId?: string;
304
+ }
305
+ export declare function readMemoryHarvestQuarantined(notice: {} | null | undefined): MemoryHarvestQuarantinedFactsView | undefined;
306
+ export interface MemoryDelegationStaticMarkWaivedFactsView {
307
+ reason: string;
308
+ subagentType?: string;
309
+ sessionId?: string;
310
+ runId: string;
311
+ }
312
+ export declare function readMemoryDelegationStaticMarkWaived(notice: {} | null | undefined): MemoryDelegationStaticMarkWaivedFactsView | undefined;
313
+ export interface MemoryCaptureOptedOutFactsView {
314
+ sessionId: string;
315
+ origin: string;
316
+ }
317
+ export declare function readMemoryCaptureOptedOut(notice: {} | null | undefined): MemoryCaptureOptedOutFactsView | undefined;
318
+ export interface MemoryCaptureOptoutUnpersistedFactsView {
319
+ sessionId: string;
320
+ ingress?: string;
321
+ }
322
+ export declare function readMemoryCaptureOptoutUnpersisted(notice: {} | null | undefined): MemoryCaptureOptoutUnpersistedFactsView | undefined;
323
+ export interface PeerInboundDispositionFactsView {
324
+ disposition: string;
325
+ cause: string;
326
+ seq: number;
327
+ box: string;
328
+ fromSession?: string;
329
+ sessionId: string;
330
+ runId: string;
331
+ }
332
+ export declare function readPeerInboundDisposition(notice: {} | null | undefined): PeerInboundDispositionFactsView | undefined;
333
+ export interface PeerHeldSettledFactsView {
334
+ settlement: string;
335
+ reason: string;
336
+ seq: number;
337
+ box: string;
338
+ fromSession?: string;
339
+ heldCount: number;
340
+ sessionId: string;
341
+ runId: string;
342
+ }
343
+ export declare function readPeerHeldSettled(notice: {} | null | undefined): PeerHeldSettledFactsView | undefined;
344
+ export interface PeerIdleSubscriptionFactsView {
345
+ outcome: string;
346
+ fromSession: string;
347
+ live?: number;
348
+ seq: number;
349
+ box: string;
350
+ sessionId: string;
351
+ runId: string;
352
+ }
353
+ export declare function readPeerIdleSubscription(notice: {} | null | undefined): PeerIdleSubscriptionFactsView | undefined;
354
+ export interface ClassifierDenialLimitFactsView {
355
+ sessionId: string;
356
+ runId: string;
357
+ toolName: string;
358
+ toolCallId: string;
359
+ consecutive: number;
360
+ total: number;
361
+ limit: string;
362
+ }
363
+ export declare function readClassifierDenialLimit(notice: {} | null | undefined): ClassifierDenialLimitFactsView | undefined;
364
+ export interface TaskLateApprovalFactsView {
365
+ toolName: string;
366
+ toolCallId: string;
367
+ sessionId: string;
368
+ runId: string;
369
+ taskId?: string;
370
+ }
371
+ export declare function readTaskLateApproval(notice: {} | null | undefined): TaskLateApprovalFactsView | undefined;
372
+ export interface TaskHaltUnconsumedFactsView {
373
+ sessionId: string;
374
+ runId: string;
375
+ taskId?: string;
376
+ }
377
+ export declare function readTaskHaltUnconsumed(notice: {} | null | undefined): TaskHaltUnconsumedFactsView | undefined;
378
+ export interface SteeringParkedInputBlockedFactsView {
379
+ inputId?: string;
380
+ sessionId: string;
381
+ runId: string;
382
+ taskId?: string;
383
+ }
384
+ export declare function readSteeringParkedInputBlocked(notice: {} | null | undefined): SteeringParkedInputBlockedFactsView | undefined;
385
+ export declare function memorySessionPollutedSentence(facts: Pick<MemorySessionPollutedFactsView, 'reason'>, lang?: UiLanguage): string | undefined;
386
+ export declare function memoryHarvestQuarantinedSentence(facts: Pick<MemoryHarvestQuarantinedFactsView, 'count' | 'moved' | 'escalated' | 'indexRolledBack'>, lang?: UiLanguage): string | undefined;
387
+ export declare function memoryDelegationStaticMarkWaivedSentence(facts: Pick<MemoryDelegationStaticMarkWaivedFactsView, 'reason' | 'subagentType'>, lang?: UiLanguage): string | undefined;
388
+ export declare function memoryCaptureOptedOutSentence(facts: Pick<MemoryCaptureOptedOutFactsView, 'origin'>, lang?: UiLanguage): string | undefined;
389
+ export declare function memoryCaptureOptoutUnpersistedSentence(facts: Pick<MemoryCaptureOptoutUnpersistedFactsView, 'sessionId' | 'ingress'>, lang?: UiLanguage): string | undefined;
390
+ export declare function peerInboundDispositionSentence(facts: Pick<PeerInboundDispositionFactsView, 'disposition' | 'cause' | 'seq' | 'fromSession'>, lang?: UiLanguage): string | undefined;
391
+ export declare function peerHeldSettledSentence(facts: Pick<PeerHeldSettledFactsView, 'settlement' | 'reason' | 'seq' | 'fromSession' | 'heldCount'>, lang?: UiLanguage): string | undefined;
392
+ export declare function peerIdleSubscriptionSentence(facts: Pick<PeerIdleSubscriptionFactsView, 'outcome' | 'fromSession' | 'live'>, lang?: UiLanguage): string | undefined;
393
+ export declare function classifierDenialLimitSentence(facts: Pick<ClassifierDenialLimitFactsView, 'toolName' | 'consecutive' | 'total' | 'limit'>, lang?: UiLanguage): string | undefined;
394
+ export declare function taskLateApprovalSentence(facts: Pick<TaskLateApprovalFactsView, 'toolName'>, lang?: UiLanguage): string | undefined;
395
+ export declare function taskHaltUnconsumedSentence(facts: Pick<TaskHaltUnconsumedFactsView, 'sessionId' | 'runId'>, lang?: UiLanguage): string | undefined;
396
+ export declare function steeringParkedInputBlockedSentence(facts: Pick<SteeringParkedInputBlockedFactsView, 'sessionId' | 'runId'>, lang?: UiLanguage): string | undefined;
397
+ export declare function modelCapabilityDowngradedSentence(facts: Pick<ModelCapabilityDowngradedFactsView, 'model' | 'capability' | 'status'>, lang?: UiLanguage): string | undefined;
398
+ export declare function durableGateUnavailableSentence(facts: Pick<DurableGateUnavailableFactsView, 'source' | 'cause' | 'liveApprover' | 'liveQuestionFace'>, lang?: UiLanguage): string | undefined;
399
+ export type DiscardedDeliveryPathWord = (typeof CORE_DISCARDED_DELIVERY_PATHS)[number];
400
+ export interface DeliveryDiscardedFactsView {
401
+ taskId: string;
402
+ taskType: string;
403
+ sessionId: string;
404
+ path?: DiscardedDeliveryPathWord;
405
+ }
406
+ export declare function readDeliveryDiscarded(notice: {} | null | undefined): DeliveryDiscardedFactsView | undefined;
407
+ export interface ModelCapabilityDowngradedFactsView {
408
+ model: string;
409
+ capability: string;
410
+ status: string;
411
+ sessionId: string;
412
+ runId: string;
413
+ }
414
+ export declare function readModelCapabilityDowngraded(notice: {} | null | undefined): ModelCapabilityDowngradedFactsView | undefined;
291
415
  export declare const ENGINE_NOTICE_FACT_READERS: Readonly<{
292
416
  readonly 'mcp.injection_dropped': typeof readMcpInjectionDrop;
293
417
  readonly 'delegation.ask_unresolvable': typeof readAskUnresolvable;
@@ -316,6 +440,20 @@ export declare const ENGINE_NOTICE_FACT_READERS: Readonly<{
316
440
  readonly 'context.media_removed': typeof readContextMediaRemoved;
317
441
  readonly 'context.image_removed': typeof readContextMediaRemoved;
318
442
  readonly 'session.lineage_rerooted': typeof readSessionLineageRerooted;
443
+ readonly 'memory.session_polluted': typeof readMemorySessionPolluted;
444
+ readonly 'memory.harvest_quarantined': typeof readMemoryHarvestQuarantined;
445
+ readonly 'memory.delegation_static_mark_waived': typeof readMemoryDelegationStaticMarkWaived;
446
+ readonly 'memory.capture_opted_out': typeof readMemoryCaptureOptedOut;
447
+ readonly 'memory.capture_optout_unpersisted': typeof readMemoryCaptureOptoutUnpersisted;
448
+ readonly 'peer.inbound_disposition': typeof readPeerInboundDisposition;
449
+ readonly 'peer.held_settled': typeof readPeerHeldSettled;
450
+ readonly 'peer.idle_subscription': typeof readPeerIdleSubscription;
451
+ readonly 'classifier.denial_limit': typeof readClassifierDenialLimit;
452
+ readonly 'task.late_approval': typeof readTaskLateApproval;
453
+ readonly 'task.halt_unconsumed': typeof readTaskHaltUnconsumed;
454
+ readonly 'steering.parked_input_blocked': typeof readSteeringParkedInputBlocked;
455
+ readonly 'delegation.delivery_discarded': typeof readDeliveryDiscarded;
456
+ readonly 'model.capability_downgraded': typeof readModelCapabilityDowngraded;
319
457
  }>;
320
458
  type FactReaderTable = typeof ENGINE_NOTICE_FACT_READERS;
321
459
  export type EngineNoticeFactsCode = keyof FactReaderTable;