@sema-agent/client-core 0.98.0 → 0.99.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 +199 -0
- package/README.md +35 -22
- package/dist/adapt/arms.js +61 -20
- package/dist/adapt/panelTasks.d.ts +1 -1
- package/dist/adapt/panelTasks.js +2 -2
- package/dist/adapter/activeRunSelfHeal.d.ts +4 -3
- package/dist/adapter/activeRunSelfHeal.js +162 -293
- package/dist/adapter/downstream/eventToSdkMessage.js +52 -4
- package/dist/adapter/runStream.js +52 -37
- package/dist/adapter/types.js +2 -1
- package/dist/agentSession/engineSessionBackgroundStop.js +16 -8
- package/dist/agentsWireCaps.d.ts +0 -3
- package/dist/agentsWireCaps.js +33 -24
- package/dist/cloudConfigWireCaps.d.ts +1 -1
- package/dist/cloudConfigWireCaps.js +26 -4
- package/dist/controlRouter.d.ts +4 -2
- package/dist/controlRouter.js +39 -51
- package/dist/coreValuePorts.d.ts +26 -1
- package/dist/coreValuePorts.js +10 -0
- package/dist/corruptSessionCopy.d.ts +2 -1
- package/dist/corruptSessionCopy.js +3 -3
- package/dist/declared/supportFloorDeclared.js +1 -1
- package/dist/detachWire.js +3 -2
- package/dist/devicesFace.d.ts +34 -0
- package/dist/devicesFace.js +90 -0
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +3 -0
- package/dist/engineAgentPanelStore.d.ts +7 -0
- package/dist/engineAgentPanelStore.js +14 -0
- package/dist/engineCapReader.d.ts +2 -1
- package/dist/engineCapReader.js +7 -5
- package/dist/engineCapsCache.d.ts +8 -0
- package/dist/engineCapsCache.js +59 -6
- package/dist/engineCapsChange.d.ts +2 -0
- package/dist/engineCapsChange.js +9 -0
- package/dist/engineErrorCodes.d.ts +2 -1
- package/dist/engineErrorCodes.js +2 -7
- package/dist/engineRowRef.js +3 -0
- package/dist/engineSessionMessages.d.ts +1 -0
- package/dist/engineSessionMessages.js +7 -1
- package/dist/engineTargetSeat.d.ts +27 -0
- package/dist/engineTargetSeat.js +199 -0
- package/dist/engineWireFor.js +3 -8
- package/dist/env/uiLanguage.d.ts +2 -1
- package/dist/env/uiLanguage.js +3 -2
- package/dist/eventLeg.d.ts +8 -0
- package/dist/eventLeg.js +61 -41
- package/dist/fileHistoryCaptureCapability.d.ts +2 -1
- package/dist/fileHistoryCaptureCapability.js +12 -18
- package/dist/fileHistoryLegNotice.d.ts +2 -1
- package/dist/fileHistoryLegNotice.js +3 -3
- package/dist/frameBinding.d.ts +3 -0
- package/dist/frameBinding.js +12 -0
- package/dist/gateOutcome.js +16 -2
- package/dist/gateVocabulary.d.ts +8 -7
- package/dist/gateVocabulary.js +71 -73
- package/dist/generated/engineFactTables.d.ts +17 -1
- package/dist/generated/engineFactTables.js +29 -0
- package/dist/generated/engineNoticeTables.js +9 -3
- package/dist/generated/settingsSchemaFns.d.ts +6 -0
- package/dist/generated/settingsSchemaFns.js +57 -0
- package/dist/generated/settingsSchemaHooksClassifier.d.ts +2 -0
- package/dist/generated/settingsSchemaHooksClassifier.js +254 -0
- package/dist/generated/settingsSchemaTables.d.ts +1 -0
- package/dist/generated/settingsSchemaTables.js +4 -0
- package/dist/generated/settingsSchemaTypes.d.ts +105 -0
- package/dist/generated/settingsSchemaTypes.js +1 -0
- package/dist/hitl/allowRuleShadow.d.ts +2 -1
- package/dist/hitl/allowRuleShadow.js +17 -14
- package/dist/hitl/approvalCardReasons.d.ts +3 -2
- package/dist/hitl/approvalCardReasons.js +27 -28
- package/dist/hitl/approvalHolds.d.ts +3 -0
- package/dist/hitl/approvalHolds.js +73 -29
- package/dist/hitl/askClassPair.d.ts +1 -1
- package/dist/hitl/askClassPair.js +16 -0
- package/dist/hitl/askGateWire.js +2 -1
- package/dist/hitl/askSettlementLine.d.ts +14 -4
- package/dist/hitl/askSettlementLine.js +67 -47
- package/dist/hitl/automaticAnswerVerdict.d.ts +2 -1
- package/dist/hitl/automaticAnswerVerdict.js +8 -8
- package/dist/hitl/crashConvergedNotice.d.ts +5 -4
- package/dist/hitl/crashConvergedNotice.js +28 -41
- package/dist/hitl/frameRouter.js +7 -8
- package/dist/hitl/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +3 -3
- package/dist/hitl/persistedRulesWire.d.ts +6 -5
- package/dist/hitl/persistedRulesWire.js +55 -73
- package/dist/hitl/planReviewWire.d.ts +5 -0
- package/dist/hitl/planReviewWire.js +8 -0
- package/dist/hitl/sessionPolicyDeliverable.d.ts +2 -0
- package/dist/hitl/sessionPolicyDeliverable.js +46 -3
- package/dist/hitl/sessionPolicyWire.d.ts +2 -1
- package/dist/hitl/sessionPolicyWire.js +23 -24
- package/dist/hitl/suspendedReopen.d.ts +2 -1
- package/dist/hitl/suspendedReopen.js +7 -10
- package/dist/hitl/toolApprovalWire.d.ts +17 -5
- package/dist/hitl/toolApprovalWire.js +79 -40
- package/dist/hooksWireCaps.js +145 -56
- package/dist/host.d.ts +21 -0
- package/dist/hostTurnSettings.d.ts +71 -0
- package/dist/hostTurnSettings.js +291 -0
- package/dist/humanTurn.d.ts +14 -1
- package/dist/humanTurn.js +100 -12
- package/dist/humanTurnRead.d.ts +2 -0
- package/dist/humanTurnRead.js +22 -1
- package/dist/i18n/messages.en.d.ts +582 -0
- package/dist/i18n/messages.en.js +582 -0
- package/dist/i18n/messages.zh.js +718 -1
- package/dist/index.d.ts +29 -13
- package/dist/index.js +18 -9
- package/dist/inheritEnvCapability.d.ts +3 -2
- package/dist/inheritEnvCapability.js +3 -3
- package/dist/inheritEnvWire.d.ts +3 -2
- package/dist/inheritEnvWire.js +12 -14
- package/dist/interactiveHalt.js +17 -6
- package/dist/liveModelCatalog.d.ts +2 -1
- package/dist/liveModelCatalog.js +14 -8
- package/dist/mcpPanel.d.ts +10 -1
- package/dist/mcpPanel.js +40 -13
- package/dist/mcpProbeCapability.d.ts +2 -1
- package/dist/mcpProbeCapability.js +7 -11
- package/dist/mcpProbeWire.d.ts +3 -1
- package/dist/mcpProbeWire.js +5 -0
- package/dist/mcpWireCaps.d.ts +34 -0
- package/dist/mcpWireCaps.js +117 -17
- package/dist/memoryEntriesWire.js +5 -10
- package/dist/model/onboardJudgement.d.ts +93 -0
- package/dist/model/onboardJudgement.js +415 -0
- package/dist/model/tierVocabulary.d.ts +2 -0
- package/dist/model/tierVocabulary.js +17 -5
- package/dist/modelCapabilityProbe.d.ts +64 -0
- package/dist/modelCapabilityProbe.js +600 -0
- package/dist/modelIdentityResolvability.d.ts +3 -0
- package/dist/modelIdentityResolvability.js +26 -17
- package/dist/ownKey.d.ts +7 -0
- package/dist/ownKey.js +34 -0
- package/dist/panelReduce.d.ts +6 -1
- package/dist/panelReduce.js +50 -3
- package/dist/permissionRuleIssue.js +2 -0
- package/dist/permissionRulesWriteCapability.d.ts +2 -1
- package/dist/permissionRulesWriteCapability.js +8 -6
- package/dist/pluginHooksWire.d.ts +46 -3
- package/dist/pluginHooksWire.js +217 -11
- package/dist/printModelStatus.d.ts +63 -0
- package/dist/printModelStatus.js +155 -0
- package/dist/request/taskRequest.d.ts +11 -5
- package/dist/request/taskRequest.js +112 -16
- package/dist/resumeRefusalCopy.d.ts +12 -9
- package/dist/resumeRefusalCopy.js +70 -143
- package/dist/retryStatus.d.ts +37 -0
- package/dist/retryStatus.js +79 -0
- package/dist/scenarioRefusal.d.ts +9 -0
- package/dist/scenarioRefusal.js +111 -0
- package/dist/seam.d.ts +25 -1
- package/dist/seam.js +10 -1
- package/dist/seatContract.d.ts +260 -10
- package/dist/seatContract.js +692 -19
- package/dist/selfOrchestrationDenial.js +7 -19
- package/dist/sessionIdSegment.d.ts +6 -0
- package/dist/sessionIdSegment.js +24 -0
- package/dist/sessionMemoryStatus.js +6 -11
- package/dist/sessionPolicyCapability.d.ts +2 -1
- package/dist/sessionPolicyCapability.js +8 -6
- package/dist/settingsHooksSalvage.d.ts +44 -0
- package/dist/settingsHooksSalvage.js +211 -0
- package/dist/skillToolListsCapability.d.ts +2 -1
- package/dist/skillToolListsCapability.js +8 -6
- package/dist/sseIdleTriage.js +3 -2
- package/dist/subagent/engineSubagentResume.js +15 -9
- package/dist/subagentContentStore.d.ts +3 -0
- package/dist/subagentContentStore.js +22 -0
- package/dist/toolHistoryMismatch.js +3 -2
- package/dist/toolRoster.d.ts +3 -2
- package/dist/toolRoster.js +21 -20
- package/dist/turnFailurePresentation.d.ts +12 -1
- package/dist/turnFailurePresentation.js +212 -15
- package/dist/usageAnalytics.js +6 -11
- package/dist/userAttachmentEnvelope.d.ts +1 -0
- package/dist/userAttachmentEnvelope.js +37 -7
- package/dist/userAttachmentSeat.d.ts +21 -0
- package/dist/userAttachmentSeat.js +75 -0
- package/dist/userInvokedSkillsCapability.d.ts +11 -1
- package/dist/userInvokedSkillsCapability.js +31 -7
- package/dist/wireErrorTriage.d.ts +7 -0
- package/dist/wireErrorTriage.js +23 -1
- package/dist/wireFailureShape.js +2 -1
- package/dist/wireRefusalCopy.d.ts +13 -1
- package/dist/wireRefusalCopy.js +24 -28
- package/dist/workflowsJournalCapability.d.ts +2 -1
- package/dist/workflowsJournalCapability.js +8 -6
- package/docs/INTEGRATION-CLIENTS.md +542 -30
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
|
|
|
16
16
|
export { engineRefOf, sameEngineRef, TRANSCRIPT_ROW_SIDECAR_KEYS } from './engineRowRef.js';
|
|
17
17
|
export type { EngineRowRef, SameEngineRefVerdict, EngineBoundRun } from './engineRowRef.js';
|
|
18
18
|
export { isReplayMarked } from './replayBody.js';
|
|
19
|
-
export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE } from './eventLeg.js';
|
|
20
|
-
export type { EventLeg, EventLegBindCause, EventLegBoundInfo, EventLegElicitationFrame, EventLegFrameInfo, EventLegHitlEnvelope, EventLegHitlPorts, EventLegIdleTriagePorts, EventLegKind, EventLegLiveSpec, EventLegOwnerPorts, EventLegPortName, EventLegPorts, EventLegQuestionFrame, EventLegRefusal, EventLegReport, EventLegRow, EventLegRunPorts, EventLegRunSpec, EventLegSpec, EventLegStage, EventLegStreamContext, EventLegStreamDecorator, EventLegTap, EventLegToolApprovalFrame, } from './eventLeg.js';
|
|
19
|
+
export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE, approvalFrameContextOf } from './eventLeg.js';
|
|
20
|
+
export type { ApprovalFrameContext, EventLeg, EventLegBindCause, EventLegBoundInfo, EventLegElicitationFrame, EventLegFrameInfo, EventLegHitlEnvelope, EventLegHitlPorts, EventLegIdleTriagePorts, EventLegKind, EventLegLiveSpec, EventLegOwnerPorts, EventLegPortName, EventLegPorts, EventLegQuestionFrame, EventLegRefusal, EventLegReport, EventLegRow, EventLegRunPorts, EventLegRunSpec, EventLegSpec, EventLegStage, EventLegStreamContext, EventLegStreamDecorator, EventLegTap, EventLegToolApprovalFrame, } from './eventLeg.js';
|
|
21
21
|
export { frameBindingOf, inheritFrameBinding } from './frameBinding.js';
|
|
22
|
-
export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, } from './subagentContentStore.js';
|
|
22
|
+
export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, subagentContentEventOf, } from './subagentContentStore.js';
|
|
23
23
|
export type { BgTerminalFacts, SubagentContentEvent, SubagentContentItem, SubagentContentSnapshot, SubagentContentStoreConfig, SubagentOwnerRecord, SubagentOwnerSessionConflict, SubagentViewSlot, } from './subagentContentStore.js';
|
|
24
24
|
export * from './engineAgentPanelStore.js';
|
|
25
25
|
export * from './engineAgentAbsence.js';
|
|
@@ -30,8 +30,10 @@ export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay,
|
|
|
30
30
|
export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame, } from './liveQuestionStore.js';
|
|
31
31
|
export * from './engineInlineTaskStats.js';
|
|
32
32
|
export * from './printToolResultFrame.js';
|
|
33
|
-
export
|
|
34
|
-
export
|
|
33
|
+
export * from './printModelStatus.js';
|
|
34
|
+
export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
|
|
35
|
+
export { onEngineCapsChange } from './engineCapsChange.js';
|
|
36
|
+
export type { EngineCapState, EngineCapsChange, EngineCapsLanding, EngineCapsProbeRotation, EngineCapsReprobe, EngineCapValueState, } from './engineCapsCache.js';
|
|
35
37
|
export * from './sqlEngineCapability.js';
|
|
36
38
|
export * from './writeProtectionCapability.js';
|
|
37
39
|
export * from './webSearchBackendCapability.js';
|
|
@@ -96,13 +98,13 @@ export * from './modelCapabilityProbe.js';
|
|
|
96
98
|
export * from './classifierStatus.js';
|
|
97
99
|
export * from './engineToolLabelStore.js';
|
|
98
100
|
export * from './fleetTaskDesc.js';
|
|
99
|
-
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
|
|
101
|
+
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
|
|
100
102
|
export type { DisplayUntrustedOptions, DisplayMark, DisplayMarkSpan, DisplayUntrustedMarked } from './displayUntrusted.js';
|
|
101
103
|
export { isDiagnosticValueWord } from './displayUntrusted.js';
|
|
102
104
|
export type * from './types/engineState.js';
|
|
103
105
|
export * from './hostEnv.js';
|
|
104
106
|
export * from './unrefTimer.js';
|
|
105
|
-
export { ControlRouter, ControlSafetyError, errCodes, steerBodyOf, steerRefusalAdviceOf, steeringRefusedBeforeEngine, type AssistantPreemptLike, type ControlClientLike, type ControlRouterOptions, type ControlRouterSteerOptions, type ControlSafetyCode, type ErrCodes, type PreemptOptions, type RunsResourceLike, type SteerBody, type SteerBodyInput, type SteerRefusalAdvice, type SteeringRefusedBeforeEngine, } from './controlRouter.js';
|
|
107
|
+
export { ControlRouter, ControlSafetyError, errCodes, steerBodyOf, steerRefusalAdviceOf, steeringRefusedBeforeEngine, type AssistantPreemptLike, type ControlClientLike, type ControlRouterOptions, type ControlRouterSteerOptions, type ControlSafetyCode, type ErrCodes, type PreemptOptions, type RunsResourceLike, type SteerBody, type SteerBodyInput, type SteerHostQueueFact, type SteerRefusalAdvice, type SteeringRefusedBeforeEngine, } from './controlRouter.js';
|
|
106
108
|
export { preemptReceiptLine, type PreemptOutcome, type PreemptParkedStatus } from './preemptWire.js';
|
|
107
109
|
export { readSteerReceipt, type SteerReceiptReading } from './steerReceipt.js';
|
|
108
110
|
export * from './sseIdleTriage.js';
|
|
@@ -110,7 +112,7 @@ export * from './engineWireSdk.js';
|
|
|
110
112
|
export * from './classifierVerdictWire.js';
|
|
111
113
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
112
114
|
export { findSystemReminderOpenTag, type SystemReminderOpenTagSpan } from './systemReminderTag.js';
|
|
113
|
-
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES,
|
|
115
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
114
116
|
export type { DelegationCapDisposition, ModelFallbackReason, OperatorGateRefusal, RunDeathVerdictCode, } from './engineErrorCodes.js';
|
|
115
117
|
export * from './agentsWireCaps.js';
|
|
116
118
|
export { engineToolDirectoryOf } from './engineToolDirectory.js';
|
|
@@ -219,8 +221,13 @@ export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredP
|
|
|
219
221
|
export type { PromptDeliveryLedger, PromptDeliveryRecord } from './promptDelivery.js';
|
|
220
222
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
221
223
|
export type { UserAttachmentDescriptor, UserAttachmentNotebookCell } from './userAttachmentEnvelope.js';
|
|
222
|
-
export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
|
|
223
|
-
export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, } from './humanTurn.js';
|
|
224
|
+
export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
|
|
225
|
+
export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, HumanTurnNotice, } from './humanTurn.js';
|
|
226
|
+
export type { UserAttachment } from '@sema-agent/sdk';
|
|
227
|
+
export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
|
|
228
|
+
export type { UserAttachmentSeatReading, UserAttachmentSeatPresent, UserAttachmentSeatLimits } from './userAttachmentSeat.js';
|
|
229
|
+
export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
|
|
230
|
+
export type { ScenarioRefusalReading } from './scenarioRefusal.js';
|
|
224
231
|
export { projectEngineSessionMessages } from './engineSessionMessages.js';
|
|
225
232
|
export type { EngineHistoryProjection, EngineHistoryProjectionOpts, EngineHistoryMessage, EngineHistoryMessageBody, EngineHistoryBlock, EngineHistoryTextBlock, EngineHistoryThinkingBlock, EngineHistoryToolUseBlock, EngineHistoryToolResultBlock, EngineHistoryMediaBlock, EngineHistoryOpaqueBlock, EngineHistoryBase64Source, EngineHistoryJson, EngineHistorySkipped, } from './engineSessionMessages.js';
|
|
226
233
|
export * from './resumeRefusalCopy.js';
|
|
@@ -235,7 +242,9 @@ export * from './detachWire.js';
|
|
|
235
242
|
export * from './workflowMonitor.js';
|
|
236
243
|
export * from './workflowClient.js';
|
|
237
244
|
export * from './hooksWireCaps.js';
|
|
238
|
-
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, } from './pluginHooksWire.js';
|
|
245
|
+
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, userPromptSubmitExecutorOf, type EngineFiredHookEvent, type PluginHookDisposition, type PluginHookReason, type PluginHookExclusionReason, type SettingsHookDropReason, type HookSettingsSource, type PluginHookKey, type PluginHookVerdict, type PluginHookExclusion, type SettingsHookDrop, type SettingsHookVerdict, type SettingsHookExclusion, type HooksWireEngineFacts, type PluginHookReaderState, type HooksWirePlan, type HooksWirePlanOptions, type SettingsHooksSalvageRow, type PluginHookModuleVerdict, type SessionHookVerdict, } from './pluginHooksWire.js';
|
|
246
|
+
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, type HooksSalvage, type HooksSalvageDrop, type HooksSalvageRejection, type HooksSalvageOutcome, type HooksSalvageDropCode, type HooksSalvageRejectionCode, } from './settingsHooksSalvage.js';
|
|
247
|
+
export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, type HostSuppliedKey, type HostSettingCause, type HostSettingDisposition, type HostSettingPlane, type HostSettingNoticeId, type HostSettingRow, type HostSettingNotice, type HostTurnVerdict, type HostTurnSettingsSources, type HostTurnSettingsInput, type HostSettingsCarried, type HostTurnSettings, } from './hostTurnSettings.js';
|
|
239
248
|
export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
|
|
240
249
|
export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
241
250
|
export type { HookMatcherVerdict, HookMatcherUnjudgedReason, HookMatcherRefusedReason } from './hookMatcherVerdict.js';
|
|
@@ -245,7 +254,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
|
|
|
245
254
|
export * from './liveInitToolFace.js';
|
|
246
255
|
export * from './printInitToolFace.js';
|
|
247
256
|
export * from './model/providerPresets.js';
|
|
248
|
-
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
257
|
+
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
249
258
|
export type { ActiveGate, ApprovalsResourceLike, AskAnswer, AssistantResourceLike, DecideOperationEnd, DecideOperationEvent, DecideOperationIdentity, DecideOperationObserver, DecideOperationSpan, DecideOperationStart, FindPendingOutcome, GateCurrentPending, GatePrompt, HitlBackendDenyDecision, HitlBridgeOptions, HitlCanUseToolFn, HitlClientLike, HitlDecideDenyOutcome, HitlPermissionDecisionLike, HitlSafetyCode, PlanReviewModeAfter, PlanReviewOutcome, } from './hitl/hitlBridge.js';
|
|
250
259
|
export * from './hitl/suspendedReopen.js';
|
|
251
260
|
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';
|
|
@@ -303,6 +312,12 @@ export type { EngineEnvView, EngineEnvGroupDecl, EngineEnvSourcingInput, EngineE
|
|
|
303
312
|
export * from './compensations.js';
|
|
304
313
|
export * from './request/printNotification.js';
|
|
305
314
|
export * from './seatContract.js';
|
|
315
|
+
export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
|
|
316
|
+
export type { DevicesFace, DevicesFaceInput, DevicesFaceUnavailableWhy } from './devicesFace.js';
|
|
317
|
+
export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
|
|
318
|
+
export type { CloudLoginFailureContext, EngineTargetReading, EngineTargetWatch } from './engineTargetSeat.js';
|
|
319
|
+
export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
|
|
320
|
+
export type { OnboardJsonObject, OnboardPlanEntry, OnboardProbeBodyReader, OnboardProbeDeps, OnboardProbeFetch, OnboardProbeRequestInit, OnboardProbeResponse, OnboardProbeTarget, OnboardWritePlan, OnboardWritePlanInput, OnboardWriteVerdict, } from './model/onboardJudgement.js';
|
|
306
321
|
export * from './agentSession/contract.js';
|
|
307
322
|
export * from './agentSession/backgroundView.js';
|
|
308
323
|
export { readAssistantInbox } from './assistantInbox.js';
|
|
@@ -334,7 +349,8 @@ export { engineCredentialRequirementOf } from './engineCredentialRequirement.js'
|
|
|
334
349
|
export type { EngineProbeAnswer, EngineCredentialNeed } from './engineCredentialRequirement.js';
|
|
335
350
|
export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
|
|
336
351
|
export type { CredentialAttachWord, CredentialConsent, CredentialFactName, CredentialFacts, CredentialProvenance, CredentialSidecarOwnership, CredentialTargetKind, CredentialTargetProvenance, } from './credentialProvenance.js';
|
|
337
|
-
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
352
|
+
export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
|
|
353
|
+
export type { SessionIdRefusal, SessionIdRefusalWhy } from './sessionIdSegment.js';
|
|
338
354
|
export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
|
|
339
355
|
export type { CutForDisplayOptions, CutForDisplayResult, NoticePresentationAudience, NoticeOutlet, NoticeOccurrence, NoticeSeatClass, NoticeDeployment, NoticePresentationFacts, OutletKind, OutletReachability, OutletReachabilityContext, OutletRenderingPlan, NoticePrintCarrier, NoticePrintLineInput, NoticePrintLineResult, } from './noticePresentation.js';
|
|
340
356
|
export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
|
package/dist/index.js
CHANGED
|
@@ -13,9 +13,9 @@ export * from './sdkWireTransit.js';
|
|
|
13
13
|
export { SEMA_SEGMENT_ID_KEY } from './adapt/textStream.js';
|
|
14
14
|
export { engineRefOf, sameEngineRef, TRANSCRIPT_ROW_SIDECAR_KEYS } from './engineRowRef.js';
|
|
15
15
|
export { isReplayMarked } from './replayBody.js';
|
|
16
|
-
export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE } from './eventLeg.js';
|
|
16
|
+
export { composeEventLeg, EVENT_LEG_KINDS, EVENT_LEG_TABLE, approvalFrameContextOf } from './eventLeg.js';
|
|
17
17
|
export { frameBindingOf, inheritFrameBinding } from './frameBinding.js';
|
|
18
|
-
export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, } from './subagentContentStore.js';
|
|
18
|
+
export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerForTests, clearSubagentContent, coerceOutput, configureSubagentContentStore, getBgParentRun, getBgParentRunOwner, getBgTerminalFacts, getSubagentContentSnapshot, isOwnEngineRun, parentToolCallIdOf, planSubagentViewSlots, publishSubagentContentEvent, pushSubagentLocalEcho, recordBgParentRun, recordOwnEngineRun, recordSubagentOwner, recordSubagentOwnerFromProgress, registerSubagentAlias, settleSubagentContent, SUBAGENT_CONTENT_STORE_DEFAULTS, subagentContentStoreConfig, subagentOwnerSessionConflicts, subscribeSubagentContent, subagentContentEventOf, } from './subagentContentStore.js';
|
|
19
19
|
export * from './engineAgentPanelStore.js';
|
|
20
20
|
export * from './engineAgentAbsence.js';
|
|
21
21
|
export * from './fleetAgentPanelProjection.js';
|
|
@@ -23,7 +23,9 @@ export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './pan
|
|
|
23
23
|
export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
|
|
24
24
|
export * from './engineInlineTaskStats.js';
|
|
25
25
|
export * from './printToolResultFrame.js';
|
|
26
|
-
export
|
|
26
|
+
export * from './printModelStatus.js';
|
|
27
|
+
export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
|
|
28
|
+
export { onEngineCapsChange } from './engineCapsChange.js';
|
|
27
29
|
export * from './sqlEngineCapability.js';
|
|
28
30
|
export * from './writeProtectionCapability.js';
|
|
29
31
|
export * from './webSearchBackendCapability.js';
|
|
@@ -81,7 +83,7 @@ export * from './modelCapabilityProbe.js';
|
|
|
81
83
|
export * from './classifierStatus.js';
|
|
82
84
|
export * from './engineToolLabelStore.js';
|
|
83
85
|
export * from './fleetTaskDesc.js';
|
|
84
|
-
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
|
|
86
|
+
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
|
|
85
87
|
export { isDiagnosticValueWord } from './displayUntrusted.js';
|
|
86
88
|
export * from './hostEnv.js';
|
|
87
89
|
export * from './unrefTimer.js';
|
|
@@ -93,7 +95,7 @@ export * from './engineWireSdk.js';
|
|
|
93
95
|
export * from './classifierVerdictWire.js';
|
|
94
96
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
95
97
|
export { findSystemReminderOpenTag } from './systemReminderTag.js';
|
|
96
|
-
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES,
|
|
98
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CONFLICT_IDEMPOTENCY_PAYLOAD_MISMATCH, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, idempotencyPayloadMismatchContent, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isIdempotencyPayloadMismatchCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
97
99
|
export * from './agentsWireCaps.js';
|
|
98
100
|
export { engineToolDirectoryOf } from './engineToolDirectory.js';
|
|
99
101
|
export * from './attachmentsWireCaps.js';
|
|
@@ -187,7 +189,9 @@ export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
|
|
|
187
189
|
export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
|
|
188
190
|
export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
|
|
189
191
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
190
|
-
export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
|
|
192
|
+
export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
|
|
193
|
+
export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
|
|
194
|
+
export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
|
|
191
195
|
export { projectEngineSessionMessages } from './engineSessionMessages.js';
|
|
192
196
|
export * from './resumeRefusalCopy.js';
|
|
193
197
|
export * from './wireRefusalCopy.js';
|
|
@@ -200,7 +204,9 @@ export * from './detachWire.js';
|
|
|
200
204
|
export * from './workflowMonitor.js';
|
|
201
205
|
export * from './workflowClient.js';
|
|
202
206
|
export * from './hooksWireCaps.js';
|
|
203
|
-
export { ENGINE_FIRED_HOOK_EVENTS, PLUGIN_HOOK_DISPOSITIONS, PLUGIN_HOOK_REASONS, PLUGIN_HOOK_EXCLUSION_REASONS, SETTINGS_HOOK_DROP_REASONS, isEngineFiredHookEvent, pluginHookVerdictOf, pluginHookReasonText, settingsHookDropText, pluginHookExecutorLabel, hooksNotRunNotice, settingsHooksKeptLocally, } from './pluginHooksWire.js';
|
|
207
|
+
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';
|
|
208
|
+
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, } from './settingsHooksSalvage.js';
|
|
209
|
+
export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, } from './hostTurnSettings.js';
|
|
204
210
|
export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
|
|
205
211
|
export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
206
212
|
export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
|
|
@@ -209,7 +215,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
|
|
|
209
215
|
export * from './liveInitToolFace.js';
|
|
210
216
|
export * from './printInitToolFace.js';
|
|
211
217
|
export * from './model/providerPresets.js';
|
|
212
|
-
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
218
|
+
export { __setDecideTimeoutRetryBudgetForTests, backendDeny, DecideTransportRetryExhaustedError, findPendingForTask, HitlBridge, HitlSafetyError, isPlanReviewModeAfter, makeHitlCanUseTool, MAX_DENY_REASON_CHARS, PLAN_REVIEW_MODE_AFTER_WORDS, readDecideCurrentPending, readWireErrorCode, } from './hitl/hitlBridge.js';
|
|
213
219
|
export * from './hitl/suspendedReopen.js';
|
|
214
220
|
export { APPROVAL_RESOLUTION_LANES, APPROVAL_NOT_SENT_CAUSES, APPROVAL_UNSETTLED_CAUSES, APPROVAL_NOTE_RETRACTED_DETAIL, APPROVAL_NOTE_EDIT_REFUSED_DETAIL, isApprovalDecided, approvalNotSentCause, approvalUnsettledCause, approvalResolutionDetail, } from './hitl/approvalResolution.js';
|
|
215
221
|
export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
|
|
@@ -258,6 +264,9 @@ export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js'
|
|
|
258
264
|
export * from './compensations.js';
|
|
259
265
|
export * from './request/printNotification.js';
|
|
260
266
|
export * from './seatContract.js';
|
|
267
|
+
export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
|
|
268
|
+
export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
|
|
269
|
+
export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
|
|
261
270
|
export * from './agentSession/contract.js';
|
|
262
271
|
export * from './agentSession/backgroundView.js';
|
|
263
272
|
export { readAssistantInbox } from './assistantInbox.js';
|
|
@@ -282,6 +291,6 @@ export { createMissLedger, createTranslator, DATA_FACE_LANGUAGE, msg, renderMess
|
|
|
282
291
|
export * from './ruleRemovalConsequence.js';
|
|
283
292
|
export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
|
|
284
293
|
export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
|
|
285
|
-
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
294
|
+
export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
|
|
286
295
|
export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
|
|
287
296
|
export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type UiLanguage } from './env/uiLanguage.js';
|
|
1
2
|
import type { RequestLane } from './request/taskRequest.js';
|
|
2
3
|
export type InheritEnvValueShape = 'false' | 'string' | 'number' | 'null' | 'array' | 'object' | 'other';
|
|
3
4
|
export type InheritEnvOwnCredentialsReading = {
|
|
@@ -27,5 +28,5 @@ export interface InheritEnvIntentInput {
|
|
|
27
28
|
readonly serviceIdentityVerified: boolean;
|
|
28
29
|
}
|
|
29
30
|
export declare function inheritEnvIntentOf(input: InheritEnvIntentInput): InheritEnvIntent;
|
|
30
|
-
export declare function inheritEnvNotConfirmedNotice(lang?: string): string;
|
|
31
|
-
export declare function inheritEnvNoticeOf(intent: InheritEnvIntent, lang?: string): string | undefined;
|
|
31
|
+
export declare function inheritEnvNotConfirmedNotice(lang?: UiLanguage | (string & {})): string;
|
|
32
|
+
export declare function inheritEnvNoticeOf(intent: InheritEnvIntent, lang?: UiLanguage | (string & {})): string | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { engineCapValue } from './engineCapsCache.js';
|
|
2
|
+
import { isUiLanguage } from './env/uiLanguage.js';
|
|
2
3
|
import { engineWireTarget } from './engineWireTarget.js';
|
|
4
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
5
|
const OWN_CREDENTIALS_WITHHELD_KEY = 'inherit_env.own_credentials_withheld';
|
|
4
6
|
const CONFIRMED = Object.freeze({ kind: 'confirmed' });
|
|
5
7
|
const ABSENT = Object.freeze({ kind: 'absent' });
|
|
@@ -84,10 +86,8 @@ export function inheritEnvIntentOf(input) {
|
|
|
84
86
|
return omit('identity_unverified');
|
|
85
87
|
return ALL;
|
|
86
88
|
}
|
|
87
|
-
const NOT_CONFIRMED_SENTENCE_EN = 'The engine has not confirmed that it withholds its own credentials from tool shells, so the tool shell gets a filtered environment (credential-looking variables such as GH_TOKEN are omitted) until the engine is upgraded.';
|
|
88
89
|
export function inheritEnvNotConfirmedNotice(lang) {
|
|
89
|
-
|
|
90
|
-
return NOT_CONFIRMED_SENTENCE_EN;
|
|
90
|
+
return renderMessage(msg('session.inheritEnv.notConfirmed'), isUiLanguage(lang) ? lang : undefined);
|
|
91
91
|
}
|
|
92
92
|
export function inheritEnvNoticeOf(intent, lang) {
|
|
93
93
|
try {
|
package/dist/inheritEnvWire.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
1
2
|
import { type InheritEnvWord, type TaskRequestLike } from './request/taskRequest.js';
|
|
2
3
|
export type InheritEnvWithheldCause = 'server_version_unknown';
|
|
3
4
|
export interface InheritEnvWithheld {
|
|
@@ -11,9 +12,9 @@ export interface InheritEnvDeclaration {
|
|
|
11
12
|
readonly withheld?: InheritEnvWithheld;
|
|
12
13
|
}
|
|
13
14
|
export declare function inheritEnvDeclaration(word: unknown, serverVersion: string | undefined): InheritEnvDeclaration;
|
|
14
|
-
export declare function inheritEnvWithheldNotice(withheld: InheritEnvWithheld): string;
|
|
15
|
+
export declare function inheritEnvWithheldNotice(withheld: InheritEnvWithheld, lang?: UiLanguage): string;
|
|
15
16
|
export interface InheritEnvRefusalDetail {
|
|
16
17
|
readonly code: string;
|
|
17
18
|
}
|
|
18
19
|
export declare function inheritEnvRefusalFromError(err: unknown, sentRequest: TaskRequestLike | undefined): InheritEnvRefusalDetail | null;
|
|
19
|
-
export declare function inheritEnvRefusalContent(_detail: InheritEnvRefusalDetail): string;
|
|
20
|
+
export declare function inheritEnvRefusalContent(_detail: InheritEnvRefusalDetail, lang?: UiLanguage): string;
|
package/dist/inheritEnvWire.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
1
2
|
import { INHERIT_ENV_WORDS, isInheritEnvWord } from './request/taskRequest.js';
|
|
2
3
|
import { settingsPermissionBucketRefusalFromError } from './wireRefusalCopy.js';
|
|
3
4
|
import { engineVersionTier } from './supportFloor.js';
|
|
5
|
+
import { guardedRead, readOwnDataValue } from './ownKey.js';
|
|
4
6
|
const EMPTY_DECLARATION = Object.freeze({ field: Object.freeze({}) });
|
|
5
7
|
export function inheritEnvDeclaration(word, serverVersion) {
|
|
6
8
|
if (word === undefined || word === null)
|
|
@@ -14,12 +16,15 @@ export function inheritEnvDeclaration(word, serverVersion) {
|
|
|
14
16
|
}
|
|
15
17
|
const WITHHELD_NOTICES = Object.freeze({
|
|
16
18
|
server_version_unknown: Object.freeze({
|
|
17
|
-
all:
|
|
18
|
-
scrub:
|
|
19
|
+
all: 'session.inheritEnv.withheld.all',
|
|
20
|
+
scrub: 'session.inheritEnv.withheld.scrub',
|
|
19
21
|
}),
|
|
20
22
|
});
|
|
21
|
-
const WITHHELD_UNKNOWN_NOTICE = '
|
|
22
|
-
export function inheritEnvWithheldNotice(withheld) {
|
|
23
|
+
const WITHHELD_UNKNOWN_NOTICE = 'session.inheritEnv.withheld.unknown';
|
|
24
|
+
export function inheritEnvWithheldNotice(withheld, lang) {
|
|
25
|
+
return renderMessage(msg(inheritEnvWithheldKey(withheld)), lang);
|
|
26
|
+
}
|
|
27
|
+
function inheritEnvWithheldKey(withheld) {
|
|
23
28
|
try {
|
|
24
29
|
if (typeof withheld !== 'object' || withheld === null)
|
|
25
30
|
return WITHHELD_UNKNOWN_NOTICE;
|
|
@@ -37,12 +42,7 @@ const FIELD_INVALID = 'request.field_invalid';
|
|
|
37
42
|
function readGuarded(o, key) {
|
|
38
43
|
if (typeof o !== 'object' || o === null)
|
|
39
44
|
return undefined;
|
|
40
|
-
|
|
41
|
-
return o[key];
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return undefined;
|
|
45
|
-
}
|
|
45
|
+
return guardedRead(() => readOwnDataValue(o, key));
|
|
46
46
|
}
|
|
47
47
|
export function inheritEnvRefusalFromError(err, sentRequest) {
|
|
48
48
|
try {
|
|
@@ -58,8 +58,6 @@ export function inheritEnvRefusalFromError(err, sentRequest) {
|
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export function inheritEnvRefusalContent(_detail) {
|
|
64
|
-
return REFUSAL_NOT_ACCEPTED;
|
|
61
|
+
export function inheritEnvRefusalContent(_detail, lang) {
|
|
62
|
+
return renderMessage(msg('session.inheritEnv.refusal'), lang);
|
|
65
63
|
}
|
package/dist/interactiveHalt.js
CHANGED
|
@@ -3,17 +3,28 @@ export const RUN_LEVEL_STOP_ERROR_CODES = Object.freeze([
|
|
|
3
3
|
]);
|
|
4
4
|
const RUN_LEVEL_STOP_STATUS = 409;
|
|
5
5
|
function enginePointsToRunLevelStop(outcome) {
|
|
6
|
-
const
|
|
7
|
-
return (
|
|
8
|
-
|
|
9
|
-
typeof
|
|
10
|
-
RUN_LEVEL_STOP_ERROR_CODES.includes(
|
|
6
|
+
const code = ownDataSlot(outcome, 'errorCode');
|
|
7
|
+
return (ownDataSlot(outcome, 'kind') === 'refused' &&
|
|
8
|
+
ownDataSlot(outcome, 'status') === RUN_LEVEL_STOP_STATUS &&
|
|
9
|
+
typeof code === 'string' &&
|
|
10
|
+
RUN_LEVEL_STOP_ERROR_CODES.includes(code));
|
|
11
|
+
}
|
|
12
|
+
function ownDataSlot(o, key) {
|
|
13
|
+
try {
|
|
14
|
+
if (typeof o !== 'object' || o === null)
|
|
15
|
+
return undefined;
|
|
16
|
+
const d = Object.getOwnPropertyDescriptor(o, key);
|
|
17
|
+
return d !== undefined && Object.hasOwn(d, 'value') ? d.value : undefined;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
11
22
|
}
|
|
12
23
|
export function planInteractiveHalt(input) {
|
|
13
24
|
const outcome = input.interruptOutcome;
|
|
14
25
|
if (outcome === undefined || outcome === null)
|
|
15
26
|
return { action: 'interrupt', reason: 'first-shot' };
|
|
16
|
-
const kind = outcome
|
|
27
|
+
const kind = ownDataSlot(outcome, 'kind');
|
|
17
28
|
if (kind === 'halted')
|
|
18
29
|
return { action: 'none', reason: 'halted' };
|
|
19
30
|
if (kind === 'refused') {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentClient } from '@sema-agent/sdk';
|
|
2
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
3
|
export interface LiveModelInfo {
|
|
3
4
|
name: string;
|
|
4
5
|
id?: string;
|
|
@@ -80,7 +81,7 @@ export type ModelCandidateRejectedReading = {
|
|
|
80
81
|
readonly kind: 'unreadable';
|
|
81
82
|
};
|
|
82
83
|
export declare function modelCandidateRejectedOf(catalog?: LiveModelCatalog | null): ModelCandidateRejectedReading;
|
|
83
|
-
export declare function modelCandidateRejectedContent(reading: ModelCandidateRejectedReading): string | undefined;
|
|
84
|
+
export declare function modelCandidateRejectedContent(reading: ModelCandidateRejectedReading, lang?: UiLanguage): string | undefined;
|
|
84
85
|
export interface RoutePairingVerdict {
|
|
85
86
|
verdict: 'ok' | 'broken' | 'unknown';
|
|
86
87
|
posture?: string;
|
package/dist/liveModelCatalog.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { frozenJsonCopyOf, liveDefaultModelCopy, liveModelRowCopy } from './model/liveCatalogShape.js';
|
|
2
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
2
3
|
let catalog = null;
|
|
3
4
|
let refresher = null;
|
|
4
5
|
export function setLiveModelCatalog(next) {
|
|
@@ -269,27 +270,32 @@ export function modelCandidateRejectedOf(catalog = getLiveModelCatalog()) {
|
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
272
|
const CONFIG_DOMAIN_WORD = /^[a-z][a-z0-9_.-]{0,63}$/;
|
|
272
|
-
export function modelCandidateRejectedContent(reading) {
|
|
273
|
+
export function modelCandidateRejectedContent(reading, lang) {
|
|
273
274
|
try {
|
|
274
275
|
if (reading === null || typeof reading !== 'object' || reading.kind !== 'rejected')
|
|
275
276
|
return undefined;
|
|
276
277
|
const named = reading.domains.filter((w) => CONFIG_DOMAIN_WORD.test(w));
|
|
277
278
|
const which = named.length > 0 && named.length === reading.domains.length ? ` (${named.join(', ')})` : '';
|
|
278
|
-
return
|
|
279
|
+
return renderMessage(msg('model.catalog.candidateRejected', { which }), lang);
|
|
279
280
|
}
|
|
280
281
|
catch {
|
|
281
282
|
return undefined;
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
|
-
const
|
|
285
|
-
|
|
285
|
+
const ROUTE_PAIRING_VERDICTS = Object.freeze({
|
|
286
|
+
'ok:per-model': 'ok',
|
|
287
|
+
'ok:paired': 'ok',
|
|
288
|
+
'ok:keyless': 'ok',
|
|
289
|
+
'broken:credential_mismatch': 'broken',
|
|
290
|
+
'broken:credential_missing': 'broken',
|
|
291
|
+
'broken:credential_origin_mismatch': 'broken',
|
|
292
|
+
'broken:credential_answer_conflict': 'broken',
|
|
293
|
+
});
|
|
286
294
|
export function routePairingVerdict(v) {
|
|
287
295
|
if (typeof v !== 'string' || v.length === 0)
|
|
288
296
|
return { verdict: 'unknown' };
|
|
289
|
-
if (
|
|
290
|
-
return { verdict:
|
|
291
|
-
if (ROUTE_PAIRING_BROKEN.has(v))
|
|
292
|
-
return { verdict: 'broken', posture: v };
|
|
297
|
+
if (Object.hasOwn(ROUTE_PAIRING_VERDICTS, v))
|
|
298
|
+
return { verdict: ROUTE_PAIRING_VERDICTS[v], posture: v };
|
|
293
299
|
return { verdict: 'unknown', posture: v };
|
|
294
300
|
}
|
|
295
301
|
const unreadableCatalog = (why) => Object.freeze({ kind: 'unreadable', why });
|
package/dist/mcpPanel.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentClient } from '@sema-agent/sdk';
|
|
2
2
|
import { type WiringManifestMcpEntryView } from './adapter/downstream/eventToSdkMessage.js';
|
|
3
3
|
import { type McpEngineLegHealth } from './mcpLiveness.js';
|
|
4
|
+
import { type ScenarioRefusalReading } from './scenarioRefusal.js';
|
|
4
5
|
export interface McpPanelServerView {
|
|
5
6
|
name: string;
|
|
6
7
|
status: string;
|
|
@@ -16,14 +17,22 @@ export interface McpPanelLastLegView {
|
|
|
16
17
|
at: string;
|
|
17
18
|
mcp: WiringManifestMcpEntryView[];
|
|
18
19
|
}
|
|
19
|
-
export interface
|
|
20
|
+
export interface McpPanelServersView {
|
|
20
21
|
asOf: string;
|
|
22
|
+
lastLegMcp?: McpPanelLastLegView;
|
|
23
|
+
lastLegMcpUnreadable?: true;
|
|
21
24
|
servers: McpPanelServerView[];
|
|
22
25
|
degraded?: true;
|
|
26
|
+
}
|
|
27
|
+
export interface McpPanelRefusalView {
|
|
28
|
+
asOf: string;
|
|
23
29
|
lastLegMcp?: McpPanelLastLegView;
|
|
24
30
|
lastLegMcpUnreadable?: true;
|
|
31
|
+
scenarioRefusal: ScenarioRefusalReading;
|
|
25
32
|
}
|
|
33
|
+
export type McpPanelView = McpPanelServersView | McpPanelRefusalView;
|
|
26
34
|
export declare function projectMcpPanel(body: unknown): McpPanelView | undefined;
|
|
35
|
+
export declare function mcpPanelRefusalOf(view: McpPanelView | undefined): ScenarioRefusalReading | undefined;
|
|
27
36
|
export declare function fetchMcpPanel(client: Pick<AgentClient, 'sessions'>, sessionId: string, opts?: {
|
|
28
37
|
signal?: AbortSignal;
|
|
29
38
|
}): Promise<McpPanelView | undefined>;
|
package/dist/mcpPanel.js
CHANGED
|
@@ -3,6 +3,7 @@ import { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
|
3
3
|
import { projectMcpSection } from './adapter/downstream/eventToSdkMessage.js';
|
|
4
4
|
import { capForDisplay } from './fleetTaskDesc.js';
|
|
5
5
|
import { mcpLivenessRollupOf } from './mcpLiveness.js';
|
|
6
|
+
import { scenarioRefusalOf } from './scenarioRefusal.js';
|
|
6
7
|
const MCP_PANEL_ERROR_MAX = 200;
|
|
7
8
|
const MCP_PANEL_WORD_MAX = 40;
|
|
8
9
|
const MCP_PANEL_NAMES_MAX = 8;
|
|
@@ -40,19 +41,29 @@ export function projectMcpPanel(body) {
|
|
|
40
41
|
return undefined;
|
|
41
42
|
if (!nonEmpty(body.asOf))
|
|
42
43
|
return undefined;
|
|
43
|
-
|
|
44
|
+
const refusal = scenarioRefusalOf(body);
|
|
45
|
+
if (refusal === null)
|
|
44
46
|
return undefined;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
let view;
|
|
48
|
+
if (refusal !== undefined) {
|
|
49
|
+
view = { asOf: body.asOf, scenarioRefusal: refusal };
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
if (!Array.isArray(body.servers))
|
|
53
|
+
return undefined;
|
|
54
|
+
const servers = [];
|
|
55
|
+
for (const r of body.servers) {
|
|
56
|
+
const row = projectServerRow(r);
|
|
57
|
+
if (row !== undefined)
|
|
58
|
+
servers.push(row);
|
|
59
|
+
}
|
|
60
|
+
if (body.servers.length > 0 && servers.length === 0)
|
|
61
|
+
return undefined;
|
|
62
|
+
const sv = { asOf: body.asOf, servers };
|
|
63
|
+
if (body.degraded === true)
|
|
64
|
+
sv.degraded = true;
|
|
65
|
+
view = sv;
|
|
50
66
|
}
|
|
51
|
-
if (body.servers.length > 0 && servers.length === 0)
|
|
52
|
-
return undefined;
|
|
53
|
-
const view = { asOf: body.asOf, servers };
|
|
54
|
-
if (body.degraded === true)
|
|
55
|
-
view.degraded = true;
|
|
56
67
|
if ('lastLegMcp' in body) {
|
|
57
68
|
const leg = projectLastLeg(body.lastLegMcp);
|
|
58
69
|
if (leg !== undefined)
|
|
@@ -62,6 +73,20 @@ export function projectMcpPanel(body) {
|
|
|
62
73
|
}
|
|
63
74
|
return view;
|
|
64
75
|
}
|
|
76
|
+
export function mcpPanelRefusalOf(view) {
|
|
77
|
+
try {
|
|
78
|
+
if (view === null || typeof view !== 'object')
|
|
79
|
+
return undefined;
|
|
80
|
+
const d = Object.getOwnPropertyDescriptor(view, 'scenarioRefusal');
|
|
81
|
+
if (d === undefined || !('value' in d))
|
|
82
|
+
return undefined;
|
|
83
|
+
const r = d.value;
|
|
84
|
+
return r !== null && typeof r === 'object' && !Array.isArray(r) ? r : undefined;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
65
90
|
export async function fetchMcpPanel(client, sessionId, opts) {
|
|
66
91
|
if (!isSessionIdPathSegment(sessionId))
|
|
67
92
|
return undefined;
|
|
@@ -98,12 +123,14 @@ void _mcpPanelShapePin;
|
|
|
98
123
|
export function mcpEngineLegPresence(view) {
|
|
99
124
|
if (view === undefined)
|
|
100
125
|
return 'unknown';
|
|
101
|
-
if (view.servers.length > 0)
|
|
102
|
-
return 'present';
|
|
103
126
|
if (view.lastLegMcp !== undefined)
|
|
104
127
|
return 'present';
|
|
105
128
|
if (view.lastLegMcpUnreadable === true)
|
|
106
129
|
return 'present';
|
|
130
|
+
if (!('servers' in view))
|
|
131
|
+
return 'unknown';
|
|
132
|
+
if (view.servers.length > 0)
|
|
133
|
+
return 'present';
|
|
107
134
|
if (view.degraded === true)
|
|
108
135
|
return 'present';
|
|
109
136
|
return 'absent';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
1
2
|
export type McpProbeReading = {
|
|
2
3
|
kind: 'unobserved';
|
|
3
4
|
} | {
|
|
@@ -12,4 +13,4 @@ export type McpProbeReading = {
|
|
|
12
13
|
export declare function projectMcpProbeCapability(caps: unknown): McpProbeReading | undefined;
|
|
13
14
|
export declare function observedMcpProbe(baseUrl?: string | undefined): McpProbeReading;
|
|
14
15
|
export declare function mcpProbeAvailable(reading: McpProbeReading): 'yes' | 'no' | 'unknown';
|
|
15
|
-
export declare function mcpProbeDoctorDetail(reading: McpProbeReading): string;
|
|
16
|
+
export declare function mcpProbeDoctorDetail(reading: McpProbeReading, lang?: UiLanguage): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { engineWireTarget } from './engineWireTarget.js';
|
|
2
2
|
import { createEngineCapReader, unreadableReadingDetail } from './engineCapReader.js';
|
|
3
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
4
|
import { ownDataField } from './ownKey.js';
|
|
4
5
|
export function projectMcpProbeCapability(caps) {
|
|
5
6
|
try {
|
|
@@ -30,22 +31,17 @@ export function mcpProbeAvailable(reading) {
|
|
|
30
31
|
return 'no';
|
|
31
32
|
return 'unknown';
|
|
32
33
|
}
|
|
33
|
-
export function mcpProbeDoctorDetail(reading) {
|
|
34
|
+
export function mcpProbeDoctorDetail(reading, lang) {
|
|
34
35
|
switch (reading.kind) {
|
|
35
36
|
case 'unreadable':
|
|
36
|
-
return unreadableReadingDetail('
|
|
37
|
+
return unreadableReadingDetail(renderMessage(msg('notice.capability.subject.mcpProbe'), lang), lang);
|
|
37
38
|
case 'unobserved':
|
|
38
|
-
return ('
|
|
39
|
-
'this process has no usable capabilities reading cached for it (none received, the last one was unreadable, or the last one was discarded when the engine connection was reset; this process cannot tell which)');
|
|
39
|
+
return renderMessage(msg('notice.capability.mcpProbe.unobserved'), lang);
|
|
40
40
|
case 'not_reported':
|
|
41
|
-
return ('
|
|
42
|
-
'(asking it usually answers with a machine-readable route-not-found, though a timeout or an uncoded gateway answer still says nothing either way); ' +
|
|
43
|
-
'prefer the session panel last-leg roster where that panel carries one, and otherwise show this reason rather than an entry that cannot answer');
|
|
41
|
+
return renderMessage(msg('notice.capability.mcpProbe.notReported'), lang);
|
|
44
42
|
case 'absent':
|
|
45
|
-
return ('
|
|
46
|
-
'this client does not guess why, and whether caller-supplied declarations are honored is a separate position with its own answer');
|
|
43
|
+
return renderMessage(msg('notice.capability.mcpProbe.absent'), lang);
|
|
47
44
|
case 'present':
|
|
48
|
-
return ('
|
|
49
|
-
'and a probe of caller-supplied declarations answers with the very same body shape');
|
|
45
|
+
return renderMessage(msg('notice.capability.mcpProbe.present'), lang);
|
|
50
46
|
}
|
|
51
47
|
}
|