@sema-agent/client-core 0.100.0 → 0.102.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 +452 -0
- package/README.md +172 -120
- package/dist/adapt/arms.js +51 -16
- package/dist/adapt/textStream.js +7 -4
- package/dist/adapt/toolCards.d.ts +2 -1
- package/dist/adapt/toolCards.js +28 -13
- package/dist/adapt.d.ts +1 -1
- package/dist/adapt.js +8 -2
- package/dist/adapter/activeRunSelfHeal.d.ts +24 -2
- package/dist/adapter/activeRunSelfHeal.js +108 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +38 -79
- package/dist/adapter/downstream/terminalToSdkResult.d.ts +60 -1
- package/dist/adapter/downstream/terminalToSdkResult.js +209 -39
- package/dist/adapter/downstream/wiringManifestView.d.ts +1 -0
- package/dist/adapter/downstream/wiringManifestView.js +138 -0
- package/dist/adapter/runStream.d.ts +4 -4
- package/dist/adapter/runStream.js +158 -43
- package/dist/agentsWireCaps.d.ts +2 -7
- package/dist/agentsWireCaps.js +1 -2
- package/dist/approvalDecidedByCapability.js +2 -2
- package/dist/approvalFrameFamilies.d.ts +33 -0
- package/dist/approvalFrameFamilies.js +120 -0
- package/dist/approvalsStreamLiveCapability.js +2 -2
- package/dist/attachmentsWireCaps.js +41 -13
- package/dist/callerCwdCapability.js +2 -2
- package/dist/centerWiringCapability.js +2 -2
- package/dist/clockReading.d.ts +2 -0
- package/dist/clockReading.js +4 -0
- package/dist/cloudConfigWireCaps.d.ts +19 -5
- package/dist/cloudConfigWireCaps.js +193 -56
- package/dist/compensations.js +1 -1
- package/dist/coreValuePorts.d.ts +12 -2
- package/dist/coreValuePorts.js +9 -0
- package/dist/decideFailureNote.js +5 -3
- package/dist/decideReceipt.js +2 -2
- package/dist/deviceExecutorManagementCapability.js +2 -2
- package/dist/deviceFlowPolling.js +1 -1
- package/dist/disableSkillsWire.d.ts +1 -1
- package/dist/disableSkillsWire.js +4 -3
- package/dist/displayUntrusted.d.ts +9 -4
- package/dist/displayUntrusted.js +834 -104
- package/dist/engineCapReader.js +1 -1
- package/dist/engineConfigDrift.js +1 -1
- package/dist/engineErrorCodes.d.ts +14 -5
- package/dist/engineErrorCodes.js +27 -6
- package/dist/engineGenerationConvergence.d.ts +39 -0
- package/dist/engineGenerationConvergence.js +95 -0
- package/dist/engineGenerationPort.d.ts +61 -0
- package/dist/engineGenerationPort.js +144 -0
- package/dist/engineHealthFacts.d.ts +23 -0
- package/dist/engineHealthFacts.js +92 -0
- package/dist/engineIdentity.d.ts +4 -0
- package/dist/engineIdentity.js +11 -0
- package/dist/engineNoticeCodes.d.ts +2 -5
- package/dist/engineRowRef.js +4 -0
- package/dist/engineSessionMessages.js +2 -2
- package/dist/engineToolDirectory.js +2 -2
- package/dist/engineWireFor.d.ts +99 -0
- package/dist/engineWireFor.js +248 -6
- package/dist/engineWireTarget.d.ts +1 -0
- package/dist/engineWireTarget.js +8 -0
- package/dist/env/uiLanguage.js +1 -1
- package/dist/errorSupplementRoles.d.ts +3 -0
- package/dist/errorSupplementRoles.js +37 -0
- package/dist/executionLaneCapability.js +2 -2
- package/dist/fileHistoryCaptureCapability.js +3 -3
- package/dist/finalVerifyWire.d.ts +6 -3
- package/dist/finalVerifyWire.js +6 -23
- package/dist/flagInput.d.ts +4 -0
- package/dist/flagInput.js +24 -0
- package/dist/fleet/fleetLedger.js +5 -2
- package/dist/fleet/fleetProjection.d.ts +1 -0
- package/dist/fleet/fleetProjection.js +16 -3
- package/dist/gateVocabulary.js +3 -0
- package/dist/generated/engineFactTables.d.ts +7 -3
- package/dist/generated/engineFactTables.js +52 -0
- package/dist/generated/engineNoticeTables.js +12 -0
- package/dist/generated/settingsSchemaActiveTiers.d.ts +1 -0
- package/dist/generated/settingsSchemaActiveTiers.js +14 -0
- package/dist/generated/settingsSchemaCallerTextEcho.d.ts +1 -0
- package/dist/generated/settingsSchemaCallerTextEcho.js +8 -0
- package/dist/generated/settingsSchemaControlAndBidi.d.ts +1 -0
- package/dist/generated/settingsSchemaControlAndBidi.js +8 -0
- package/dist/generated/settingsSchemaDefaultModel.d.ts +11 -0
- package/dist/generated/settingsSchemaDefaultModel.js +25 -0
- package/dist/generated/settingsSchemaFns.d.ts +54 -0
- package/dist/generated/settingsSchemaFns.js +26 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.js +1 -7
- package/dist/generated/settingsSchemaSafetyMergeSpec.d.ts +1 -0
- package/dist/generated/settingsSchemaSafetyMergeSpec.js +95 -0
- package/dist/generated/settingsSchemaSettingsSources.d.ts +1 -0
- package/dist/generated/settingsSchemaSettingsSources.js +58 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +13 -0
- package/dist/generated/settingsSchemaUrlPattern.d.ts +1 -0
- package/dist/generated/settingsSchemaUrlPattern.js +183 -0
- package/dist/headlessPermissionModeWire.d.ts +18 -2
- package/dist/headlessPermissionModeWire.js +30 -19
- package/dist/hitl/allowRuleShadow.js +7 -5
- package/dist/hitl/approvalCardReading.d.ts +3 -0
- package/dist/hitl/approvalCardReading.js +17 -0
- package/dist/hitl/approvalCompleteParked.js +1 -1
- package/dist/hitl/approvalDelivery.d.ts +87 -0
- package/dist/hitl/approvalDelivery.js +193 -0
- package/dist/hitl/approvalResolution.d.ts +11 -0
- package/dist/hitl/approvalResolution.js +50 -11
- package/dist/hitl/askClassPair.d.ts +6 -0
- package/dist/hitl/askClassPair.js +30 -3
- package/dist/hitl/askParkAutoReopenBlock.d.ts +30 -0
- package/dist/hitl/askParkAutoReopenBlock.js +117 -0
- package/dist/hitl/askParkRowRouting.js +4 -1
- package/dist/hitl/attributionLadder.d.ts +42 -3
- package/dist/hitl/attributionLadder.js +79 -8
- package/dist/hitl/automaticAnswerVerdict.d.ts +6 -1
- package/dist/hitl/automaticAnswerVerdict.js +46 -11
- package/dist/hitl/crashConverged.js +2 -2
- package/dist/hitl/decisionConflict.d.ts +6 -2
- package/dist/hitl/decisionConflict.js +24 -9
- package/dist/hitl/decisionRefusal.d.ts +20 -10
- package/dist/hitl/decisionRefusal.js +99 -54
- package/dist/hitl/decisionSend.d.ts +3 -0
- package/dist/hitl/decisionSend.js +87 -103
- package/dist/hitl/frameRouter.d.ts +1 -0
- package/dist/hitl/frameRouter.js +9 -2
- package/dist/hitl/hitlBridge.d.ts +18 -6
- package/dist/hitl/hitlBridge.js +41 -37
- package/dist/hitl/livePendingAsk.js +4 -3
- package/dist/hitl/noAllowCause.js +1 -1
- package/dist/hitl/parkResolver.js +3 -2
- package/dist/hitl/persistedRulesWire.js +1 -0
- package/dist/hitl/planReviewWire.d.ts +4 -0
- package/dist/hitl/planReviewWire.js +59 -30
- package/dist/hitl/resumeRunningCard.d.ts +3 -2
- package/dist/hitl/resumeRunningCard.js +17 -11
- package/dist/hitl/sessionPolicyDeliverable.d.ts +5 -2
- package/dist/hitl/sessionPolicyDeliverable.js +62 -29
- package/dist/hitl/sessionPolicyWire.d.ts +13 -3
- package/dist/hitl/sessionPolicyWire.js +81 -16
- package/dist/hitl/standingRows.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +9 -10
- package/dist/hitl/toolApprovalWire.js +72 -54
- package/dist/hookMatcherVerdict.d.ts +2 -0
- package/dist/hookMatcherVerdict.js +12 -0
- package/dist/hooksCompactTransition.d.ts +19 -0
- package/dist/hooksCompactTransition.js +41 -0
- package/dist/hooksWireCaps.d.ts +1 -1
- package/dist/hooksWireCaps.js +202 -203
- package/dist/host.d.ts +1 -14
- package/dist/host.js +0 -8
- package/dist/hostCallbackGuard.d.ts +1 -0
- package/dist/hostCallbackGuard.js +1 -1
- package/dist/hostSettingsSource.d.ts +172 -0
- package/dist/hostSettingsSource.js +675 -0
- package/dist/hostTurnSettings.d.ts +73 -17
- package/dist/hostTurnSettings.js +594 -97
- package/dist/httpHookPolicy.d.ts +37 -0
- package/dist/httpHookPolicy.js +176 -0
- package/dist/humanTurn.d.ts +2 -1
- package/dist/humanTurn.js +37 -7
- package/dist/humanTurnRead.js +4 -3
- package/dist/humanTurnSentences.d.ts +10 -0
- package/dist/humanTurnSentences.js +74 -0
- package/dist/i18n/messages.en.d.ts +222 -2
- package/dist/i18n/messages.en.js +225 -5
- package/dist/i18n/messages.zh.js +237 -5
- package/dist/i18n/translate.js +3 -3
- package/dist/index.d.ts +77 -15
- package/dist/index.js +50 -13
- package/dist/inheritEnvCapability.d.ts +3 -1
- package/dist/inheritEnvCapability.js +31 -17
- package/dist/inheritEnvWire.d.ts +2 -1
- package/dist/inheritEnvWire.js +11 -5
- package/dist/interactiveHalt.d.ts +3 -1
- package/dist/interactiveHalt.js +2 -0
- package/dist/interactiveInterrupt.d.ts +2 -0
- package/dist/interactiveInterrupt.js +15 -0
- package/dist/interactiveToolsWire.d.ts +4 -2
- package/dist/interactiveToolsWire.js +5 -5
- package/dist/jsonFaithful.d.ts +20 -0
- package/dist/jsonFaithful.js +152 -0
- package/dist/limitsWire.d.ts +7 -2
- package/dist/limitsWire.js +19 -13
- package/dist/liveInitToolFace.d.ts +6 -1
- package/dist/liveInitToolFace.js +5 -3
- package/dist/liveModelCatalog.d.ts +22 -0
- package/dist/liveModelCatalog.js +132 -18
- package/dist/mcpPanel.js +1 -1
- package/dist/mcpProbeCapability.js +2 -2
- package/dist/mcpStatusSupersetKeys.d.ts +24 -0
- package/dist/mcpStatusSupersetKeys.js +45 -0
- package/dist/mcpToolToggles.js +2 -1
- package/dist/mcpWireCaps.d.ts +39 -1
- package/dist/mcpWireCaps.js +254 -50
- package/dist/memoryComplianceCapability.js +2 -2
- package/dist/memoryOriginCapability.js +2 -2
- package/dist/model/catalogDefault.d.ts +24 -0
- package/dist/model/catalogDefault.js +4 -0
- package/dist/model/liveCatalogShape.js +5 -4
- package/dist/model/modelsPolicy.js +4 -3
- package/dist/model/onboardJudgement.d.ts +1 -0
- package/dist/model/onboardJudgement.js +1 -1
- package/dist/model/subagentModelWord.js +2 -2
- package/dist/modelCapabilityProbe.js +6 -6
- package/dist/modelIdentityResolvability.d.ts +10 -1
- package/dist/modelIdentityResolvability.js +62 -39
- package/dist/modsFace.d.ts +8 -0
- package/dist/modsFace.js +59 -0
- package/dist/modsKernelIdentity.d.ts +10 -0
- package/dist/modsKernelIdentity.js +103 -0
- package/dist/modsKernelTransit.d.ts +8 -0
- package/dist/modsKernelTransit.js +6 -0
- package/dist/notifications.d.ts +30 -12
- package/dist/notifications.js +241 -53
- package/dist/outputStyleSeatCapability.js +2 -2
- package/dist/ownKey.d.ts +12 -0
- package/dist/ownKey.js +179 -3
- package/dist/panelReduce.js +1 -1
- package/dist/peerFrames.d.ts +1 -1
- package/dist/peerFrames.js +6 -2
- package/dist/peerLaneCapability.js +2 -2
- package/dist/permissionModesCapability.js +4 -4
- package/dist/permissionRuleIssue.js +2 -0
- package/dist/permissionRulesWriteCapability.js +2 -2
- package/dist/permissionsAllowGrantCapability.js +2 -2
- package/dist/permissionsDeclaration.d.ts +43 -4
- package/dist/permissionsDeclaration.js +102 -35
- package/dist/pluginHooksWire.d.ts +20 -4
- package/dist/pluginHooksWire.js +92 -53
- package/dist/prepareRefusal.d.ts +3 -2
- package/dist/prepareRefusal.js +27 -9
- package/dist/printInitToolFace.js +2 -2
- package/dist/printModelStatus.js +1 -1
- package/dist/printToolResultFrame.js +1 -1
- package/dist/projectMemory.d.ts +32 -0
- package/dist/projectMemory.js +70 -0
- package/dist/promptBlockedCopy.d.ts +2 -1
- package/dist/promptBlockedCopy.js +2 -1
- package/dist/promptDelivery.d.ts +23 -3
- package/dist/promptDelivery.js +169 -30
- package/dist/providerRejection.d.ts +19 -1
- package/dist/providerRejection.js +75 -4
- package/dist/queuedDelivery.d.ts +48 -0
- package/dist/queuedDelivery.js +233 -0
- package/dist/reattachWindow.d.ts +94 -0
- package/dist/reattachWindow.js +127 -0
- package/dist/request/printNotification.d.ts +1 -1
- package/dist/request/printNotification.js +6 -2
- package/dist/request/submissionIdentity.d.ts +37 -0
- package/dist/request/submissionIdentity.js +65 -0
- package/dist/request/taskRequest.d.ts +33 -4
- package/dist/request/taskRequest.js +341 -156
- package/dist/resultFrameKeys.d.ts +1 -0
- package/dist/resultFrameKeys.js +4 -1
- package/dist/retryStatus.d.ts +8 -0
- package/dist/retryStatus.js +57 -9
- package/dist/rewindArchiveCapability.js +2 -2
- package/dist/rewindEngineAction.d.ts +2 -0
- package/dist/rewindEngineAction.js +23 -1
- package/dist/rowKind.d.ts +36 -0
- package/dist/rowKind.js +97 -0
- package/dist/ruleCompileVerdict.d.ts +18 -0
- package/dist/ruleCompileVerdict.js +67 -2
- package/dist/ruleReadings.d.ts +58 -0
- package/dist/ruleReadings.js +132 -0
- package/dist/ruleRefusalSentence.d.ts +4 -0
- package/dist/ruleRefusalSentence.js +9 -3
- package/dist/runCancelContext.d.ts +0 -1
- package/dist/runCancelContext.js +1 -2
- package/dist/runTerminal.d.ts +5 -0
- package/dist/runTerminal.js +52 -17
- package/dist/sandboxWire.d.ts +1 -1
- package/dist/sandboxWire.js +4 -6
- package/dist/scenarioRefusal.js +1 -1
- package/dist/scenarioSkills.d.ts +20 -0
- package/dist/scenarioSkills.js +72 -0
- package/dist/scenarioWire.d.ts +5 -2
- package/dist/scenarioWire.js +9 -9
- package/dist/sealedKeyCapability.js +2 -2
- package/dist/seam.d.ts +2 -0
- package/dist/seam.js +3 -3
- package/dist/seatContract.d.ts +68 -7
- package/dist/seatContract.js +84 -25
- package/dist/selfOrchestrationDenial.js +1 -1
- package/dist/sessionBackground.d.ts +165 -0
- package/dist/sessionBackground.js +781 -0
- package/dist/sessionBackgroundHandoff.d.ts +54 -0
- package/dist/sessionBackgroundHandoff.js +321 -0
- package/dist/sessionMap.js +4 -1
- package/dist/sessionPolicyCapability.js +2 -2
- package/dist/sessionRulesChildrenReadLive.d.ts +6 -0
- package/dist/sessionRulesChildrenReadLive.js +5 -0
- package/dist/sessionRulesNamespaceFormsCapability.d.ts +12 -0
- package/dist/sessionRulesNamespaceFormsCapability.js +29 -0
- package/dist/sessionSyncFileHistoryCapability.js +2 -2
- package/dist/settingsCredentialKeyPaths.js +55 -15
- package/dist/settingsHooksSalvage.d.ts +1 -0
- package/dist/settingsHooksSalvage.js +7 -1
- package/dist/settingsLayerAdmission.d.ts +4 -0
- package/dist/settingsLayerAdmission.js +16 -0
- package/dist/skillToolListsCapability.js +6 -5
- package/dist/skillsWireCaps.d.ts +14 -0
- package/dist/skillsWireCaps.js +47 -16
- package/dist/slashCommandGate.d.ts +24 -0
- package/dist/slashCommandGate.js +74 -0
- package/dist/slashCommandTable.d.ts +14 -0
- package/dist/slashCommandTable.js +99 -0
- package/dist/sqlEngineCapability.js +2 -2
- package/dist/steerPriorityCapability.js +2 -2
- package/dist/storePostureCapability.js +2 -2
- package/dist/subagent/agentStateDetail.js +1 -1
- package/dist/subagent/engineDelegatedPrompt.d.ts +9 -0
- package/dist/subagent/engineDelegatedPrompt.js +38 -7
- package/dist/subagent/engineRowStopGate.js +2 -2
- package/dist/subagent/engineSubagentResume.js +3 -3
- package/dist/subagent/engineTaskHandleWire.d.ts +1 -0
- package/dist/subagent/engineTaskHandleWire.js +10 -0
- package/dist/submitFailure.d.ts +8 -0
- package/dist/submitFailure.js +17 -0
- package/dist/supportFloor.d.ts +1 -0
- package/dist/supportFloor.js +7 -0
- package/dist/terminationIntent.d.ts +55 -0
- package/dist/terminationIntent.js +352 -0
- package/dist/thinkingLatch.d.ts +69 -0
- package/dist/thinkingLatch.js +255 -0
- package/dist/thinkingLatchWords.d.ts +7 -0
- package/dist/thinkingLatchWords.js +4 -0
- package/dist/toolHistoryMismatch.d.ts +8 -0
- package/dist/toolHistoryMismatch.js +37 -6
- package/dist/toolResult.d.ts +13 -3
- package/dist/toolResult.js +159 -32
- package/dist/toolResultContent.d.ts +13 -0
- package/dist/toolResultContent.js +82 -7
- package/dist/toolRoster.d.ts +18 -0
- package/dist/toolRoster.js +64 -0
- package/dist/turnFailurePresentation.js +27 -90
- package/dist/usageLimitAutoResume.d.ts +74 -0
- package/dist/usageLimitAutoResume.js +227 -0
- package/dist/userAttachmentEnvelope.js +1 -1
- package/dist/userAttachmentSeat.js +5 -5
- package/dist/userInvokedSkillsCapability.js +2 -2
- package/dist/webSearchBackendCapability.js +2 -2
- package/dist/wireErrorTriage.js +99 -50
- package/dist/wireFailureShape.d.ts +25 -1
- package/dist/wireFailureShape.js +92 -5
- package/dist/wireRefusalCopy.d.ts +24 -1
- package/dist/wireRefusalCopy.js +253 -32
- package/dist/wiringFleetDoctor.d.ts +3 -0
- package/dist/wiringFleetDoctor.js +21 -0
- package/dist/workflow.d.ts +2 -1
- package/dist/workflow.js +38 -1
- package/dist/workflowClient.d.ts +2 -7
- package/dist/workflowsJournalCapability.js +2 -2
- package/dist/writeProtectionCapability.js +2 -2
- package/docs/INTEGRATION-CLIENTS.md +907 -182
- package/package.json +14 -3
- package/dist/argvFlagValue.d.ts +0 -8
- package/dist/argvFlagValue.js +0 -37
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WireHooksConfig } from './finalVerifyWire.js';
|
|
2
|
+
import type { WorkspaceTrustState } from './hostSettingsSource.js';
|
|
3
|
+
import type { HookSettingsSource } from './pluginHooksWire.js';
|
|
4
|
+
export declare const HTTP_POLICY_DROP_REASONS: readonly ["url_not_listed", "url_list_empty", "url_list_malformed", "env_list_malformed", "layer_unreadable"];
|
|
5
|
+
export type HttpPolicyDropReason = (typeof HTTP_POLICY_DROP_REASONS)[number];
|
|
6
|
+
export interface HttpPolicyDropRow {
|
|
7
|
+
readonly event: string;
|
|
8
|
+
readonly reason: HttpPolicyDropReason;
|
|
9
|
+
readonly layer: HookSettingsSource;
|
|
10
|
+
readonly urlShown: string;
|
|
11
|
+
readonly notice: string;
|
|
12
|
+
}
|
|
13
|
+
export type HttpHookListReading = {
|
|
14
|
+
readonly kind: 'absent';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'list';
|
|
17
|
+
readonly patterns: readonly string[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'malformed';
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'unreadable';
|
|
22
|
+
};
|
|
23
|
+
export interface HttpHookLayerReading {
|
|
24
|
+
readonly layer: HookSettingsSource;
|
|
25
|
+
readonly urls: HttpHookListReading;
|
|
26
|
+
readonly envs: HttpHookListReading;
|
|
27
|
+
}
|
|
28
|
+
export interface HttpHookPolicyReading {
|
|
29
|
+
readonly layers: readonly HttpHookLayerReading[];
|
|
30
|
+
}
|
|
31
|
+
export declare function httpHookAdmittedSources(sources: readonly HookSettingsSource[], trust: WorkspaceTrustState | 'unreadable'): readonly HookSettingsSource[];
|
|
32
|
+
export declare function readHttpHookPolicy(admitted: readonly HookSettingsSource[], docOf: (layer: HookSettingsSource) => object | null | undefined): HttpHookPolicyReading;
|
|
33
|
+
export declare function wireHasHttpEntry(wire: WireHooksConfig): boolean;
|
|
34
|
+
export declare function applyHttpHookPolicy(wire: WireHooksConfig, policy: HttpHookPolicyReading): {
|
|
35
|
+
readonly wire: WireHooksConfig | undefined;
|
|
36
|
+
readonly rows: readonly HttpPolicyDropRow[];
|
|
37
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { appendOwnElement } from './ownKey.js';
|
|
2
|
+
import { displayUntrusted } from './displayUntrusted.js';
|
|
3
|
+
import { SETTINGS_URL_ALLOW_PATTERN_MATCHES } from './generated/settingsSchemaFns.js';
|
|
4
|
+
import { admittedLayers } from './settingsLayerAdmission.js';
|
|
5
|
+
import { hostLog } from './host.js';
|
|
6
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
7
|
+
import { HOOK_SETTINGS_SOURCE_TEXT } from './settingsHooksSalvage.js';
|
|
8
|
+
export const HTTP_POLICY_DROP_REASONS = Object.freeze(['url_not_listed', 'url_list_empty', 'url_list_malformed', 'env_list_malformed', 'layer_unreadable']);
|
|
9
|
+
const ABSENT = Object.freeze({ kind: 'absent' });
|
|
10
|
+
const MALFORMED = Object.freeze({ kind: 'malformed' });
|
|
11
|
+
const UNREADABLE = Object.freeze({ kind: 'unreadable' });
|
|
12
|
+
const HTTP_HOOK_ALLOWLISTS_CATEGORY = 'httpHookAllowlists';
|
|
13
|
+
export function httpHookAdmittedSources(sources, trust) {
|
|
14
|
+
return admittedLayers(sources, trust, HTTP_HOOK_ALLOWLISTS_CATEGORY);
|
|
15
|
+
}
|
|
16
|
+
function readList(doc, key) {
|
|
17
|
+
try {
|
|
18
|
+
if (typeof doc !== 'object' || doc === null)
|
|
19
|
+
return ABSENT;
|
|
20
|
+
const d = Object.getOwnPropertyDescriptor(doc, key);
|
|
21
|
+
if (d === undefined)
|
|
22
|
+
return ABSENT;
|
|
23
|
+
if (!Object.hasOwn(d, 'value'))
|
|
24
|
+
return MALFORMED;
|
|
25
|
+
const v = d.value;
|
|
26
|
+
if (v === undefined)
|
|
27
|
+
return ABSENT;
|
|
28
|
+
if (!Array.isArray(v))
|
|
29
|
+
return MALFORMED;
|
|
30
|
+
const patterns = [];
|
|
31
|
+
for (let i = 0; i < v.length; i++) {
|
|
32
|
+
const ed = Object.getOwnPropertyDescriptor(v, i);
|
|
33
|
+
if (ed === undefined || !Object.hasOwn(ed, 'value') || typeof ed.value !== 'string')
|
|
34
|
+
return MALFORMED;
|
|
35
|
+
appendOwnElement(patterns, ed.value);
|
|
36
|
+
}
|
|
37
|
+
return { kind: 'list', patterns };
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return MALFORMED;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function readHttpHookPolicy(admitted, docOf) {
|
|
44
|
+
const layers = [];
|
|
45
|
+
for (const layer of admitted) {
|
|
46
|
+
let doc;
|
|
47
|
+
try {
|
|
48
|
+
doc = docOf(layer);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
hostLog('debug', `http-hook-list-layer-read-threw: ${layer}`);
|
|
52
|
+
layers.push(Object.freeze({ layer, urls: UNREADABLE, envs: UNREADABLE }));
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const urls = readList(doc, 'allowedHttpHookUrls');
|
|
56
|
+
const envs = readList(doc, 'httpHookAllowedEnvVars');
|
|
57
|
+
if (urls.kind === 'absent' && envs.kind === 'absent')
|
|
58
|
+
continue;
|
|
59
|
+
layers.push(Object.freeze({ layer, urls, envs }));
|
|
60
|
+
}
|
|
61
|
+
return Object.freeze({ layers: Object.freeze(layers) });
|
|
62
|
+
}
|
|
63
|
+
function httpHookPolicyIsUnrestricted(p) {
|
|
64
|
+
return p.layers.length === 0;
|
|
65
|
+
}
|
|
66
|
+
export function wireHasHttpEntry(wire) {
|
|
67
|
+
for (const groups of Object.values(wire)) {
|
|
68
|
+
if (!Array.isArray(groups))
|
|
69
|
+
continue;
|
|
70
|
+
for (const g of groups) {
|
|
71
|
+
if (typeof g !== 'object' || g === null || !Array.isArray(g.hooks))
|
|
72
|
+
continue;
|
|
73
|
+
for (const h of g.hooks)
|
|
74
|
+
if (h?.type === 'http')
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
function patternAdmits(url, pattern) {
|
|
81
|
+
try {
|
|
82
|
+
return SETTINGS_URL_ALLOW_PATTERN_MATCHES(url, pattern);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function urlListed(url, patterns) {
|
|
89
|
+
return patterns.some((p) => patternAdmits(url, p));
|
|
90
|
+
}
|
|
91
|
+
const DROP_KEY = {
|
|
92
|
+
url_not_listed: 'config.hooks.httpPolicy.urlNotListed',
|
|
93
|
+
url_list_empty: 'config.hooks.httpPolicy.urlListEmpty',
|
|
94
|
+
url_list_malformed: 'config.hooks.httpPolicy.urlListMalformed',
|
|
95
|
+
env_list_malformed: 'config.hooks.httpPolicy.envListMalformed',
|
|
96
|
+
layer_unreadable: 'config.hooks.httpPolicy.layerUnreadable',
|
|
97
|
+
};
|
|
98
|
+
const URL_SHOWN_MAX = 200;
|
|
99
|
+
const EVENT_SHOWN_MAX = 80;
|
|
100
|
+
function rowOf(event, reason, layer, url) {
|
|
101
|
+
const urlShown = typeof url === 'string' && url !== '' ? displayUntrusted(url, { max: URL_SHOWN_MAX }) : '(no URL)';
|
|
102
|
+
const eventShown = displayUntrusted(event, { max: EVENT_SHOWN_MAX });
|
|
103
|
+
const layerShown = HOOK_SETTINGS_SOURCE_TEXT[layer] ?? 'Settings';
|
|
104
|
+
return Object.freeze({ event, reason, layer, urlShown, notice: renderMessage(msg(DROP_KEY[reason], { url: urlShown, event: eventShown, layer: layerShown })) });
|
|
105
|
+
}
|
|
106
|
+
function judgeEntry(entry, event, policy) {
|
|
107
|
+
const e = entry;
|
|
108
|
+
for (const l of policy.layers) {
|
|
109
|
+
const urls = l.urls;
|
|
110
|
+
if (urls.kind === 'absent')
|
|
111
|
+
continue;
|
|
112
|
+
if (urls.kind === 'unreadable')
|
|
113
|
+
return { keep: undefined, rows: [rowOf(event, 'layer_unreadable', l.layer, e.url)] };
|
|
114
|
+
if (urls.kind === 'malformed')
|
|
115
|
+
return { keep: undefined, rows: [rowOf(event, 'url_list_malformed', l.layer, e.url)] };
|
|
116
|
+
if (urls.patterns.length === 0)
|
|
117
|
+
return { keep: undefined, rows: [rowOf(event, 'url_list_empty', l.layer, e.url)] };
|
|
118
|
+
if (typeof e.url !== 'string' || !urlListed(e.url, urls.patterns))
|
|
119
|
+
return { keep: undefined, rows: [rowOf(event, 'url_not_listed', l.layer, e.url)] };
|
|
120
|
+
}
|
|
121
|
+
const envLayers = policy.layers.filter((l) => l.envs.kind !== 'absent');
|
|
122
|
+
if (envLayers.length === 0 || !Array.isArray(e.allowedEnvVars))
|
|
123
|
+
return { keep: entry, rows: [] };
|
|
124
|
+
const own = e.allowedEnvVars;
|
|
125
|
+
const lists = envLayers.map((l) => (l.envs.kind === 'list' ? l.envs.patterns : []));
|
|
126
|
+
const narrowed = own.filter((v) => typeof v === 'string' && lists.every((list) => list.includes(v)));
|
|
127
|
+
if (narrowed.length === own.length)
|
|
128
|
+
return { keep: entry, rows: [] };
|
|
129
|
+
const bad = envLayers.find((l) => l.envs.kind === 'malformed');
|
|
130
|
+
return { keep: { ...entry, allowedEnvVars: narrowed }, rows: bad !== undefined && own.length > 0 ? [rowOf(event, 'env_list_malformed', bad.layer, e.url)] : [] };
|
|
131
|
+
}
|
|
132
|
+
export function applyHttpHookPolicy(wire, policy) {
|
|
133
|
+
if (httpHookPolicyIsUnrestricted(policy))
|
|
134
|
+
return { wire, rows: [] };
|
|
135
|
+
const rows = [];
|
|
136
|
+
let changed = false;
|
|
137
|
+
const out = {};
|
|
138
|
+
for (const [event, groups] of Object.entries(wire)) {
|
|
139
|
+
if (!Array.isArray(groups)) {
|
|
140
|
+
out[event] = groups;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const keptGroups = [];
|
|
144
|
+
for (const g of groups) {
|
|
145
|
+
if (typeof g !== 'object' || g === null || !Array.isArray(g.hooks) || g.hooks.length === 0) {
|
|
146
|
+
keptGroups.push(g);
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const hooks = [];
|
|
150
|
+
for (const h of g.hooks) {
|
|
151
|
+
if (h?.type !== 'http') {
|
|
152
|
+
hooks.push(h);
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const j = judgeEntry(h, event, policy);
|
|
156
|
+
rows.push(...j.rows);
|
|
157
|
+
if (j.keep !== undefined)
|
|
158
|
+
hooks.push(j.keep);
|
|
159
|
+
}
|
|
160
|
+
const same = hooks.length === g.hooks.length && hooks.every((h, i) => h === g.hooks[i]);
|
|
161
|
+
if (!same)
|
|
162
|
+
changed = true;
|
|
163
|
+
if (hooks.length > 0)
|
|
164
|
+
keptGroups.push(same ? g : { ...g, hooks });
|
|
165
|
+
}
|
|
166
|
+
if (keptGroups.length > 0)
|
|
167
|
+
out[event] = keptGroups;
|
|
168
|
+
else if (groups.length === 0)
|
|
169
|
+
out[event] = groups;
|
|
170
|
+
else
|
|
171
|
+
changed = true;
|
|
172
|
+
}
|
|
173
|
+
if (!changed)
|
|
174
|
+
return { wire, rows };
|
|
175
|
+
return { wire: Object.keys(out).length > 0 ? out : undefined, rows };
|
|
176
|
+
}
|
package/dist/humanTurn.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface HumanTurnDegraded {
|
|
|
67
67
|
export interface HumanTurnNotice {
|
|
68
68
|
readonly uuid: string;
|
|
69
69
|
readonly kind: 'image';
|
|
70
|
-
readonly ref: string;
|
|
70
|
+
readonly ref: string | number;
|
|
71
71
|
readonly why: 'vision_unknown';
|
|
72
72
|
}
|
|
73
73
|
export type HumanTurnEncoding = {
|
|
@@ -99,6 +99,7 @@ export interface HumanTurnDelivered {
|
|
|
99
99
|
readonly full: readonly string[];
|
|
100
100
|
readonly partial: readonly string[];
|
|
101
101
|
}
|
|
102
|
+
export declare function otherBodyBytesOf(request: object | null | undefined): number | undefined;
|
|
102
103
|
export declare function imageSentOnUnknownVision(notices: readonly HumanTurnNotice[] | undefined, lang?: UiLanguage): string | undefined;
|
|
103
104
|
export declare function encodeHumanTurn(input: HumanTurnInput): HumanTurnEncoding;
|
|
104
105
|
export declare function deliveredUuidsOf(encoding: HumanTurnEncoding): HumanTurnDelivered;
|
package/dist/humanTurn.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CORE_MAX_PENDING_STEER_CHARS, CORE_MCP_IMAGE_MAX_BASE64, CORE_USER_ATTACHMENT_LABEL_MAX } from './generated/engineFactTables.js';
|
|
2
2
|
import { mintEnvelopeOf, mintReferenceOf, seatTextOf } from './userAttachmentEnvelope.js';
|
|
3
3
|
import { readEncodingShares, readHumanTurnInput } from './humanTurnRead.js';
|
|
4
|
+
import { putOwnKey } from './ownKey.js';
|
|
4
5
|
import { msg, renderMessage } from './i18n/translate.js';
|
|
5
6
|
const REQUEST_BODY_MAX_BYTES = 8 * 1024 * 1024;
|
|
6
7
|
const IMAGE_SEAT_MAX_COUNT = 20;
|
|
@@ -30,6 +31,29 @@ function utf8Length(s) {
|
|
|
30
31
|
return n;
|
|
31
32
|
}
|
|
32
33
|
const jsonBytes = (v) => utf8Length(JSON.stringify(v));
|
|
34
|
+
const ENCODER_BODY_KEYS = new Set(['objective', 'images', 'attachmentIds', 'userAttachments']);
|
|
35
|
+
export function otherBodyBytesOf(request) {
|
|
36
|
+
if (typeof request !== 'object' || request === null)
|
|
37
|
+
return undefined;
|
|
38
|
+
try {
|
|
39
|
+
if (Array.isArray(request))
|
|
40
|
+
return undefined;
|
|
41
|
+
const rest = {};
|
|
42
|
+
for (const k of Object.keys(request)) {
|
|
43
|
+
if (ENCODER_BODY_KEYS.has(k))
|
|
44
|
+
continue;
|
|
45
|
+
const d = Object.getOwnPropertyDescriptor(request, k);
|
|
46
|
+
if (d === undefined || !Object.hasOwn(d, 'value'))
|
|
47
|
+
return undefined;
|
|
48
|
+
putOwnKey(rest, k, d.value);
|
|
49
|
+
}
|
|
50
|
+
const json = JSON.stringify(rest);
|
|
51
|
+
return json === undefined ? undefined : utf8Length(json);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
33
57
|
function bodyBytes(other, objective, images, ids, entries) {
|
|
34
58
|
const keys = [jsonBytes('objective') + 1 + jsonBytes(objective)];
|
|
35
59
|
if (images.length > 0)
|
|
@@ -163,14 +187,20 @@ function sharesAndDegraded(items, recs) {
|
|
|
163
187
|
}
|
|
164
188
|
return { shares, degraded };
|
|
165
189
|
}
|
|
166
|
-
function noticesKey(v, items, placements) {
|
|
190
|
+
function noticesKey(v, items, placements, pastedWhy) {
|
|
167
191
|
if (v.vision !== 'unknown')
|
|
168
192
|
return {};
|
|
169
193
|
const notices = [];
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
194
|
+
items.forEach((it, i) => {
|
|
195
|
+
it.images.forEach((_, k) => {
|
|
196
|
+
if (pastedWhy[i]?.[k] === undefined)
|
|
197
|
+
notices.push({ uuid: it.uuid, kind: 'image', ref: k, why: 'vision_unknown' });
|
|
198
|
+
});
|
|
199
|
+
for (const p of placements) {
|
|
200
|
+
if (p.item === i && p.form === 'content' && p.seated && p.a.pixels !== undefined)
|
|
201
|
+
notices.push({ uuid: it.uuid, kind: 'image', ref: p.a.uuid, why: 'vision_unknown' });
|
|
202
|
+
}
|
|
203
|
+
});
|
|
174
204
|
return notices.length > 0 ? { notices } : {};
|
|
175
205
|
}
|
|
176
206
|
export function imageSentOnUnknownVision(notices, lang) {
|
|
@@ -204,7 +234,7 @@ function encodeObjective(v) {
|
|
|
204
234
|
total += len;
|
|
205
235
|
return undefined;
|
|
206
236
|
};
|
|
207
|
-
const pastedWhy = items.map((it) => it.images.map((img) => seat('data' in img ? img.data.length : 0)));
|
|
237
|
+
const pastedWhy = items.map((it) => it.images.map((img) => (v.vision === 'no' ? 'vision_no' : seat('data' in img ? img.data.length : 0))));
|
|
208
238
|
const placements = [];
|
|
209
239
|
items.forEach((it, i) => {
|
|
210
240
|
for (const a of it.attachments) {
|
|
@@ -260,7 +290,7 @@ function encodeObjective(v) {
|
|
|
260
290
|
...(entries.length > 0 ? { userAttachments: entries, userAttachmentOrdinals: seated.map((p) => p.a.uuid) } : {}),
|
|
261
291
|
shares,
|
|
262
292
|
degraded,
|
|
263
|
-
...noticesKey(v, items, placements),
|
|
293
|
+
...noticesKey(v, items, placements, pastedWhy),
|
|
264
294
|
};
|
|
265
295
|
}
|
|
266
296
|
let pick = -1;
|
package/dist/humanTurnRead.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { appendOwnElement } from './ownKey.js';
|
|
1
2
|
import { userAttachmentSeatAdmits } from './userAttachmentSeat.js';
|
|
2
3
|
const descriptorKindsAligned = true;
|
|
3
4
|
void descriptorKindsAligned;
|
|
@@ -15,7 +16,7 @@ function ownData(o, key) {
|
|
|
15
16
|
const d = Object.getOwnPropertyDescriptor(o, key);
|
|
16
17
|
if (d === undefined)
|
|
17
18
|
return undefined;
|
|
18
|
-
if (!('value'
|
|
19
|
+
if (!Object.hasOwn(d, 'value'))
|
|
19
20
|
bad();
|
|
20
21
|
return d.value;
|
|
21
22
|
}
|
|
@@ -29,9 +30,9 @@ function ownArray(x) {
|
|
|
29
30
|
const out = [];
|
|
30
31
|
for (let i = 0; i < n; i += 1) {
|
|
31
32
|
const d = Object.getOwnPropertyDescriptor(arr, i);
|
|
32
|
-
if (d === undefined || !('value'
|
|
33
|
+
if (d === undefined || !Object.hasOwn(d, 'value'))
|
|
33
34
|
bad();
|
|
34
|
-
out
|
|
35
|
+
appendOwnElement(out, d.value);
|
|
35
36
|
}
|
|
36
37
|
return out;
|
|
37
38
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HumanTurnDegraded, HumanTurnEncoding } from './humanTurn.js';
|
|
2
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
3
|
+
import type { ImageVision } from './liveModelCatalog.js';
|
|
4
|
+
export declare function humanTurnRefusalSentence(answer: HumanTurnEncoding | null | undefined, lang?: UiLanguage): string | undefined;
|
|
5
|
+
export declare function humanTurnDegradedSentence(degraded: readonly HumanTurnDegraded[] | null | undefined, lang?: UiLanguage, ctx?: {
|
|
6
|
+
readonly modelName?: string;
|
|
7
|
+
}): string | undefined;
|
|
8
|
+
export declare function printImageVisionSentence(vision: ImageVision | undefined, lang?: UiLanguage, ctx?: {
|
|
9
|
+
readonly modelName?: string;
|
|
10
|
+
}): string | undefined;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
2
|
+
import { guardedRead, readOwnDataValue } from './ownKey.js';
|
|
3
|
+
const own = (o, key) => guardedRead(() => readOwnDataValue(o, key));
|
|
4
|
+
const REFUSAL_KEYS = {
|
|
5
|
+
empty: 'session.humanTurn.refused.empty',
|
|
6
|
+
malformed_input: 'session.humanTurn.refused.malformedInput',
|
|
7
|
+
malformed_item: 'session.humanTurn.refused.malformedItem',
|
|
8
|
+
duplicate_uuid: 'session.humanTurn.refused.duplicateUuid',
|
|
9
|
+
rider_collides_primary: 'session.humanTurn.refused.riderCollidesPrimary',
|
|
10
|
+
oversize: 'session.humanTurn.refused.oversize',
|
|
11
|
+
};
|
|
12
|
+
const HOLD_KEYS = {
|
|
13
|
+
no_text: 'session.humanTurn.held.noText',
|
|
14
|
+
reminder_tag: 'session.humanTurn.held.reminderTag',
|
|
15
|
+
control_char: 'session.humanTurn.held.controlChar',
|
|
16
|
+
too_long: 'session.humanTurn.held.tooLong',
|
|
17
|
+
};
|
|
18
|
+
export function humanTurnRefusalSentence(answer, lang) {
|
|
19
|
+
if (own(answer, 'ok') !== false)
|
|
20
|
+
return undefined;
|
|
21
|
+
const reason = own(answer, 'reason');
|
|
22
|
+
if (typeof reason !== 'string')
|
|
23
|
+
return undefined;
|
|
24
|
+
if (reason === 'steer_hold') {
|
|
25
|
+
const why = own(answer, 'why');
|
|
26
|
+
return typeof why === 'string' && Object.hasOwn(HOLD_KEYS, why) ? renderMessage(msg(HOLD_KEYS[why]), lang) : undefined;
|
|
27
|
+
}
|
|
28
|
+
return Object.hasOwn(REFUSAL_KEYS, reason) ? renderMessage(msg(REFUSAL_KEYS[reason]), lang) : undefined;
|
|
29
|
+
}
|
|
30
|
+
const DEGRADED_KEYS = {
|
|
31
|
+
vision_no: ['session.humanTurn.degraded.visionNo.one', 'session.humanTurn.degraded.visionNo.other'],
|
|
32
|
+
image_too_large: ['session.humanTurn.degraded.imageTooLarge.one', 'session.humanTurn.degraded.imageTooLarge.other'],
|
|
33
|
+
seat_count: ['session.humanTurn.degraded.seatCount.one', 'session.humanTurn.degraded.seatCount.other'],
|
|
34
|
+
seat_total: ['session.humanTurn.degraded.seatTotal.one', 'session.humanTurn.degraded.seatTotal.other'],
|
|
35
|
+
body_budget: ['session.humanTurn.degraded.bodyBudget.one', 'session.humanTurn.degraded.bodyBudget.other'],
|
|
36
|
+
steer_admission: ['session.humanTurn.degraded.steerAdmission.one', 'session.humanTurn.degraded.steerAdmission.other'],
|
|
37
|
+
lane_has_no_image_seat: ['session.humanTurn.degraded.noImageSeat.one', 'session.humanTurn.degraded.noImageSeat.other'],
|
|
38
|
+
lane_has_no_attachment_id_seat: ['session.humanTurn.degraded.noAttachmentIdSeat.one', 'session.humanTurn.degraded.noAttachmentIdSeat.other'],
|
|
39
|
+
};
|
|
40
|
+
function modelFragment(modelName, lang) {
|
|
41
|
+
return typeof modelName === 'string' && modelName.length > 0 ? renderMessage(msg('session.humanTurn.modelFragment', { model: modelName }), lang) : '';
|
|
42
|
+
}
|
|
43
|
+
export function humanTurnDegradedSentence(degraded, lang, ctx) {
|
|
44
|
+
const counts = new Map();
|
|
45
|
+
try {
|
|
46
|
+
if (!Array.isArray(degraded))
|
|
47
|
+
return undefined;
|
|
48
|
+
for (const d of degraded) {
|
|
49
|
+
const why = own(d, 'why');
|
|
50
|
+
if (typeof why !== 'string' || !Object.hasOwn(DEGRADED_KEYS, why))
|
|
51
|
+
continue;
|
|
52
|
+
const k = why;
|
|
53
|
+
counts.set(k, (counts.get(k) ?? 0) + 1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
if (counts.size === 0)
|
|
60
|
+
return undefined;
|
|
61
|
+
const modelName = ctx === undefined ? undefined : own(ctx, 'modelName');
|
|
62
|
+
const lines = [];
|
|
63
|
+
for (const [why, n] of counts) {
|
|
64
|
+
const [one, other] = DEGRADED_KEYS[why];
|
|
65
|
+
lines.push(renderMessage(msg(n === 1 ? one : other, { count: n, model: modelFragment(modelName, lang) }), lang));
|
|
66
|
+
}
|
|
67
|
+
return lines.join('\n');
|
|
68
|
+
}
|
|
69
|
+
export function printImageVisionSentence(vision, lang, ctx) {
|
|
70
|
+
if (vision !== 'no' && vision !== 'unknown')
|
|
71
|
+
return undefined;
|
|
72
|
+
const model = modelFragment(ctx === undefined ? undefined : own(ctx, 'modelName'), lang);
|
|
73
|
+
return renderMessage(msg(vision === 'no' ? 'session.humanTurn.printVision.no' : 'session.humanTurn.printVision.unknown', { model }), lang);
|
|
74
|
+
}
|