@sema-agent/client-core 0.109.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.
- package/CHANGELOG.md +173 -0
- package/README.md +46 -22
- package/dist/adapt/arms.js +20 -7
- package/dist/adapter/downstream/eventToSdkMessage.js +11 -6
- package/dist/declared/supportFloorDeclared.js +1 -1
- package/dist/displayUntrusted.js +132 -14
- package/dist/engineErrorCodes.d.ts +3 -0
- package/dist/engineErrorCodes.js +3 -0
- package/dist/engineHealthFacts.d.ts +9 -0
- package/dist/engineHealthFacts.js +21 -1
- package/dist/engineInlineTaskStats.d.ts +4 -3
- package/dist/engineInlineTaskStats.js +18 -2
- package/dist/engineNoticeCodes.d.ts +10 -0
- package/dist/engineNoticeCodes.js +33 -1
- package/dist/engineRepoint.d.ts +140 -0
- package/dist/engineRepoint.js +285 -0
- package/dist/engineRowRef.js +2 -0
- package/dist/engineSessionMessages.d.ts +2 -1
- package/dist/engineSessionMessages.js +5 -0
- package/dist/errorSupplementRoles.js +2 -1
- package/dist/fleet/fleetProjection.js +3 -2
- package/dist/generated/engineFactTables.d.ts +2 -0
- package/dist/generated/engineFactTables.js +12 -0
- package/dist/generated/sdkFactTables.d.ts +1 -0
- package/dist/generated/sdkFactTables.js +4 -0
- package/dist/hitl/approvalAskers.d.ts +6 -0
- package/dist/hitl/approvalAskers.js +30 -0
- package/dist/hitl/approvalCardReasons.js +6 -3
- package/dist/hitl/approvalRequestFrameReading.d.ts +7 -0
- package/dist/hitl/approvalRequestFrameReading.js +11 -0
- package/dist/hitl/approvalResolution.d.ts +8 -1
- package/dist/hitl/approvalResolution.js +4 -0
- package/dist/hitl/askGateWire.js +0 -2
- package/dist/hitl/automaticAnswerVerdict.js +2 -2
- package/dist/hitl/decisionConflict.js +6 -3
- package/dist/hitl/decisionRefusal.js +1 -0
- package/dist/hitl/decisionSend.d.ts +3 -0
- package/dist/hitl/decisionSend.js +29 -11
- package/dist/hitl/editedApprovalAcceptance.d.ts +25 -0
- package/dist/hitl/editedApprovalAcceptance.js +26 -0
- package/dist/hitl/frameRouter.js +4 -18
- package/dist/hitl/gateLedger.d.ts +0 -4
- package/dist/hitl/gateLedger.js +0 -19
- package/dist/hitl/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +4 -4
- package/dist/hitl/hitlHostSurface.d.ts +1 -0
- package/dist/hitl/hitlHostSurface.js +7 -2
- package/dist/hitl/hostWithdrawal.d.ts +15 -0
- package/dist/hitl/hostWithdrawal.js +38 -0
- package/dist/hitl/parkResolver.js +25 -9
- package/dist/hitl/persistedRulesWire.js +2 -2
- package/dist/hitl/planReviewWire.js +14 -4
- package/dist/hitl/sessionPolicyWire.js +6 -4
- package/dist/hitl/standingRows.d.ts +1 -0
- package/dist/hitl/standingRows.js +15 -1
- package/dist/hitl/toolApprovalWire.d.ts +35 -8
- package/dist/hitl/toolApprovalWire.js +235 -33
- package/dist/hooksWireCaps.js +31 -1
- package/dist/hostTurnSettings.d.ts +10 -4
- package/dist/hostTurnSettings.js +112 -5
- package/dist/i18n/messages.en.d.ts +83 -0
- package/dist/i18n/messages.en.js +86 -2
- package/dist/i18n/messages.zh.js +96 -2
- package/dist/index.d.ts +21 -7
- package/dist/index.js +14 -4
- package/dist/inheritEnvCapability.js +2 -0
- package/dist/inputAuthor.d.ts +16 -0
- package/dist/inputAuthor.js +44 -0
- package/dist/interruptRefusalNote.d.ts +2 -0
- package/dist/interruptRefusalNote.js +17 -0
- package/dist/liveModelCatalog.d.ts +2 -0
- package/dist/liveModelCatalog.js +21 -7
- package/dist/liveQuestionStore.d.ts +4 -1
- package/dist/liveQuestionStore.js +12 -3
- package/dist/mcpEngineLeg.d.ts +3 -0
- package/dist/mcpEngineLeg.js +38 -1
- package/dist/mcpPanel.js +2 -0
- package/dist/mcpReconnect.d.ts +9 -1
- package/dist/mcpReconnect.js +121 -16
- package/dist/modelCapabilityProbe.js +4 -3
- package/dist/modsFace.d.ts +8 -1
- package/dist/modsFace.js +27 -0
- package/dist/notifications.d.ts +17 -6
- package/dist/notifications.js +67 -19
- package/dist/ownKey.d.ts +0 -5
- package/dist/ownKey.js +0 -7
- package/dist/peerFrames.d.ts +40 -2
- package/dist/peerFrames.js +158 -3
- package/dist/pluginHooksWire.d.ts +2 -1
- package/dist/pluginHooksWire.js +56 -1
- package/dist/replayBody.js +10 -2
- package/dist/request/taskRequest.d.ts +5 -0
- package/dist/request/taskRequest.js +138 -21
- package/dist/resumeRefusalCopy.d.ts +1 -3
- package/dist/resumeRefusalCopy.js +2 -1
- package/dist/retryStatus.d.ts +2 -2
- package/dist/retryStatus.js +2 -0
- package/dist/seam.d.ts +12 -1
- package/dist/seam.js +7 -1
- package/dist/seatContract.d.ts +86 -9
- package/dist/seatContract.js +196 -7
- package/dist/sessionBackground.js +2 -1
- package/dist/sessionBackgroundHandoff.js +2 -1
- package/dist/sessionEngine.d.ts +2 -0
- package/dist/sessionEngine.js +111 -0
- package/dist/sessionMemoryStatus.d.ts +2 -1
- package/dist/sessionSyncFileHistory.d.ts +4 -0
- package/dist/sessionSyncFileHistory.js +28 -0
- package/dist/sseIdleTriage.d.ts +13 -1
- package/dist/sseIdleTriage.js +24 -6
- package/dist/subagent/engineSubagentTail.js +6 -0
- package/dist/terminalStatuses.d.ts +1 -0
- package/dist/terminalStatuses.js +4 -1
- package/dist/turnFailurePresentation.js +9 -2
- package/dist/typePins.d.ts +11 -0
- package/dist/usageAnalytics.d.ts +17 -0
- package/dist/usageAnalytics.js +44 -2
- package/dist/wireFailureShape.d.ts +2 -5
- package/dist/wireFailureShape.js +10 -20
- package/dist/wireRefusalCopy.d.ts +10 -0
- package/dist/wireRefusalCopy.js +76 -0
- package/docs/INTEGRATION-CLIENTS.md +2126 -20
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './seam.js';
|
|
2
2
|
export * from './workflow.js';
|
|
3
|
-
export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort,
|
|
4
|
-
export type { EngineWorkflowCompletion, GoalHookNotice, HookEntryType, HookFailureNotice, HookFailureReason, HookFailureVerdict, HookNoticeReason, HookNoticeVerdict, HookNoticeWire, NotificationDropCounters, NotificationQueuePort, QueuedCommandLike, TaskNotificationFields, TaskNotificationXmlRead, TranscriptNotificationSeeds, } from './notifications.js';
|
|
3
|
+
export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort, installWorkflowRunReader, isEngineWorkflowNotified, isHookNoticeFrame, isOwnWorkflowRun, isTaskNotificationObjective, isWorkflowCompletionCardEnqueued, listOwnWorkflowRuns, markEngineWorkflowNotified, normalizeTaskNotification, noteOwnWorkflowRun, noteWorkflowCompletionCardEnqueued, notificationDropCounters, notificationQueuePortMisses, outstandingAbandonedCount, outstandingBgTaskPrompt, outstandingDeliverableWorkflowCount, outstandingWorkflowCount, parseTranscriptNotificationSeeds, readTaskNotificationXml, registerOutstandingBgTask, registerOutstandingWorkflowRun, renderTaskNotificationXml, splitApiErrorSupplement, subscribeOutstandingWorkflows, TASK_NOTIFICATION_TAG, taskNotificationDedupKey, taskNotificationDedupKeyFromWire, taskNotificationDeliverySupplement, workflowRunTerminalReadingOf, } from './notifications.js';
|
|
4
|
+
export type { EngineWorkflowCompletion, GoalHookNotice, HookEntryType, HookFailureNotice, HookFailureReason, HookFailureVerdict, HookNoticeReason, HookNoticeVerdict, HookNoticeWire, NotificationDropCounters, NotificationQueuePort, QueuedCommandLike, TaskNotificationFields, TaskNotificationXmlRead, TranscriptNotificationSeeds, WorkflowRunReader, WorkflowRunTerminalReading, } from './notifications.js';
|
|
5
5
|
export * from './peerFrames.js';
|
|
6
6
|
export * from './steering.js';
|
|
7
7
|
export type { DiagnosticsAttachment, } from './diagnostics.js';
|
|
@@ -28,6 +28,8 @@ export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './pan
|
|
|
28
28
|
export type { PanelFrame, PanelDelta, PanelRowFields, PanelReduceState } from './panelReduce.js';
|
|
29
29
|
export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
|
|
30
30
|
export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame, } from './liveQuestionStore.js';
|
|
31
|
+
export { withdrawParkQuestion, PARK_QUESTION_WITHDRAW_REFUSALS } from './hitl/hostWithdrawal.js';
|
|
32
|
+
export type { HostWithdrawal, ParkQuestionWithdrawal, ParkQuestionWithdrawRefusal } from './hitl/hostWithdrawal.js';
|
|
31
33
|
export * from './engineInlineTaskStats.js';
|
|
32
34
|
export * from './printToolResultFrame.js';
|
|
33
35
|
export * from './printModelStatus.js';
|
|
@@ -89,6 +91,7 @@ export * from './gateOutcome.js';
|
|
|
89
91
|
export * from './postureKnob.js';
|
|
90
92
|
export * from './engineIdentity.js';
|
|
91
93
|
export { readEngineHealthFacts } from './engineHealthFacts.js';
|
|
94
|
+
export { readModsDeploymentPackages, type ModsDeploymentPackagesReading } from './engineHealthFacts.js';
|
|
92
95
|
export type { EngineHealthFacts, EngineHealthCenterFacts, EngineHealthAuthFacts, EngineHealthDrainingFacts, EngineHealthLeaseFacts, EngineHealthFirstAttachFacts, EngineHealthInflightFacts } from './engineHealthFacts.js';
|
|
93
96
|
export { localEngineAnchorOf, localEnginePlanDriftOf, judgeLocalEngine, localEngineLaneOf, localEngineVerdictSentence } from './localEngineJudge.js';
|
|
94
97
|
export type { LocalEngineAnchorReading, LocalEnginePlanFingerprint, LocalEnginePlanDrift, LocalEngineAnchorPidState, LocalEngineDataRootRelation, LocalEngineJudgeInput, LocalEngineRef, LocalEngineAnchoredProcess, LocalEngineVerdict, LocalEngineUpgradePath, } from './localEngineJudge.js';
|
|
@@ -184,12 +187,15 @@ export * from './adapter/types.js';
|
|
|
184
187
|
export * from './adapter/downstream/turnUsageToModelUsage.js';
|
|
185
188
|
export * from './adapter/downstream/eventToSdkMessage.js';
|
|
186
189
|
export { MOD_LOADER_VERBS, readModRegistrationRefusedNotice, modCardSentence, modLoaderFailureSentence, type ModLoaderVerb } from './modsFace.js';
|
|
190
|
+
export { sessionModsOf } from './modsFace.js';
|
|
191
|
+
export { approvalRequestedBySentence } from './modsFace.js';
|
|
187
192
|
export { modRowsOf } from './adapter/downstream/wiringManifestView.js';
|
|
188
193
|
export type { WiringManifestView, WiringManifestSections, WiringManifestFleetView } from './adapter/downstream/wiringManifestView.js';
|
|
189
194
|
export { wiringFleetDoctorDetail } from './wiringFleetDoctor.js';
|
|
190
195
|
export * from './adapter/downstream/terminalToSdkResult.js';
|
|
191
196
|
export { resultErrorCodeOf, resultSelectedModelOf, resultSalvagedResultOf, resultParkFailedReasonOf } from './resultFrameKeys.js';
|
|
192
197
|
export * from './adapter/runStream.js';
|
|
198
|
+
export { runBlockedText } from './promptBlockedCopy.js';
|
|
193
199
|
export { SEMA_ROW_KIND_KEY, SEMA_ROW_KINDS, rowKindOf, isSyntheticRow, inferLegacyRowKind } from './rowKind.js';
|
|
194
200
|
export type { SemaRowKind } from './rowKind.js';
|
|
195
201
|
export { classifySubmitFailure } from './submitFailure.js';
|
|
@@ -301,7 +307,7 @@ export * from './detachWire.js';
|
|
|
301
307
|
export * from './workflowMonitor.js';
|
|
302
308
|
export * from './workflowClient.js';
|
|
303
309
|
export * from './hooksWireCaps.js';
|
|
304
|
-
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, userPromptSubmitExecutorOf, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, type SettingsHooksSalvageRow, type SettingsLayerWithheldRow, type PluginHookModuleVerdict, type SessionHookVerdict, } from './pluginHooksWire.js';
|
|
310
|
+
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, pluginHooksKeptLocally, userPromptSubmitExecutorOf, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, type SettingsHooksSalvageRow, type SettingsLayerWithheldRow, type PluginHookModuleVerdict, type SessionHookVerdict, } from './pluginHooksWire.js';
|
|
305
311
|
export { HTTP_POLICY_DROP_REASONS, type HttpPolicyDropReason, type HttpPolicyDropRow } from './httpHookPolicy.js';
|
|
306
312
|
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, type HooksSalvage, type HooksSalvageDrop, type HooksSalvageRejection, type HooksSalvageOutcome, type HooksSalvageDropCode, type HooksSalvageRejectionCode, } from './settingsHooksSalvage.js';
|
|
307
313
|
export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, type HostSuppliedKey, type HostSettingCause, type HostSettingDisposition, type HostSettingPlane, type HostSettingNoticeId, type HostSettingRow, type HostSettingNotice, type HostTurnVerdict, type HostTurnSettingsSources, type HostWebSearchSource, type HostMemorySource, type HostTurnSettingsInput, type HostSettingsCarried, type HostTurnSettings, type HooksPlanFacts, type HostOutputStyleSource, type HostOutputStyleBody, type HostOutputStyleFacts, type HostSettingsSession, type HostSettingsHeld, type HostSettingsAcceptConfirmation, type HostPermissionFacts, hostSettingsConsent, hostSettingsAcceptCurrent, } from './hostTurnSettings.js';
|
|
@@ -320,18 +326,21 @@ export * from './model/providerPresets.js';
|
|
|
320
326
|
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
321
327
|
export type { ActiveGate, ApprovalsResourceLike, AskAnswer, AssistantResourceLike, DecideOperationEnd, DecideOperationEvent, DecideOperationIdentity, DecideOperationObserver, DecideOperationSpan, DecideOperationStart, FindPendingOutcome, GateCurrentPending, GatePrompt, HitlBackendDenyDecision, HitlBridgeOptions, HitlCanUseToolFn, HitlClientLike, HitlDecideDenyOutcome, HitlPermissionDecisionLike, HitlSafetyCode, PlanReviewModeAfter, PlanReviewOutcome, } from './hitl/hitlBridge.js';
|
|
322
328
|
export * from './hitl/suspendedReopen.js';
|
|
323
|
-
export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, type ApprovalResolution, type ApprovalResolutionDecided, type ApprovalResolutionNotSent, type ApprovalResolutionUnsettled, type ApprovalResolutionLane, type ApprovalNotSentCause, type ApprovalUnsettledCause, type ApprovalDenyFacts, } from './hitl/approvalResolution.js';
|
|
329
|
+
export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, type ApprovalResolution, type ApprovalResolutionDecided, type ApprovalResolutionNotSent, type ApprovalResolutionUnsettled, type ApprovalResolutionLane, type ApprovalNotSentCause, type ApprovalUnsettledCause, type ApprovalDenyFacts, type ToolPermissionSettledElsewhere, } from './hitl/approvalResolution.js';
|
|
330
|
+
export { editedApprovalAcceptanceOf, editedApprovalRefusedLine, EDITED_APPROVAL_STATES, EDITED_APPROVAL_BASES } from './hitl/editedApprovalAcceptance.js';
|
|
331
|
+
export type { EditedApprovalAcceptance, EditedApprovalState } from './hitl/editedApprovalAcceptance.js';
|
|
324
332
|
export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
|
|
325
333
|
export { toolEndOutputText } from './toolResultContent.js';
|
|
326
334
|
export { toolOutputMediaAbsenceOf, toolOutputMediaAbsenceSentence } from './toolResultContent.js';
|
|
327
335
|
export type { ToolOutputMediaAbsence } from './toolResultContent.js';
|
|
328
336
|
export { _resetHitlHostSurfaceForTest, APPROVAL_PARKING_WARN_TEXT, approvalParkingNoticeText, CANCEL_DENY_BUDGET_MS, CANCEL_DENY_WARN_TEXT, EDIT_NOT_FORWARDED_WARN_TEXT, EDIT_REFUSED_ON_BLIND_ASK_WARN_TEXT, hitlHostSurfaceFor, hitlHostSurfaceMisses, hitlHostSurfaceMissesFor, installHitlHostSurface, installHitlHostSurfaceFor, observeCancelByDeny, REMEMBER_NOT_APPLIED_WARN_TEXT, REPLAYED_APPROVAL_LIST_UNREADABLE_WARN_TEXT, RULE_NOT_SENT_REJECTED_WARN_TEXT, RULE_NOT_SENT_WARN_TEXT, surfaceEditRefusedOnBlindAsk, surfaceForCurrentSession, surfaceRememberNotApplied, } from './hitl/hitlHostSurface.js';
|
|
329
337
|
export type { ClassifierDenyContext, HitlHostSurface, HitlNotice, } from './hitl/hitlHostSurface.js';
|
|
330
|
-
export { APPROVAL_DENY_SETTLED_BY_WORDS, ASK_ORIGIN_WORDS, RESPOND_DECISIONS, RETRACTED_CARD_DECISION_KIND, RULE_OFFERS_ABSENCE_REASONS, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_MATCHES, RULE_OFFER_UNCOVERED_REASONS, TOOL_APPROVAL_FRAME_KEYS_MIRROR, __resetSettledApprovalsForTests, _resetApprovalCardPortForTest, answerCarriage, answerPayloadFor, approvalBoundGrantsDetail, approvalCardFactsOfFrame, approvalCardFactsOfGeneric, approvalCardFactsOfV1, approvalCardFactsOfV1Frame, approvalCardPortFor, approvalCardPortMisses, approvalCardPortMissesFor, approvalIsMandated, approvalPriorCardsDetail, approvalSupersedesDetail, askProbeReasonDetail, claimApprovalCard, classifierNoRulingDetail, decisionAttributionKeyOf, hasApprovalCardPort, hasApprovalCardPortFor, installApprovalCardPort, installApprovalCardPortFor, isFromSubagent, isToolApprovalFrame, isToolApprovalGate, isToolApprovalRespondReplayed, joinApprovalHolder, observeApprovalAnswerCommitted, readApprovalBoundGrants, readApprovalCardWord, readApprovalClassifierNoRuling, readApprovalDenySettledBy, readApprovalMandate, readApprovalRememberRefused, readBoundGrantEntry, readDenialLimitFallback, readRuleOfferSupply, readRuleOffers, readToolApprovalRespondAck, readToolApprovalRespondParking, rememberRefusalOf, structurallyEqual, surfaceApprovalCard, surfaceFsApprovalAndDecide, surfaceToolApprovalFrameAndRespond, toolNameIsFsWrite, toolNameIsShellExec, toolPermissionRequestAskBits } from './hitl/toolApprovalWire.js';
|
|
331
|
-
export type { AnswerCarriage, AnswerPayloadCaps, AnswerPayloadLane, ApprovalAnswerCommitted, ApprovalAskReason, ApprovalAskReasonByHook, ApprovalAskReasonByPolicy, ApprovalCardAllowDecision, ApprovalCardClaim, ApprovalCardClaimOptions, ApprovalCardDecision, ApprovalCardDenyDecision, ApprovalCardFacts, ApprovalCardFrameFactsOptions, ApprovalCardParkRow, ApprovalCardPort, ApprovalCardRequest, ApprovalCardSupersedes, ApprovalCardV1Facts, ApprovalDenySettledBy, ApprovalGrantBinding, ApprovalHolderIdentity, ApprovalHolderJoin, ApprovalMandatedFacts, ApprovalPriorCard, AskOrigin, BoundGrantEntryReading, BoundSkillGrantsWire, DecideAnswerPayload, DecideApprovePayload, DecideDenyPayload, DenialLimitFallback, DenialLimitKind, FsApprovalWireDeps, HostApprovalCardHold, PersistedRuleAnchor, ReadRootCandidateView, RememberRefusalCode, RespondAnswerPayload, RespondToolApprovalFn, RespondToolApprovalOpts, RuleOfferBatchMember, RuleOfferMatch, RuleOfferReading, RuleOfferUncoveredDetail, RuleOfferUncoveredReason, RuleOffersAbsence, ToolApprovalDelegation, ToolApprovalFrame, ToolApprovalFrameLaneOpts, ToolApprovalGateLike, ToolApprovalParkingBodyReading, ToolApprovalRespondAckView, ToolApprovalRespondDecision, ToolApprovalRespondParkingView } from './hitl/toolApprovalWire.js';
|
|
338
|
+
export { APPROVAL_DENY_SETTLED_BY_WORDS, ASK_ORIGIN_WORDS, RESPOND_DECISIONS, RETRACTED_CARD_DECISION_KIND, RULE_OFFERS_ABSENCE_REASONS, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_MATCHES, RULE_OFFER_UNCOVERED_REASONS, TOOL_APPROVAL_FRAME_KEYS_MIRROR, WITHDRAWN_CARD_DECISION_KIND, __resetSettledApprovalsForTests, _resetApprovalCardPortForTest, allowNoteNotCarriedSentence, answerCarriage, answerPayloadFor, approvalBoundGrantsDetail, approvalCardFactsOfFrame, approvalCardFactsOfGeneric, approvalCardFactsOfV1, approvalCardFactsOfV1Frame, approvalCardPortFor, approvalCardPortMisses, approvalCardPortMissesFor, approvalIsMandated, approvalPriorCardsDetail, approvalSupersedesDetail, askProbeReasonDetail, claimApprovalCard, classifierNoRulingDetail, decisionAttributionKeyOf, hasApprovalCardPort, hasApprovalCardPortFor, installApprovalCardPort, installApprovalCardPortFor, isFromSubagent, isToolApprovalFrame, isToolApprovalGate, isToolApprovalRespondParkedRedeemed, isToolApprovalRespondReplayed, joinApprovalHolder, observeApprovalAnswerCommitted, readApprovalBoundGrants, readApprovalCardWord, readApprovalClassifierNoRuling, readApprovalDenySettledBy, readApprovalMandate, readApprovalRememberRefused, readBoundGrantEntry, readDenialLimitFallback, readRuleOfferSupply, readRuleOffers, readToolApprovalRespondAck, readToolApprovalRespondParking, rememberRefusalOf, structurallyEqual, surfaceApprovalCard, surfaceFsApprovalAndDecide, surfaceToolApprovalFrameAndRespond, toolNameIsFsWrite, toolNameIsShellExec, toolPermissionRequestAskBits } from './hitl/toolApprovalWire.js';
|
|
339
|
+
export type { AnswerCarriage, AnswerPayloadCaps, AnswerPayloadLane, ApprovalAnswerCommitted, ApprovalAskReason, ApprovalAskReasonByHook, ApprovalAskReasonByPolicy, ApprovalCardAllowDecision, ApprovalCardClaim, ApprovalCardClaimOptions, ApprovalCardDecision, ApprovalCardDenyDecision, ApprovalCardFacts, ApprovalCardFrameFactsOptions, ApprovalCardParkRow, ApprovalCardPort, ApprovalCardRequest, ApprovalCardSupersedes, ApprovalCardV1Facts, ApprovalDenySettledBy, ApprovalGrantBinding, ApprovalHolderIdentity, ApprovalHolderJoin, ApprovalInputSource, ApprovalMandatedFacts, ApprovalPriorCard, ApprovalRequestedBy, AskOrigin, BoundGrantEntryReading, BoundSkillGrantsWire, DecideAnswerPayload, DecideApprovePayload, DecideDenyPayload, DenialLimitFallback, DenialLimitKind, FsApprovalWireDeps, HostApprovalCardHold, PersistedRuleAnchor, ReadRootCandidateView, RememberRefusalCode, RespondAnswerPayload, RespondToolApprovalFn, RespondToolApprovalOpts, RuleOfferBatchMember, RuleOfferMatch, RuleOfferReading, RuleOfferUncoveredDetail, RuleOfferUncoveredReason, RuleOffersAbsence, ToolApprovalDelegation, ToolApprovalFrame, ToolApprovalFrameLaneOpts, ToolApprovalGateLike, ToolApprovalParkingBodyReading, ToolApprovalRespondAckView, ToolApprovalRespondDecision, ToolApprovalRespondParkingView, ToolApprovalRespondRedeemedView } from './hitl/toolApprovalWire.js';
|
|
332
340
|
export * from './hitl/approvalCardReading.js';
|
|
333
341
|
export * from './hitl/approvalCardReasons.js';
|
|
334
342
|
export { approvalRequestFrameReadingOf, APPROVAL_REQUEST_FRAME_UNREADABLE_WHYS } from './hitl/approvalRequestFrameReading.js';
|
|
343
|
+
export { approvalAskReasonsOf } from './hitl/approvalAskers.js';
|
|
335
344
|
export type { ApprovalRequestFrameReading, ApprovalRequestFrameUnreadableWhy } from './hitl/approvalRequestFrameReading.js';
|
|
336
345
|
export { askClassReasonOf, askClassReasonsOf } from './hitl/askClassPair.js';
|
|
337
346
|
export type { AskClassReasonRow } from './hitl/askClassPair.js';
|
|
@@ -350,7 +359,7 @@ export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
|
|
|
350
359
|
export { ASK_PARK_AUTO_REOPEN_BLOCKS, askParkAutoReopenBlockedContent, askParkAutoReopenBlockOf, askParkRefusalBlockOf, claimAskParkAutoReopenBlockNotice, clearAskParkAutoReopenBlocks, } from './hitl/askParkAutoReopenBlock.js';
|
|
351
360
|
export type { AskParkAutoReopenBlock, AskParkAutoReopenBlockNotice, AskParkGate } from './hitl/askParkAutoReopenBlock.js';
|
|
352
361
|
export type { DecisionIdentity } from './hitl/decisionLedger.js';
|
|
353
|
-
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, hitlDecisionOutcomeContent, } from './hitl/decisionSend.js';
|
|
362
|
+
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, hitlDecisionOutcomeContent, toolPermissionSettledLine, } from './hitl/decisionSend.js';
|
|
354
363
|
export type { HitlApprovalDecisionRequest, HitlAskDecisionRequest, HitlDecisionApplied, HitlDecisionFamily, HitlDecisionGate, HitlDecisionNotApplied, HitlDecisionNotAppliedCause, HitlDecisionNotSent, HitlDecisionNotSentCause, HitlDecisionSendClient, HitlDecisionSendDeps, HitlDecisionSendOutcome, HitlDecisionSendRequest, HitlDecisionSettledElsewhere, HitlDecisionUnconfirmed, HitlDecisionUnconfirmedCause, HitlElicitationDecisionRequest, } from './hitl/decisionSend.js';
|
|
355
364
|
export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
|
|
356
365
|
export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
|
|
@@ -395,6 +404,7 @@ export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
|
|
395
404
|
export * from './hitl/askSettlementLine.js';
|
|
396
405
|
export * from './interactiveHalt.js';
|
|
397
406
|
export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
|
|
407
|
+
export { interruptRefusalNote } from './interruptRefusalNote.js';
|
|
398
408
|
export type { InteractiveInterruptRuns, InteractiveInterruptOptions } from './interactiveInterrupt.js';
|
|
399
409
|
export { readSessionBackgroundable, projectSessionBackgroundable, interactiveEngineWire, retireInteractiveEngineWire, interactiveDetachPosture, streamInteractiveRun, backgroundHandoffEligibility, backgroundHandoffSentence, interactiveStopFacts, } from './sessionBackground.js';
|
|
400
410
|
export type { SessionBackgroundableReading, InteractiveEngineLane, InteractiveEngineWireInit, InteractiveEngineWire, InteractiveOpeningInput, InteractiveDetachPostureReason, InteractiveDetachPosture, InteractiveStreamOptions, BackgroundHandoffVerdict, BackgroundHandoffRefusal, BackgroundHandoffUnknown, InteractiveStopFacts, } from './sessionBackground.js';
|
|
@@ -496,3 +506,7 @@ export { sessionEngineBindingFor, commitSessionEngine, readSessionEngine, sessio
|
|
|
496
506
|
export type { SessionEngineKind, SessionEngineIdentityKind, SessionEngineBindingInput, SessionEngineRowInput, SessionEngineBindingFailure, SessionEngineSelfPresentation, SessionEngineDeclaredPresentation, SessionEngineAddressPresentation, SessionEngineBindingOk, SessionEngineSelfBinding, SessionEngineDeclaredBinding, SessionEngineAddressBinding, SessionEngineBinding, SessionEngineAssignment, SessionEngineView, SessionEngineSelfView, SessionEngineDeclaredView, SessionEngineAddressView, SessionEngineReading, SessionEngineBoundReading, SessionEngineSessionRef, SessionEngineCommitRequest, SessionEngineRecoverRequest, SessionEngineUnresolvedReason, SessionEngineCommitResult, SessionEngineCommitted, SessionEngineWiring, SessionDispatchRefusal, SessionDispatchDecision, SessionDispatchUrlTarget, SessionDispatchRefused, } from './sessionEngine.js';
|
|
497
507
|
export { foldSessionPlacement } from './deviceRebind.js';
|
|
498
508
|
export type { SessionPlacementView } from './deviceRebind.js';
|
|
509
|
+
export { repointEngine, deviceHelloReadingOf, engineRepointVerdictOf, engineRepointMessageOf } from './engineRepoint.js';
|
|
510
|
+
export type { DeviceHelloRejectWord, DeviceHelloReading, EngineRepointInput, EngineRepointHandshakeTarget, EngineRepointHandshakePort, EngineRepointRoster, EngineRepointRecordReading, EngineRepointRecordPresent, EngineRepointMoveResult, EngineRepointRecordPort, EngineRepointSessionsPort, EngineRepointPorts, EngineRepointProofState, EngineRepointHandshakeProof, EngineRepointRosterProof, EngineRepointProofs, EngineRepointVerdict, EngineRepointExit, EngineRepointSessionTally, EngineRepointRefusal, EngineRepointResult, EngineRepointDone, EngineRepointPartial, EngineRepointUnverified, EngineRepointUndetermined, EngineRepointStoreFailed, EngineRepointRefused, } from './engineRepoint.js';
|
|
511
|
+
export { repointSessionEngine } from './sessionEngine.js';
|
|
512
|
+
export type { SessionEngineRepointResult } from './sessionEngine.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './seam.js';
|
|
2
2
|
export * from './workflow.js';
|
|
3
|
-
export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort,
|
|
3
|
+
export { _resetEngineTaskNotificationForTest, _resetNotificationQueuePortForTest, _setWatcherTimingForTest, _tickWatchOnceForTest, classifyHookFailureFrame, classifyHookNoticeFrame, deriveNotificationResidualLines, dropQueuedNotificationsForRun, enqueueBgChildNotification, enqueueEngineWorkflowNotification, enqueuePlanReviewOutcome, HOOK_NOTICE_WARN_PREFIX, hookNoticeLastCheckText, installBgTaskStatusProbe, installNotificationQueuePort, installWorkflowRunReader, isEngineWorkflowNotified, isHookNoticeFrame, isOwnWorkflowRun, isTaskNotificationObjective, isWorkflowCompletionCardEnqueued, listOwnWorkflowRuns, markEngineWorkflowNotified, normalizeTaskNotification, noteOwnWorkflowRun, noteWorkflowCompletionCardEnqueued, notificationDropCounters, notificationQueuePortMisses, outstandingAbandonedCount, outstandingBgTaskPrompt, outstandingDeliverableWorkflowCount, outstandingWorkflowCount, parseTranscriptNotificationSeeds, readTaskNotificationXml, registerOutstandingBgTask, registerOutstandingWorkflowRun, renderTaskNotificationXml, splitApiErrorSupplement, subscribeOutstandingWorkflows, TASK_NOTIFICATION_TAG, taskNotificationDedupKey, taskNotificationDedupKeyFromWire, taskNotificationDeliverySupplement, workflowRunTerminalReadingOf, } from './notifications.js';
|
|
4
4
|
export * from './peerFrames.js';
|
|
5
5
|
export * from './steering.js';
|
|
6
6
|
export * from './retryStatus.js';
|
|
@@ -21,6 +21,7 @@ export * from './engineAgentAbsence.js';
|
|
|
21
21
|
export * from './fleetAgentPanelProjection.js';
|
|
22
22
|
export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './panelReduce.js';
|
|
23
23
|
export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
|
|
24
|
+
export { withdrawParkQuestion, PARK_QUESTION_WITHDRAW_REFUSALS } from './hitl/hostWithdrawal.js';
|
|
24
25
|
export * from './engineInlineTaskStats.js';
|
|
25
26
|
export * from './printToolResultFrame.js';
|
|
26
27
|
export * from './printModelStatus.js';
|
|
@@ -76,6 +77,7 @@ export * from './gateOutcome.js';
|
|
|
76
77
|
export * from './postureKnob.js';
|
|
77
78
|
export * from './engineIdentity.js';
|
|
78
79
|
export { readEngineHealthFacts } from './engineHealthFacts.js';
|
|
80
|
+
export { readModsDeploymentPackages } from './engineHealthFacts.js';
|
|
79
81
|
export { localEngineAnchorOf, localEnginePlanDriftOf, judgeLocalEngine, localEngineLaneOf, localEngineVerdictSentence } from './localEngineJudge.js';
|
|
80
82
|
export { countClientRegistry, fleetBackgroundLiveOf, localEngineSelfOf, localEngineRegistryStatusOf, localEngineIdle, localEngineDemandOf, localEngineExitFate, localEngineExitFateSentence, } from './localEngineOccupancy.js';
|
|
81
83
|
export { LOCAL_ENGINE_SWAP_CAUSES, localEngineSwapAutoable, engineSwapCardOf, engineSwapCardText } from './localEngineSwapCard.js';
|
|
@@ -153,11 +155,14 @@ export * from './adapter/types.js';
|
|
|
153
155
|
export * from './adapter/downstream/turnUsageToModelUsage.js';
|
|
154
156
|
export * from './adapter/downstream/eventToSdkMessage.js';
|
|
155
157
|
export { MOD_LOADER_VERBS, readModRegistrationRefusedNotice, modCardSentence, modLoaderFailureSentence } from './modsFace.js';
|
|
158
|
+
export { sessionModsOf } from './modsFace.js';
|
|
159
|
+
export { approvalRequestedBySentence } from './modsFace.js';
|
|
156
160
|
export { modRowsOf } from './adapter/downstream/wiringManifestView.js';
|
|
157
161
|
export { wiringFleetDoctorDetail } from './wiringFleetDoctor.js';
|
|
158
162
|
export * from './adapter/downstream/terminalToSdkResult.js';
|
|
159
163
|
export { resultErrorCodeOf, resultSelectedModelOf, resultSalvagedResultOf, resultParkFailedReasonOf } from './resultFrameKeys.js';
|
|
160
164
|
export * from './adapter/runStream.js';
|
|
165
|
+
export { runBlockedText } from './promptBlockedCopy.js';
|
|
161
166
|
export { SEMA_ROW_KIND_KEY, SEMA_ROW_KINDS, rowKindOf, isSyntheticRow, inferLegacyRowKind } from './rowKind.js';
|
|
162
167
|
export { classifySubmitFailure } from './submitFailure.js';
|
|
163
168
|
export * from './adapter/activeRunSelfHeal.js';
|
|
@@ -240,7 +245,7 @@ export * from './detachWire.js';
|
|
|
240
245
|
export * from './workflowMonitor.js';
|
|
241
246
|
export * from './workflowClient.js';
|
|
242
247
|
export * from './hooksWireCaps.js';
|
|
243
|
-
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, userPromptSubmitExecutorOf, } from './pluginHooksWire.js';
|
|
248
|
+
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, pluginHooksKeptLocally, userPromptSubmitExecutorOf, } from './pluginHooksWire.js';
|
|
244
249
|
export { HTTP_POLICY_DROP_REASONS } from './httpHookPolicy.js';
|
|
245
250
|
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, } from './settingsHooksSalvage.js';
|
|
246
251
|
export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, hostSettingsConsent, hostSettingsAcceptCurrent, } from './hostTurnSettings.js';
|
|
@@ -257,14 +262,16 @@ export * from './model/providerPresets.js';
|
|
|
257
262
|
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
258
263
|
export * from './hitl/suspendedReopen.js';
|
|
259
264
|
export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, } from './hitl/approvalResolution.js';
|
|
265
|
+
export { editedApprovalAcceptanceOf, editedApprovalRefusedLine, EDITED_APPROVAL_STATES, EDITED_APPROVAL_BASES } from './hitl/editedApprovalAcceptance.js';
|
|
260
266
|
export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
|
|
261
267
|
export { toolEndOutputText } from './toolResultContent.js';
|
|
262
268
|
export { toolOutputMediaAbsenceOf, toolOutputMediaAbsenceSentence } from './toolResultContent.js';
|
|
263
269
|
export { _resetHitlHostSurfaceForTest, APPROVAL_PARKING_WARN_TEXT, approvalParkingNoticeText, CANCEL_DENY_BUDGET_MS, CANCEL_DENY_WARN_TEXT, EDIT_NOT_FORWARDED_WARN_TEXT, EDIT_REFUSED_ON_BLIND_ASK_WARN_TEXT, hitlHostSurfaceFor, hitlHostSurfaceMisses, hitlHostSurfaceMissesFor, installHitlHostSurface, installHitlHostSurfaceFor, observeCancelByDeny, REMEMBER_NOT_APPLIED_WARN_TEXT, REPLAYED_APPROVAL_LIST_UNREADABLE_WARN_TEXT, RULE_NOT_SENT_REJECTED_WARN_TEXT, RULE_NOT_SENT_WARN_TEXT, surfaceEditRefusedOnBlindAsk, surfaceForCurrentSession, surfaceRememberNotApplied, } from './hitl/hitlHostSurface.js';
|
|
264
|
-
export { APPROVAL_DENY_SETTLED_BY_WORDS, ASK_ORIGIN_WORDS, RESPOND_DECISIONS, RETRACTED_CARD_DECISION_KIND, RULE_OFFERS_ABSENCE_REASONS, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_MATCHES, RULE_OFFER_UNCOVERED_REASONS, TOOL_APPROVAL_FRAME_KEYS_MIRROR, __resetSettledApprovalsForTests, _resetApprovalCardPortForTest, answerCarriage, answerPayloadFor, approvalBoundGrantsDetail, approvalCardFactsOfFrame, approvalCardFactsOfGeneric, approvalCardFactsOfV1, approvalCardFactsOfV1Frame, approvalCardPortFor, approvalCardPortMisses, approvalCardPortMissesFor, approvalIsMandated, approvalPriorCardsDetail, approvalSupersedesDetail, askProbeReasonDetail, claimApprovalCard, classifierNoRulingDetail, decisionAttributionKeyOf, hasApprovalCardPort, hasApprovalCardPortFor, installApprovalCardPort, installApprovalCardPortFor, isFromSubagent, isToolApprovalFrame, isToolApprovalGate, isToolApprovalRespondReplayed, joinApprovalHolder, observeApprovalAnswerCommitted, readApprovalBoundGrants, readApprovalCardWord, readApprovalClassifierNoRuling, readApprovalDenySettledBy, readApprovalMandate, readApprovalRememberRefused, readBoundGrantEntry, readDenialLimitFallback, readRuleOfferSupply, readRuleOffers, readToolApprovalRespondAck, readToolApprovalRespondParking, rememberRefusalOf, structurallyEqual, surfaceApprovalCard, surfaceFsApprovalAndDecide, surfaceToolApprovalFrameAndRespond, toolNameIsFsWrite, toolNameIsShellExec, toolPermissionRequestAskBits } from './hitl/toolApprovalWire.js';
|
|
270
|
+
export { APPROVAL_DENY_SETTLED_BY_WORDS, ASK_ORIGIN_WORDS, RESPOND_DECISIONS, RETRACTED_CARD_DECISION_KIND, RULE_OFFERS_ABSENCE_REASONS, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_MATCHES, RULE_OFFER_UNCOVERED_REASONS, TOOL_APPROVAL_FRAME_KEYS_MIRROR, WITHDRAWN_CARD_DECISION_KIND, __resetSettledApprovalsForTests, _resetApprovalCardPortForTest, allowNoteNotCarriedSentence, answerCarriage, answerPayloadFor, approvalBoundGrantsDetail, approvalCardFactsOfFrame, approvalCardFactsOfGeneric, approvalCardFactsOfV1, approvalCardFactsOfV1Frame, approvalCardPortFor, approvalCardPortMisses, approvalCardPortMissesFor, approvalIsMandated, approvalPriorCardsDetail, approvalSupersedesDetail, askProbeReasonDetail, claimApprovalCard, classifierNoRulingDetail, decisionAttributionKeyOf, hasApprovalCardPort, hasApprovalCardPortFor, installApprovalCardPort, installApprovalCardPortFor, isFromSubagent, isToolApprovalFrame, isToolApprovalGate, isToolApprovalRespondParkedRedeemed, isToolApprovalRespondReplayed, joinApprovalHolder, observeApprovalAnswerCommitted, readApprovalBoundGrants, readApprovalCardWord, readApprovalClassifierNoRuling, readApprovalDenySettledBy, readApprovalMandate, readApprovalRememberRefused, readBoundGrantEntry, readDenialLimitFallback, readRuleOfferSupply, readRuleOffers, readToolApprovalRespondAck, readToolApprovalRespondParking, rememberRefusalOf, structurallyEqual, surfaceApprovalCard, surfaceFsApprovalAndDecide, surfaceToolApprovalFrameAndRespond, toolNameIsFsWrite, toolNameIsShellExec, toolPermissionRequestAskBits } from './hitl/toolApprovalWire.js';
|
|
265
271
|
export * from './hitl/approvalCardReading.js';
|
|
266
272
|
export * from './hitl/approvalCardReasons.js';
|
|
267
273
|
export { approvalRequestFrameReadingOf, APPROVAL_REQUEST_FRAME_UNREADABLE_WHYS } from './hitl/approvalRequestFrameReading.js';
|
|
274
|
+
export { approvalAskReasonsOf } from './hitl/approvalAskers.js';
|
|
268
275
|
export { askClassReasonOf, askClassReasonsOf } from './hitl/askClassPair.js';
|
|
269
276
|
export * from './hitl/editedRuleTextPrecheck.js';
|
|
270
277
|
export * from './coreValuePorts.js';
|
|
@@ -276,7 +283,7 @@ export { planReviewCardNote } from './hitl/planReviewCard.js';
|
|
|
276
283
|
export { readRunLedgerSnapshot } from './runLedgerSnapshot.js';
|
|
277
284
|
export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
|
|
278
285
|
export { ASK_PARK_AUTO_REOPEN_BLOCKS, askParkAutoReopenBlockedContent, askParkAutoReopenBlockOf, askParkRefusalBlockOf, claimAskParkAutoReopenBlockNotice, clearAskParkAutoReopenBlocks, } from './hitl/askParkAutoReopenBlock.js';
|
|
279
|
-
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, hitlDecisionOutcomeContent, } from './hitl/decisionSend.js';
|
|
286
|
+
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, hitlDecisionOutcomeContent, toolPermissionSettledLine, } from './hitl/decisionSend.js';
|
|
280
287
|
export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
|
|
281
288
|
export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
|
|
282
289
|
export { askQuestionsFromPending, isHitlSafetyErrorLike, pendingRowIsOwnedByThisSession, pendingRowOwnershipOf, } from './hitl/parkOwnership.js';
|
|
@@ -315,6 +322,7 @@ export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
|
|
315
322
|
export * from './hitl/askSettlementLine.js';
|
|
316
323
|
export * from './interactiveHalt.js';
|
|
317
324
|
export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
|
|
325
|
+
export { interruptRefusalNote } from './interruptRefusalNote.js';
|
|
318
326
|
export { readSessionBackgroundable, projectSessionBackgroundable, interactiveEngineWire, retireInteractiveEngineWire, interactiveDetachPosture, streamInteractiveRun, backgroundHandoffEligibility, backgroundHandoffSentence, interactiveStopFacts, } from './sessionBackground.js';
|
|
319
327
|
export { BACKGROUND_HANDOFF_ABORT_REASON, handoffInteractiveRun, handedOffRunsOf, forgetHandedOffRun } from './sessionBackgroundHandoff.js';
|
|
320
328
|
export { listDevices, readSessionBinding, rebindSession, reconcileRebindOutcome, rebindProvesRequestNotApplied } from './deviceRebind.js';
|
|
@@ -375,3 +383,5 @@ export { scenarioSkillsOf, observedScenarioSkillsCapability } from './scenarioSk
|
|
|
375
383
|
export { observedApprovalFrameFamilies, approvalFrameFamiliesDeclaration } from './approvalFrameFamilies.js';
|
|
376
384
|
export { sessionEngineBindingFor, commitSessionEngine, readSessionEngine, sessionDispatchTarget, sessionDispatchRefusedFor } from './sessionEngine.js';
|
|
377
385
|
export { foldSessionPlacement } from './deviceRebind.js';
|
|
386
|
+
export { repointEngine, deviceHelloReadingOf, engineRepointVerdictOf, engineRepointMessageOf } from './engineRepoint.js';
|
|
387
|
+
export { repointSessionEngine } from './sessionEngine.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface HumanInputAuthorKeys {
|
|
2
|
+
author?: string;
|
|
3
|
+
authorUnreadable?: true;
|
|
4
|
+
extension?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function humanInputAuthorKeys(frame: {} | null | undefined): HumanInputAuthorKeys;
|
|
7
|
+
export interface RunOriginKeys {
|
|
8
|
+
runOrigin?: string;
|
|
9
|
+
runOriginUnreadable?: true;
|
|
10
|
+
}
|
|
11
|
+
export declare function runOriginKeys(carrier: {} | null | undefined): RunOriginKeys;
|
|
12
|
+
export interface RunOriginRowKeys {
|
|
13
|
+
readonly _sema_run_origin?: string;
|
|
14
|
+
readonly _sema_run_origin_unreadable?: true;
|
|
15
|
+
}
|
|
16
|
+
export declare function runOriginRowKeys(row: {} | null | undefined): RunOriginRowKeys;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CORE_INPUT_AUTHORS, CORE_RUN_ORIGINS } from './generated/engineFactTables.js';
|
|
2
|
+
import { guardedRead, ownDataField, readOwnDataNonEmptyString } from './ownKey.js';
|
|
3
|
+
function readClosedWord(carrier, key, flagKey, words) {
|
|
4
|
+
try {
|
|
5
|
+
if (typeof carrier !== 'object' || carrier === null || Array.isArray(carrier))
|
|
6
|
+
return { state: 'absent' };
|
|
7
|
+
if (ownDataField(carrier, flagKey) === true)
|
|
8
|
+
return { state: 'unreadable' };
|
|
9
|
+
const raw = ownDataField(carrier, key);
|
|
10
|
+
if (raw === undefined)
|
|
11
|
+
return { state: 'absent' };
|
|
12
|
+
if (typeof raw === 'string' && words.includes(raw))
|
|
13
|
+
return { state: 'word', word: raw };
|
|
14
|
+
return { state: 'unreadable' };
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return { state: 'unreadable' };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function humanInputAuthorKeys(frame) {
|
|
21
|
+
if (typeof frame !== 'object' || frame === null || Array.isArray(frame))
|
|
22
|
+
return {};
|
|
23
|
+
const a = readClosedWord(frame, 'author', 'authorUnreadable', CORE_INPUT_AUTHORS);
|
|
24
|
+
const extension = guardedRead(() => readOwnDataNonEmptyString(frame, 'extension'));
|
|
25
|
+
return {
|
|
26
|
+
...(a.state === 'word' ? { author: a.word } : {}),
|
|
27
|
+
...(a.state === 'unreadable' ? { authorUnreadable: true } : {}),
|
|
28
|
+
...(extension !== undefined ? { extension } : {}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function runOriginKeys(carrier) {
|
|
32
|
+
const r = readClosedWord(carrier, 'runOrigin', 'runOriginUnreadable', CORE_RUN_ORIGINS);
|
|
33
|
+
return {
|
|
34
|
+
...(r.state === 'word' ? { runOrigin: r.word } : {}),
|
|
35
|
+
...(r.state === 'unreadable' ? { runOriginUnreadable: true } : {}),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function runOriginRowKeys(row) {
|
|
39
|
+
const k = runOriginKeys(row);
|
|
40
|
+
return {
|
|
41
|
+
...(k.runOrigin !== undefined ? { _sema_run_origin: k.runOrigin } : {}),
|
|
42
|
+
...(k.runOriginUnreadable === true ? { _sema_run_origin_unreadable: true } : {}),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { INTERRUPT_NOT_HELD, INTERRUPT_NOTHING_IN_FLIGHT, STEERING_NOT_RUNNING } from './engineErrorCodes.js';
|
|
2
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
|
+
function interruptRefusalKeyOf(reason) {
|
|
4
|
+
switch (reason) {
|
|
5
|
+
case INTERRUPT_NOTHING_IN_FLIGHT:
|
|
6
|
+
return 'session.interruptRefusal.nothingInFlight';
|
|
7
|
+
case INTERRUPT_NOT_HELD:
|
|
8
|
+
return 'session.interruptRefusal.notHeld';
|
|
9
|
+
case STEERING_NOT_RUNNING:
|
|
10
|
+
return 'session.interruptRefusal.notRunning';
|
|
11
|
+
default:
|
|
12
|
+
return 'session.interruptRefusal.unrecognised';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function interruptRefusalNote(reason, lang) {
|
|
16
|
+
return renderMessage(msg(interruptRefusalKeyOf(reason)), lang);
|
|
17
|
+
}
|
|
@@ -36,6 +36,8 @@ export declare function imageVisionReadingOf(model: string | undefined, catalog?
|
|
|
36
36
|
readonly vision: ImageVision;
|
|
37
37
|
readonly model?: string;
|
|
38
38
|
};
|
|
39
|
+
export type ModelReasoning = 'yes' | 'no' | 'unknown';
|
|
40
|
+
export declare function modelReasoningOf(model: string | undefined, catalog?: LiveModelCatalog | null): ModelReasoning;
|
|
39
41
|
export type EffortLevelsReading = {
|
|
40
42
|
readonly kind: 'clamped';
|
|
41
43
|
readonly levels: readonly string[];
|
package/dist/liveModelCatalog.js
CHANGED
|
@@ -46,6 +46,9 @@ function ownDataOf(o, key) {
|
|
|
46
46
|
return undefined;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
+
function capabilityWordOf(declared) {
|
|
50
|
+
return declared === true ? 'yes' : declared === false ? 'no' : 'unknown';
|
|
51
|
+
}
|
|
49
52
|
function liveModelRowOf(cat, ref) {
|
|
50
53
|
const rows = catalogRowsOf(cat);
|
|
51
54
|
if (rows === undefined)
|
|
@@ -92,8 +95,7 @@ export function imageVisionReadingOf(model, catalog = getLiveModelCatalog()) {
|
|
|
92
95
|
const target = targetRowOf(model, catalog);
|
|
93
96
|
if (target.kind !== 'row')
|
|
94
97
|
return { vision: 'unknown' };
|
|
95
|
-
const
|
|
96
|
-
const word = vision === true ? 'yes' : vision === false ? 'no' : 'unknown';
|
|
98
|
+
const word = capabilityWordOf(ownDataOf(target.row, 'vision'));
|
|
97
99
|
const name = ownDataOf(target.row, 'name');
|
|
98
100
|
return typeof name === 'string' && name.length > 0 ? { vision: word, model: name } : { vision: word };
|
|
99
101
|
}
|
|
@@ -101,6 +103,18 @@ export function imageVisionReadingOf(model, catalog = getLiveModelCatalog()) {
|
|
|
101
103
|
return { vision: 'unknown' };
|
|
102
104
|
}
|
|
103
105
|
}
|
|
106
|
+
export function modelReasoningOf(model, catalog = getLiveModelCatalog()) {
|
|
107
|
+
try {
|
|
108
|
+
const target = targetRowOf(model, catalog);
|
|
109
|
+
return target.kind === 'row' ? reasoningWordOfRow(target.row) : 'unknown';
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return 'unknown';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function reasoningWordOfRow(row) {
|
|
116
|
+
return capabilityWordOf(ownDataOf(row, 'reasoning'));
|
|
117
|
+
}
|
|
104
118
|
const NOT_CLAMPED = Object.freeze({ kind: 'not_clamped' });
|
|
105
119
|
const NOT_APPLICABLE = Object.freeze({ kind: 'not_applicable' });
|
|
106
120
|
const unknownEffort = (why) => Object.freeze({ kind: 'unknown', why });
|
|
@@ -127,10 +141,10 @@ export function effortLevelsOf(model, catalog = getLiveModelCatalog()) {
|
|
|
127
141
|
}
|
|
128
142
|
return Object.freeze({ kind: 'clamped', levels: Object.freeze(out) });
|
|
129
143
|
}
|
|
130
|
-
const reasoning =
|
|
131
|
-
if (reasoning ===
|
|
144
|
+
const reasoning = reasoningWordOfRow(row);
|
|
145
|
+
if (reasoning === 'yes')
|
|
132
146
|
return NOT_CLAMPED;
|
|
133
|
-
if (reasoning ===
|
|
147
|
+
if (reasoning === 'no')
|
|
134
148
|
return NOT_APPLICABLE;
|
|
135
149
|
return unknownEffort('reasoning_unreported');
|
|
136
150
|
}
|
|
@@ -747,14 +761,14 @@ export function liveModelRowsOf(catalog = getLiveModelCatalog()) {
|
|
|
747
761
|
seen.add(name);
|
|
748
762
|
const id = nonEmptyString(ownDataOf(row, 'id'));
|
|
749
763
|
const provider = nonEmptyString(ownDataOf(row, 'provider'));
|
|
750
|
-
const reasoning =
|
|
764
|
+
const reasoning = reasoningWordOfRow(row);
|
|
751
765
|
const contextWindow = positiveFinite(ownDataOf(row, 'contextWindow'));
|
|
752
766
|
const maxOutputTokens = positiveFinite(ownDataOf(row, 'maxOutputTokens'));
|
|
753
767
|
out.push(Object.freeze({
|
|
754
768
|
name,
|
|
755
769
|
...(id !== undefined ? { id } : {}),
|
|
756
770
|
...(provider !== undefined ? { provider } : {}),
|
|
757
|
-
...(
|
|
771
|
+
...(reasoning !== 'unknown' ? { reasoning: reasoning === 'yes' } : {}),
|
|
758
772
|
...(contextWindow !== undefined ? { contextWindow } : {}),
|
|
759
773
|
...(maxOutputTokens !== undefined ? { maxOutputTokens } : {}),
|
|
760
774
|
isDefault: def.kind === 'listed' && def.name === name,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame } from '@sema-agent/sdk';
|
|
2
2
|
export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame };
|
|
3
|
+
import type { HostWithdrawal } from './hitl/hostWithdrawal.js';
|
|
3
4
|
type QuestionFrameHandler = (frame: QuestionFrame) => void;
|
|
4
5
|
type RespondFn = (id: string, answer: QuestionAnswer, opts?: {
|
|
5
6
|
signal?: AbortSignal;
|
|
6
7
|
}) => Promise<unknown>;
|
|
7
|
-
|
|
8
|
+
type WithdrawHook = (withdrawal: HostWithdrawal) => void;
|
|
9
|
+
export declare function registerLocalQuestionResponder(id: string, fn: RespondFn, onWithdraw?: WithdrawHook): () => void;
|
|
10
|
+
export declare function takeLocalQuestionWithdrawHook(id: string): WithdrawHook | 'no_card' | 'not_withdrawable';
|
|
8
11
|
export declare function unregisterLocalQuestionResponder(id: string): boolean;
|
|
9
12
|
export declare function hasLocalQuestionResponder(id: string): boolean;
|
|
10
13
|
export declare function publishQuestionFrame(frame: QuestionFrame): void;
|
|
@@ -2,12 +2,21 @@ import { createSessionSlot, DEFAULT_SESSION_KEY } from './sessionSlot.js';
|
|
|
2
2
|
const frameHandlerByKey = createSessionSlot();
|
|
3
3
|
let respondFn = null;
|
|
4
4
|
const localResponders = new Map();
|
|
5
|
-
export function registerLocalQuestionResponder(id, fn) {
|
|
6
|
-
localResponders.set(id, fn);
|
|
5
|
+
export function registerLocalQuestionResponder(id, fn, onWithdraw) {
|
|
6
|
+
localResponders.set(id, typeof onWithdraw === 'function' ? { respond: fn, withdraw: onWithdraw } : { respond: fn });
|
|
7
7
|
return () => {
|
|
8
8
|
localResponders.delete(id);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
+
export function takeLocalQuestionWithdrawHook(id) {
|
|
12
|
+
const entry = localResponders.get(id);
|
|
13
|
+
if (entry === undefined)
|
|
14
|
+
return 'no_card';
|
|
15
|
+
if (entry.withdraw === undefined)
|
|
16
|
+
return 'not_withdrawable';
|
|
17
|
+
localResponders.delete(id);
|
|
18
|
+
return entry.withdraw;
|
|
19
|
+
}
|
|
11
20
|
export function unregisterLocalQuestionResponder(id) {
|
|
12
21
|
return localResponders.delete(id);
|
|
13
22
|
}
|
|
@@ -50,7 +59,7 @@ export function respondToQuestion(id, answer, opts) {
|
|
|
50
59
|
const local = localResponders.get(id);
|
|
51
60
|
if (local) {
|
|
52
61
|
localResponders.delete(id);
|
|
53
|
-
return local(id, answer, opts);
|
|
62
|
+
return local.respond(id, answer, opts);
|
|
54
63
|
}
|
|
55
64
|
if (!respondFn) {
|
|
56
65
|
return Promise.reject(new Error('no live question respond wired (offline/mock path)'));
|
package/dist/mcpEngineLeg.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WiringManifestMcpEntryView } from './adapter/downstream/eventToSdkMessage.js';
|
|
2
2
|
import { type McpAuthorizationView } from './mcpLiveness.js';
|
|
3
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
3
4
|
export type McpEngineLegLiveness = {
|
|
4
5
|
kind: 'unobserved';
|
|
5
6
|
} | {
|
|
@@ -43,6 +44,8 @@ export type McpEngineLegConnection = {
|
|
|
43
44
|
status: string;
|
|
44
45
|
};
|
|
45
46
|
export declare function mcpEngineLegConnectionOf(serverName: string, rows: readonly WiringManifestMcpEntryView[] | null | undefined): McpEngineLegConnection;
|
|
47
|
+
export declare function mcpNeedsReauth(reading: {} | null | undefined): boolean | undefined;
|
|
48
|
+
export declare function mcpFailureStatusSuffix(reading: {} | null | undefined, lang?: UiLanguage): string;
|
|
46
49
|
export interface McpDetailLegNoteInput {
|
|
47
50
|
localClientFailed: boolean;
|
|
48
51
|
engineHostedToolCount: number | undefined;
|
package/dist/mcpEngineLeg.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { isMcpLivenessState, readMcpAuthorization } from './mcpLiveness.js';
|
|
1
|
+
import { isMcpLivenessState, MCP_FAILURE_UNAUTHORIZED, readMcpAuthorization } from './mcpLiveness.js';
|
|
2
2
|
import { mcpSectionDroppedNamedRowsOf } from './ownKey.js';
|
|
3
|
+
import { slotReadOf } from './wireFailureShape.js';
|
|
4
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
5
|
void true;
|
|
4
6
|
void true;
|
|
5
7
|
void true;
|
|
@@ -132,6 +134,41 @@ export function mcpEngineLegConnectionOf(serverName, rows) {
|
|
|
132
134
|
...(authorization.kind === 'record' ? { authorization: authorization.authorization } : authorizationUnreadable ? { authorizationUnreadable: true } : {}),
|
|
133
135
|
};
|
|
134
136
|
}
|
|
137
|
+
export function mcpNeedsReauth(reading) {
|
|
138
|
+
try {
|
|
139
|
+
if (reading === null || typeof reading !== 'object' || Array.isArray(reading))
|
|
140
|
+
return undefined;
|
|
141
|
+
const slot = slotReadOf(reading, 'errorCode');
|
|
142
|
+
if (slot.presence === 'absent')
|
|
143
|
+
return false;
|
|
144
|
+
if (slot.presence !== 'present')
|
|
145
|
+
return undefined;
|
|
146
|
+
const code = slot.value;
|
|
147
|
+
if (typeof code !== 'string' || code === '')
|
|
148
|
+
return undefined;
|
|
149
|
+
return code === MCP_FAILURE_UNAUTHORIZED;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
export function mcpFailureStatusSuffix(reading, lang) {
|
|
156
|
+
try {
|
|
157
|
+
if (reading === null || typeof reading !== 'object' || Array.isArray(reading))
|
|
158
|
+
return '';
|
|
159
|
+
const slot = slotReadOf(reading, 'httpStatus');
|
|
160
|
+
const status = slot.presence === 'present' && typeof slot.value === 'number' && Number.isInteger(slot.value) && slot.value > 0 ? slot.value : undefined;
|
|
161
|
+
const number = status === undefined ? '' : ` ${status}`;
|
|
162
|
+
if (mcpNeedsReauth(reading) === true)
|
|
163
|
+
return `${number}${renderMessage(msg('session.mcpFailure.reauthorizeSuffix'), lang)}`;
|
|
164
|
+
if (status !== undefined && status >= 500 && status <= 599)
|
|
165
|
+
return `${number}${renderMessage(msg('session.mcpFailure.serverDownSuffix'), lang)}`;
|
|
166
|
+
return number;
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return '';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
135
172
|
const rosterReadingOf = (v) => {
|
|
136
173
|
if (v === UNREADABLE_CELL)
|
|
137
174
|
return 'unreadable';
|
package/dist/mcpPanel.js
CHANGED
|
@@ -122,6 +122,8 @@ const _mcpPanelShapePin = (p) => p;
|
|
|
122
122
|
void _mcpPanelShapePin;
|
|
123
123
|
const _mcpPanelRefusalPin = (p) => p;
|
|
124
124
|
void _mcpPanelRefusalPin;
|
|
125
|
+
const _pinMcpPanel = [true, true, true, true, true, true, true, true, true, true];
|
|
126
|
+
void _pinMcpPanel;
|
|
125
127
|
export function mcpEngineLegPresence(view) {
|
|
126
128
|
if (view === undefined)
|
|
127
129
|
return 'unknown';
|
package/dist/mcpReconnect.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type McpAuthorizationView } from './mcpLiveness.js';
|
|
2
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
3
|
export declare const MCP_RECONNECT_OUTCOMES: readonly string[];
|
|
3
4
|
export declare const MCP_RECONNECT_TRANSACTION_NOTICE: string;
|
|
4
5
|
export declare const MCP_RECONNECT_UNSETTLED_NOTICE: string;
|
|
@@ -76,4 +77,11 @@ export declare function reconnectMcpServer(client: McpReconnectClientLike, sessi
|
|
|
76
77
|
signal?: AbortSignal;
|
|
77
78
|
}): Promise<McpReconnectVerdict>;
|
|
78
79
|
export declare function projectMcpReconnectCapability(caps: unknown): 'available' | 'unavailable' | 'not_reported' | undefined;
|
|
79
|
-
export declare function mcpReconnectOutcomeDetail(view: McpReconnectResultView): string;
|
|
80
|
+
export declare function mcpReconnectOutcomeDetail(view: McpReconnectResultView, lang?: UiLanguage): string;
|
|
81
|
+
export type McpReconnectNotSentVerdict = {
|
|
82
|
+
readonly kind: 'no_session';
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: 'unavailable';
|
|
85
|
+
};
|
|
86
|
+
export type McpReconnectDetailVerdict = McpReconnectVerdict | McpReconnectNotSentVerdict;
|
|
87
|
+
export declare function mcpReconnectVerdictDetail(verdict: McpReconnectDetailVerdict, server: string, lang?: UiLanguage): string | undefined;
|