@sema-agent/client-core 0.98.0 → 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +376 -0
- package/README.md +61 -35
- package/dist/adapt/arms.js +120 -55
- package/dist/adapt/panelTasks.d.ts +3 -2
- package/dist/adapt/panelTasks.js +34 -11
- package/dist/adapt/textStream.d.ts +1 -1
- package/dist/adapt/textStream.js +51 -28
- package/dist/adapter/activeRunSelfHeal.d.ts +11 -3
- package/dist/adapter/activeRunSelfHeal.js +210 -294
- package/dist/adapter/downstream/eventToSdkMessage.d.ts +25 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +176 -12
- package/dist/adapter/downstream/terminalToSdkResult.js +10 -0
- package/dist/adapter/downstream/wiringManifestView.d.ts +3 -1
- package/dist/adapter/downstream/wiringManifestView.js +1 -0
- package/dist/adapter/runStream.js +82 -40
- package/dist/adapter/types.d.ts +2 -0
- package/dist/adapter/types.js +2 -1
- package/dist/agentSession/engineSessionBackgroundStop.js +16 -8
- package/dist/agentsWireCaps.d.ts +7 -3
- package/dist/agentsWireCaps.js +133 -39
- package/dist/cloudConfigWireCaps.d.ts +10 -1
- package/dist/cloudConfigWireCaps.js +181 -65
- package/dist/compactionStatus.d.ts +34 -0
- package/dist/compactionStatus.js +196 -0
- 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/decideFailureNote.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 +153 -5
- package/dist/engineAgentPanelStore.d.ts +14 -4
- 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 +11 -2
- package/dist/engineErrorCodes.js +11 -12
- package/dist/engineRowRef.js +4 -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/engineToolDirectory.d.ts +3 -0
- package/dist/engineToolDirectory.js +4 -2
- 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 +7 -5
- package/dist/eventLeg.js +68 -49
- package/dist/fileHistoryCaptureCapability.d.ts +2 -4
- package/dist/fileHistoryCaptureCapability.js +12 -22
- 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 +18 -1
- package/dist/generated/engineFactTables.js +56 -0
- package/dist/generated/engineNoticeTables.js +12 -3
- package/dist/generated/settingsSchemaFns.d.ts +18 -0
- package/dist/generated/settingsSchemaFns.js +70 -0
- package/dist/generated/settingsSchemaHooksClassifier.d.ts +2 -0
- package/dist/generated/settingsSchemaHooksClassifier.js +254 -0
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -0
- package/dist/generated/settingsSchemaMcpRequestEntry.js +162 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +9 -0
- package/dist/generated/settingsSchemaTypes.d.ts +133 -0
- package/dist/generated/settingsSchemaTypes.js +1 -0
- package/dist/hitl/allowRuleShadow.d.ts +2 -1
- package/dist/hitl/allowRuleShadow.js +18 -15
- package/dist/hitl/approvalCardReasons.d.ts +3 -2
- package/dist/hitl/approvalCardReasons.js +29 -30
- package/dist/hitl/approvalHolds.d.ts +17 -0
- package/dist/hitl/approvalHolds.js +114 -29
- package/dist/hitl/askClassPair.d.ts +2 -2
- 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/attributionLadder.d.ts +23 -0
- package/dist/hitl/attributionLadder.js +67 -0
- 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/decisionLedger.d.ts +55 -0
- package/dist/hitl/decisionLedger.js +156 -0
- package/dist/hitl/decisionRefusal.d.ts +1 -0
- package/dist/hitl/decisionRefusal.js +1 -1
- package/dist/hitl/decisionSend.d.ts +113 -0
- package/dist/hitl/decisionSend.js +579 -0
- package/dist/hitl/frameRouter.js +7 -8
- package/dist/hitl/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +21 -9
- 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 +53 -76
- package/dist/hitl/sessionPolicyDeliverable.d.ts +2 -0
- package/dist/hitl/sessionPolicyDeliverable.js +49 -9
- 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 +120 -147
- package/dist/hooksWireCaps.js +145 -56
- package/dist/host.d.ts +21 -0
- package/dist/hostTurnSettings.d.ts +110 -0
- package/dist/hostTurnSettings.js +692 -0
- package/dist/humanTurn.d.ts +15 -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 +713 -0
- package/dist/i18n/messages.en.js +713 -0
- package/dist/i18n/messages.zh.js +854 -1
- package/dist/index.d.ts +45 -13
- package/dist/index.js +27 -9
- package/dist/inheritEnvCapability.d.ts +4 -2
- package/dist/inheritEnvCapability.js +12 -5
- package/dist/inheritEnvWire.d.ts +3 -2
- package/dist/inheritEnvWire.js +14 -16
- package/dist/injectionLaneNotice.d.ts +5 -0
- package/dist/injectionLaneNotice.js +46 -0
- 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 +42 -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/mcpReconnect.js +2 -2
- package/dist/mcpToolToggles.d.ts +6 -0
- package/dist/mcpToolToggles.js +46 -0
- package/dist/mcpWireCaps.d.ts +43 -3
- package/dist/mcpWireCaps.js +194 -59
- package/dist/mcpWireTransport.d.ts +4 -0
- package/dist/mcpWireTransport.js +18 -0
- 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 +65 -0
- package/dist/modelCapabilityProbe.js +601 -0
- package/dist/modelIdentityResolvability.d.ts +5 -0
- package/dist/modelIdentityResolvability.js +49 -22
- package/dist/ownKey.d.ts +33 -0
- package/dist/ownKey.js +109 -0
- package/dist/panelReduce.d.ts +11 -1
- package/dist/panelReduce.js +95 -16
- package/dist/panelStateHolder.d.ts +1 -0
- package/dist/panelStateHolder.js +10 -1
- package/dist/permissionRuleIssue.d.ts +2 -1
- package/dist/permissionRuleIssue.js +23 -20
- package/dist/permissionRulesWriteCapability.d.ts +2 -1
- package/dist/permissionRulesWriteCapability.js +8 -6
- package/dist/pluginHooksWire.d.ts +46 -3
- package/dist/pluginHooksWire.js +220 -12
- package/dist/prepareRefusal.d.ts +8 -0
- package/dist/prepareRefusal.js +72 -0
- package/dist/printModelStatus.d.ts +63 -0
- package/dist/printModelStatus.js +155 -0
- package/dist/request/taskRequest.d.ts +16 -10
- package/dist/request/taskRequest.js +195 -58
- package/dist/resumeRefusalCopy.d.ts +14 -9
- package/dist/resumeRefusalCopy.js +89 -144
- package/dist/retryStatus.d.ts +55 -0
- package/dist/retryStatus.js +155 -19
- package/dist/ruleRefusalSentence.d.ts +4 -0
- package/dist/ruleRefusalSentence.js +58 -0
- package/dist/sandboxWire.d.ts +2 -1
- package/dist/sandboxWire.js +55 -21
- package/dist/scenarioRefusal.d.ts +10 -0
- package/dist/scenarioRefusal.js +111 -0
- package/dist/seam.d.ts +48 -9
- package/dist/seam.js +54 -5
- package/dist/seatContract.d.ts +272 -14
- package/dist/seatContract.js +711 -23
- 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/settingsCredentialKeyPaths.d.ts +8 -0
- package/dist/settingsCredentialKeyPaths.js +219 -0
- 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/skillsWireCaps.d.ts +0 -3
- package/dist/skillsWireCaps.js +1 -2
- package/dist/sseIdleTriage.js +3 -2
- package/dist/subagent/engineSubagentResume.js +15 -9
- package/dist/subagentContentStore.d.ts +4 -0
- package/dist/subagentContentStore.js +157 -27
- package/dist/toolHistoryMismatch.js +3 -2
- package/dist/toolRoster.d.ts +3 -2
- package/dist/toolRoster.js +21 -20
- package/dist/toolsFlagNames.d.ts +8 -0
- package/dist/toolsFlagNames.js +110 -0
- package/dist/turnFailurePresentation.d.ts +12 -1
- package/dist/turnFailurePresentation.js +220 -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 +62 -16
- package/dist/wireRefusalCopy.js +307 -148
- package/dist/workflowsJournalCapability.d.ts +2 -1
- package/dist/workflowsJournalCapability.js +8 -6
- package/docs/INTEGRATION-CLIENTS.md +951 -42
- 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,
|
|
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, 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,11 @@ 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 * from './compactionStatus.js';
|
|
35
|
+
export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
|
|
36
|
+
export { onEngineCapsChange } from './engineCapsChange.js';
|
|
37
|
+
export type { EngineCapState, EngineCapsChange, EngineCapsLanding, EngineCapsProbeRotation, EngineCapsReprobe, EngineCapValueState, } from './engineCapsCache.js';
|
|
35
38
|
export * from './sqlEngineCapability.js';
|
|
36
39
|
export * from './writeProtectionCapability.js';
|
|
37
40
|
export * from './webSearchBackendCapability.js';
|
|
@@ -96,13 +99,13 @@ export * from './modelCapabilityProbe.js';
|
|
|
96
99
|
export * from './classifierStatus.js';
|
|
97
100
|
export * from './engineToolLabelStore.js';
|
|
98
101
|
export * from './fleetTaskDesc.js';
|
|
99
|
-
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
|
|
102
|
+
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
|
|
100
103
|
export type { DisplayUntrustedOptions, DisplayMark, DisplayMarkSpan, DisplayUntrustedMarked } from './displayUntrusted.js';
|
|
101
104
|
export { isDiagnosticValueWord } from './displayUntrusted.js';
|
|
102
105
|
export type * from './types/engineState.js';
|
|
103
106
|
export * from './hostEnv.js';
|
|
104
107
|
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';
|
|
108
|
+
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
109
|
export { preemptReceiptLine, type PreemptOutcome, type PreemptParkedStatus } from './preemptWire.js';
|
|
107
110
|
export { readSteerReceipt, type SteerReceiptReading } from './steerReceipt.js';
|
|
108
111
|
export * from './sseIdleTriage.js';
|
|
@@ -110,8 +113,9 @@ export * from './engineWireSdk.js';
|
|
|
110
113
|
export * from './classifierVerdictWire.js';
|
|
111
114
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
112
115
|
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,
|
|
116
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_K8S_LANE_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, CONFIG_TOOL_FACE_CONTROL, 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, 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, PROMPT_ASSEMBLED_ROLE_REFUSED, 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
117
|
export type { DelegationCapDisposition, ModelFallbackReason, OperatorGateRefusal, RunDeathVerdictCode, } from './engineErrorCodes.js';
|
|
118
|
+
export { imageInvalidFailureNoteOf, prepareRefusalCodeOf, prepareRefusalNoteOf, type PrepareRefusalCode, type PrepareRefusalNoteFacts } from './prepareRefusal.js';
|
|
115
119
|
export * from './agentsWireCaps.js';
|
|
116
120
|
export { engineToolDirectoryOf } from './engineToolDirectory.js';
|
|
117
121
|
export type { EngineToolDirectory, EngineToolDirectorySource } from './engineToolDirectory.js';
|
|
@@ -219,8 +223,13 @@ export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredP
|
|
|
219
223
|
export type { PromptDeliveryLedger, PromptDeliveryRecord } from './promptDelivery.js';
|
|
220
224
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
221
225
|
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';
|
|
226
|
+
export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
|
|
227
|
+
export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, HumanTurnNotice, } from './humanTurn.js';
|
|
228
|
+
export type { UserAttachment } from '@sema-agent/sdk';
|
|
229
|
+
export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
|
|
230
|
+
export type { UserAttachmentSeatReading, UserAttachmentSeatPresent, UserAttachmentSeatLimits } from './userAttachmentSeat.js';
|
|
231
|
+
export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
|
|
232
|
+
export type { ScenarioRefusalReading } from './scenarioRefusal.js';
|
|
224
233
|
export { projectEngineSessionMessages } from './engineSessionMessages.js';
|
|
225
234
|
export type { EngineHistoryProjection, EngineHistoryProjectionOpts, EngineHistoryMessage, EngineHistoryMessageBody, EngineHistoryBlock, EngineHistoryTextBlock, EngineHistoryThinkingBlock, EngineHistoryToolUseBlock, EngineHistoryToolResultBlock, EngineHistoryMediaBlock, EngineHistoryOpaqueBlock, EngineHistoryBase64Source, EngineHistoryJson, EngineHistorySkipped, } from './engineSessionMessages.js';
|
|
226
235
|
export * from './resumeRefusalCopy.js';
|
|
@@ -235,7 +244,9 @@ export * from './detachWire.js';
|
|
|
235
244
|
export * from './workflowMonitor.js';
|
|
236
245
|
export * from './workflowClient.js';
|
|
237
246
|
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';
|
|
247
|
+
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';
|
|
248
|
+
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, type HooksSalvage, type HooksSalvageDrop, type HooksSalvageRejection, type HooksSalvageOutcome, type HooksSalvageDropCode, type HooksSalvageRejectionCode, } from './settingsHooksSalvage.js';
|
|
249
|
+
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
250
|
export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
|
|
240
251
|
export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
241
252
|
export type { HookMatcherVerdict, HookMatcherUnjudgedReason, HookMatcherRefusedReason } from './hookMatcherVerdict.js';
|
|
@@ -245,7 +256,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
|
|
|
245
256
|
export * from './liveInitToolFace.js';
|
|
246
257
|
export * from './printInitToolFace.js';
|
|
247
258
|
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';
|
|
259
|
+
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
260
|
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
261
|
export * from './hitl/suspendedReopen.js';
|
|
251
262
|
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';
|
|
@@ -262,6 +273,10 @@ export { ruleToolNameVerdictOf } from './protocolSegment.js';
|
|
|
262
273
|
export type { RuleToolNameReading } from './protocolSegment.js';
|
|
263
274
|
export * from './hitl/askGateWire.js';
|
|
264
275
|
export * from './hitl/planReviewWire.js';
|
|
276
|
+
export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
|
|
277
|
+
export type { DecisionIdentity } from './hitl/decisionLedger.js';
|
|
278
|
+
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, } from './hitl/decisionSend.js';
|
|
279
|
+
export type { HitlApprovalDecisionRequest, HitlAskDecisionRequest, HitlDecisionApplied, HitlDecisionFamily, HitlDecisionGate, HitlDecisionNotApplied, HitlDecisionNotAppliedCause, HitlDecisionNotSent, HitlDecisionNotSentCause, HitlDecisionSendClient, HitlDecisionSendDeps, HitlDecisionSendOutcome, HitlDecisionSendRequest, HitlDecisionSettledElsewhere, HitlDecisionUnconfirmed, HitlDecisionUnconfirmedCause, HitlElicitationDecisionRequest, } from './hitl/decisionSend.js';
|
|
265
280
|
export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
|
|
266
281
|
export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
|
|
267
282
|
export * from './hitl/parkOwnership.js';
|
|
@@ -303,6 +318,14 @@ export type { EngineEnvView, EngineEnvGroupDecl, EngineEnvSourcingInput, EngineE
|
|
|
303
318
|
export * from './compensations.js';
|
|
304
319
|
export * from './request/printNotification.js';
|
|
305
320
|
export * from './seatContract.js';
|
|
321
|
+
export { mcpToolTogglesToExcludeTools } from './mcpToolToggles.js';
|
|
322
|
+
export type { McpToolToggleKey, McpMountedServers } from './mcpToolToggles.js';
|
|
323
|
+
export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
|
|
324
|
+
export type { DevicesFace, DevicesFaceInput, DevicesFaceUnavailableWhy } from './devicesFace.js';
|
|
325
|
+
export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
|
|
326
|
+
export type { CloudLoginFailureContext, EngineTargetReading, EngineTargetWatch } from './engineTargetSeat.js';
|
|
327
|
+
export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
|
|
328
|
+
export type { OnboardJsonObject, OnboardPlanEntry, OnboardProbeBodyReader, OnboardProbeDeps, OnboardProbeFetch, OnboardProbeRequestInit, OnboardProbeResponse, OnboardProbeTarget, OnboardWritePlan, OnboardWritePlanInput, OnboardWriteVerdict, } from './model/onboardJudgement.js';
|
|
306
329
|
export * from './agentSession/contract.js';
|
|
307
330
|
export * from './agentSession/backgroundView.js';
|
|
308
331
|
export { readAssistantInbox } from './assistantInbox.js';
|
|
@@ -334,8 +357,17 @@ export { engineCredentialRequirementOf } from './engineCredentialRequirement.js'
|
|
|
334
357
|
export type { EngineProbeAnswer, EngineCredentialNeed } from './engineCredentialRequirement.js';
|
|
335
358
|
export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
|
|
336
359
|
export type { CredentialAttachWord, CredentialConsent, CredentialFactName, CredentialFacts, CredentialProvenance, CredentialSidecarOwnership, CredentialTargetKind, CredentialTargetProvenance, } from './credentialProvenance.js';
|
|
337
|
-
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
360
|
+
export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
|
|
361
|
+
export type { SessionIdRefusal, SessionIdRefusalWhy } from './sessionIdSegment.js';
|
|
338
362
|
export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
|
|
339
363
|
export type { CutForDisplayOptions, CutForDisplayResult, NoticePresentationAudience, NoticeOutlet, NoticeOccurrence, NoticeSeatClass, NoticeDeployment, NoticePresentationFacts, OutletKind, OutletReachability, OutletReachabilityContext, OutletRenderingPlan, NoticePrintCarrier, NoticePrintLineInput, NoticePrintLineResult, } from './noticePresentation.js';
|
|
340
364
|
export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
|
|
341
365
|
export type { PrintPermissionOutcome, PrintPermissionOutcomeForm } from './printPermissionOutcome.js';
|
|
366
|
+
export { settingsCredentialKeyPaths, isCredentialEnvName, isCredentialConfigKey, credentialNameWords } from './settingsCredentialKeyPaths.js';
|
|
367
|
+
export type { CredentialKeyFinding } from './settingsCredentialKeyPaths.js';
|
|
368
|
+
export { injectionLaneNotice, INJECTION_SOURCES } from './injectionLaneNotice.js';
|
|
369
|
+
export type { InjectionSource } from './injectionLaneNotice.js';
|
|
370
|
+
export { ruleRefusalSentence } from './ruleRefusalSentence.js';
|
|
371
|
+
export type { RuleRefusalRow } from './ruleRefusalSentence.js';
|
|
372
|
+
export { parseToolsFlagNames } from './toolsFlagNames.js';
|
|
373
|
+
export type { ToolsFlagNames } from './toolsFlagNames.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,10 @@ 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 * from './compactionStatus.js';
|
|
28
|
+
export { __resetEngineCapsCacheForTests, engineCapNestedValue, engineCapState, engineCapString, engineCapsGeneration, engineCapsLandingOf, engineCapsSettled, engineCapTrue, engineCapValue, invalidateEngineCaps, invalidateEngineCapsAndReprobe, kickEngineCapsProbe, rotateEngineCapsProbe, } from './engineCapsCache.js';
|
|
29
|
+
export { onEngineCapsChange } from './engineCapsChange.js';
|
|
27
30
|
export * from './sqlEngineCapability.js';
|
|
28
31
|
export * from './writeProtectionCapability.js';
|
|
29
32
|
export * from './webSearchBackendCapability.js';
|
|
@@ -81,7 +84,7 @@ export * from './modelCapabilityProbe.js';
|
|
|
81
84
|
export * from './classifierStatus.js';
|
|
82
85
|
export * from './engineToolLabelStore.js';
|
|
83
86
|
export * from './fleetTaskDesc.js';
|
|
84
|
-
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential } from './displayUntrusted.js';
|
|
87
|
+
export { displayUntrusted, displayUntrustedMarks, displayConfiguredUrl, queryCarriesCredential, cleanUntrustedScalar } from './displayUntrusted.js';
|
|
85
88
|
export { isDiagnosticValueWord } from './displayUntrusted.js';
|
|
86
89
|
export * from './hostEnv.js';
|
|
87
90
|
export * from './unrefTimer.js';
|
|
@@ -93,7 +96,8 @@ export * from './engineWireSdk.js';
|
|
|
93
96
|
export * from './classifierVerdictWire.js';
|
|
94
97
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
95
98
|
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,
|
|
99
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_K8S_LANE_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, CONFIG_TOOL_FACE_CONTROL, 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, 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, PROMPT_ASSEMBLED_ROLE_REFUSED, 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';
|
|
100
|
+
export { imageInvalidFailureNoteOf, prepareRefusalCodeOf, prepareRefusalNoteOf } from './prepareRefusal.js';
|
|
97
101
|
export * from './agentsWireCaps.js';
|
|
98
102
|
export { engineToolDirectoryOf } from './engineToolDirectory.js';
|
|
99
103
|
export * from './attachmentsWireCaps.js';
|
|
@@ -187,7 +191,9 @@ export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
|
|
|
187
191
|
export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
|
|
188
192
|
export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
|
|
189
193
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
190
|
-
export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
|
|
194
|
+
export { encodeHumanTurn, deliveredUuidsOf, imageSentOnUnknownVision } from './humanTurn.js';
|
|
195
|
+
export { observedUserAttachmentSeat, projectUserAttachmentSeatCapability, userAttachmentSeatAdmits } from './userAttachmentSeat.js';
|
|
196
|
+
export { scenarioRefusalFromError, scenarioRefusalContent } from './scenarioRefusal.js';
|
|
191
197
|
export { projectEngineSessionMessages } from './engineSessionMessages.js';
|
|
192
198
|
export * from './resumeRefusalCopy.js';
|
|
193
199
|
export * from './wireRefusalCopy.js';
|
|
@@ -200,7 +206,9 @@ export * from './detachWire.js';
|
|
|
200
206
|
export * from './workflowMonitor.js';
|
|
201
207
|
export * from './workflowClient.js';
|
|
202
208
|
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';
|
|
209
|
+
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';
|
|
210
|
+
export { salvageSettingsHooksEntries, settingsHooksSalvageNotice, } from './settingsHooksSalvage.js';
|
|
211
|
+
export { hostSettingsSelfCheck, HostSettingsRefused, HOST_SUPPLIED_KEYS, HOST_SETTING_CAUSES, HOST_SETTING_DISPOSITIONS, } from './hostTurnSettings.js';
|
|
204
212
|
export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
|
|
205
213
|
export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
206
214
|
export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
|
|
@@ -209,7 +217,7 @@ export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinT
|
|
|
209
217
|
export * from './liveInitToolFace.js';
|
|
210
218
|
export * from './printInitToolFace.js';
|
|
211
219
|
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';
|
|
220
|
+
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
221
|
export * from './hitl/suspendedReopen.js';
|
|
214
222
|
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
223
|
export { ENGINE_ABORT_TOOL_RESULT } from './hitl/frameRouter.js';
|
|
@@ -223,6 +231,8 @@ export * from './coreValuePorts.js';
|
|
|
223
231
|
export { ruleToolNameVerdictOf } from './protocolSegment.js';
|
|
224
232
|
export * from './hitl/askGateWire.js';
|
|
225
233
|
export * from './hitl/planReviewWire.js';
|
|
234
|
+
export { decisionInFlightOf, decisionReadMark } from './hitl/decisionLedger.js';
|
|
235
|
+
export { HITL_DECISION_FAMILIES, HITL_DECISION_NOT_APPLIED_CAUSES, HITL_DECISION_NOT_SENT_CAUSES, HITL_DECISION_UNCONFIRMED_CAUSES, sendHitlDecision, } from './hitl/decisionSend.js';
|
|
226
236
|
export { PLAN_REVIEW_QUESTION_ID_PREFIX, REOPEN_ID_TAIL, approvalCallKey, askGateQuestionId, planReviewQuestionId, liveFrameCallKey, armedKeyFromQuestionId, } from './hitl/gateIdentity.js';
|
|
227
237
|
export { _resetArmedGateRegistryForTest, _setGateArmedWaitMsForTest, clearArmedGate, gateArmedWaitMs, notePlanReviewAnswered, onGateArmed, planReviewArmedKey, registerArmedGate, registerArmedGateFor, registerArmedGateFromQuestionId, registerArmedGateFromQuestionIdFor, waitForGateArmed, wasGateArmed, wasGateArmedFor, } from './hitl/armedGateRegistry.js';
|
|
228
238
|
export * from './hitl/parkOwnership.js';
|
|
@@ -258,6 +268,10 @@ export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js'
|
|
|
258
268
|
export * from './compensations.js';
|
|
259
269
|
export * from './request/printNotification.js';
|
|
260
270
|
export * from './seatContract.js';
|
|
271
|
+
export { mcpToolTogglesToExcludeTools } from './mcpToolToggles.js';
|
|
272
|
+
export { devicesFaceOf, devicesWritesAllowed, devicesFaceDetail } from './devicesFace.js';
|
|
273
|
+
export { cloudLoginFailureOf, cloudLoginFailureText, engineTargetRefusalText, seatMcpReadingOf, watchEngineTarget } from './engineTargetSeat.js';
|
|
274
|
+
export { keyEnvNameForEntry, onboardBaseUrlProblem, onboardRefusalText, onboardWritePlan, onboardWriteVerdict, poolEntryNameOf, probeModelEndpoint, } from './model/onboardJudgement.js';
|
|
261
275
|
export * from './agentSession/contract.js';
|
|
262
276
|
export * from './agentSession/backgroundView.js';
|
|
263
277
|
export { readAssistantInbox } from './assistantInbox.js';
|
|
@@ -282,6 +296,10 @@ export { createMissLedger, createTranslator, DATA_FACE_LANGUAGE, msg, renderMess
|
|
|
282
296
|
export * from './ruleRemovalConsequence.js';
|
|
283
297
|
export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
|
|
284
298
|
export { credentialProvenance, CREDENTIAL_ATTACH_WORDS } from './credentialProvenance.js';
|
|
285
|
-
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
299
|
+
export { canonicalSessionIdOf, isSessionIdPathSegment, sessionIdRefusalOf } from './sessionIdSegment.js';
|
|
286
300
|
export { cutForDisplay, noticePresentationFacts, NOTICE_SEAT_CLASS, noticeSeatClassOf, OUTLET_KINDS, outletReachable, planOutletRendering, NOTICE_FULL_TEXT_CAP, noticePrintLine, } from './noticePresentation.js';
|
|
287
301
|
export { printPermissionOutcomeOf, PRINT_PERMISSION_OUTCOME_FORMS } from './printPermissionOutcome.js';
|
|
302
|
+
export { settingsCredentialKeyPaths, isCredentialEnvName, isCredentialConfigKey, credentialNameWords } from './settingsCredentialKeyPaths.js';
|
|
303
|
+
export { injectionLaneNotice, INJECTION_SOURCES } from './injectionLaneNotice.js';
|
|
304
|
+
export { ruleRefusalSentence } from './ruleRefusalSentence.js';
|
|
305
|
+
export { parseToolsFlagNames } from './toolsFlagNames.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 = {
|
|
@@ -13,6 +14,7 @@ export type InheritEnvOwnCredentialsReading = {
|
|
|
13
14
|
readonly kind: 'unobserved';
|
|
14
15
|
};
|
|
15
16
|
export declare function observedInheritEnvOwnCredentialsWithheld(baseUrl?: string | undefined): InheritEnvOwnCredentialsReading;
|
|
17
|
+
export declare function observedInheritEnvOwnCredentialValuesWithheld(baseUrl?: string | undefined): InheritEnvOwnCredentialsReading;
|
|
16
18
|
export type InheritEnvOmitReason = 'lane' | 'project_context' | 'capability_absent' | 'capability_declined' | 'capability_unreadable' | 'identity_unverified';
|
|
17
19
|
export type InheritEnvIntent = {
|
|
18
20
|
readonly send: 'all';
|
|
@@ -27,5 +29,5 @@ export interface InheritEnvIntentInput {
|
|
|
27
29
|
readonly serviceIdentityVerified: boolean;
|
|
28
30
|
}
|
|
29
31
|
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;
|
|
32
|
+
export declare function inheritEnvNotConfirmedNotice(lang?: UiLanguage | (string & {})): string;
|
|
33
|
+
export declare function inheritEnvNoticeOf(intent: InheritEnvIntent, lang?: UiLanguage | (string & {})): string | undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
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';
|
|
6
|
+
const OWN_CREDENTIAL_VALUES_WITHHELD_KEY = 'inherit_env.own_credential_values_withheld';
|
|
4
7
|
const CONFIRMED = Object.freeze({ kind: 'confirmed' });
|
|
5
8
|
const ABSENT = Object.freeze({ kind: 'absent' });
|
|
6
9
|
const UNREADABLE = Object.freeze({ kind: 'unreadable' });
|
|
@@ -23,9 +26,9 @@ function shapeOf(v) {
|
|
|
23
26
|
return 'other';
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
function inheritEnvWordReading(baseUrl, key) {
|
|
27
30
|
try {
|
|
28
|
-
const slot = engineCapValue(typeof baseUrl === 'string' ? baseUrl : undefined,
|
|
31
|
+
const slot = engineCapValue(typeof baseUrl === 'string' ? baseUrl : undefined, key);
|
|
29
32
|
switch (slot.kind) {
|
|
30
33
|
case 'unobserved':
|
|
31
34
|
return UNOBSERVED;
|
|
@@ -43,6 +46,12 @@ export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTar
|
|
|
43
46
|
return UNOBSERVED;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
49
|
+
export function observedInheritEnvOwnCredentialsWithheld(baseUrl = engineWireTarget()?.baseUrl) {
|
|
50
|
+
return inheritEnvWordReading(baseUrl, OWN_CREDENTIALS_WITHHELD_KEY);
|
|
51
|
+
}
|
|
52
|
+
export function observedInheritEnvOwnCredentialValuesWithheld(baseUrl = engineWireTarget()?.baseUrl) {
|
|
53
|
+
return inheritEnvWordReading(baseUrl, OWN_CREDENTIAL_VALUES_WITHHELD_KEY);
|
|
54
|
+
}
|
|
46
55
|
const ALL = Object.freeze({ send: 'all' });
|
|
47
56
|
const omit = (reason) => Object.freeze({ send: 'omit', reason });
|
|
48
57
|
function fieldOf(input, key) {
|
|
@@ -84,10 +93,8 @@ export function inheritEnvIntentOf(input) {
|
|
|
84
93
|
return omit('identity_unverified');
|
|
85
94
|
return ALL;
|
|
86
95
|
}
|
|
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
96
|
export function inheritEnvNotConfirmedNotice(lang) {
|
|
89
|
-
|
|
90
|
-
return NOT_CONFIRMED_SENTENCE_EN;
|
|
97
|
+
return renderMessage(msg('session.inheritEnv.notConfirmed'), isUiLanguage(lang) ? lang : undefined);
|
|
91
98
|
}
|
|
92
99
|
export function inheritEnvNoticeOf(intent, lang) {
|
|
93
100
|
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
|
-
import {
|
|
3
|
+
import { fieldLimitRefusalFromError } 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 {
|
|
@@ -50,7 +50,7 @@ export function inheritEnvRefusalFromError(err, sentRequest) {
|
|
|
50
50
|
return null;
|
|
51
51
|
if (readGuarded(err, 'errorCode') !== FIELD_INVALID)
|
|
52
52
|
return null;
|
|
53
|
-
if (
|
|
53
|
+
if (fieldLimitRefusalFromError(err) !== null)
|
|
54
54
|
return null;
|
|
55
55
|
return Object.freeze({ code: FIELD_INVALID });
|
|
56
56
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
|
+
import type { ExecutionLaneReading } from './executionLaneCapability.js';
|
|
3
|
+
export declare const INJECTION_SOURCES: readonly ["stdio_mcp", "credentialed_mcp", "task_hooks"];
|
|
4
|
+
export type InjectionSource = (typeof INJECTION_SOURCES)[number];
|
|
5
|
+
export declare function injectionLaneNotice(lane: ExecutionLaneReading, sources: readonly InjectionSource[], lang?: UiLanguage): string | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { capForDisplay } from './fleetTaskDesc.js';
|
|
2
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
|
+
export const INJECTION_SOURCES = Object.freeze(['stdio_mcp', 'credentialed_mcp', 'task_hooks']);
|
|
4
|
+
const LANE_WORD_MAX = 40;
|
|
5
|
+
const ITEM_KEYS = Object.freeze({
|
|
6
|
+
stdio_mcp: 'notice.injectionLane.item.stdioMcp',
|
|
7
|
+
credentialed_mcp: 'notice.injectionLane.item.credentialedMcp',
|
|
8
|
+
task_hooks: 'notice.injectionLane.item.taskHooks',
|
|
9
|
+
});
|
|
10
|
+
function remoteLaneWordOf(lane) {
|
|
11
|
+
try {
|
|
12
|
+
if (typeof lane !== 'object' || lane === null || lane.kind !== 'present')
|
|
13
|
+
return undefined;
|
|
14
|
+
const view = lane.view;
|
|
15
|
+
if (typeof view !== 'object' || view === null)
|
|
16
|
+
return undefined;
|
|
17
|
+
if (view.toolsOnThisHost !== false)
|
|
18
|
+
return undefined;
|
|
19
|
+
if (view.isolatedAbsent === 'no_hands' || view.provider === 'in-process')
|
|
20
|
+
return undefined;
|
|
21
|
+
if (typeof view.provider !== 'string' || view.provider === '')
|
|
22
|
+
return undefined;
|
|
23
|
+
return capForDisplay(view.provider, LANE_WORD_MAX);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function injectionLaneNotice(lane, sources, lang) {
|
|
30
|
+
const word = remoteLaneWordOf(lane);
|
|
31
|
+
if (word === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
let present;
|
|
34
|
+
try {
|
|
35
|
+
present = new Set(Array.isArray(sources) ? sources : []);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const items = INJECTION_SOURCES.filter((s) => present.has(s));
|
|
41
|
+
if (items.length === 0)
|
|
42
|
+
return undefined;
|
|
43
|
+
const separator = renderMessage(msg('notice.injectionLane.itemSeparator'), lang);
|
|
44
|
+
const list = items.map((s) => renderMessage(msg(ITEM_KEYS[s]), lang)).join(separator);
|
|
45
|
+
return renderMessage(msg('notice.injectionLane.sentence', { lane: word, items: list }), lang);
|
|
46
|
+
}
|
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>;
|