@sema-agent/client-core 0.100.0 → 0.101.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 +395 -0
- package/README.md +164 -117
- package/dist/adapt/arms.js +51 -16
- package/dist/adapt/textStream.js +7 -4
- package/dist/adapt/toolCards.js +9 -8
- package/dist/adapt.js +7 -1
- package/dist/adapter/activeRunSelfHeal.d.ts +24 -2
- package/dist/adapter/activeRunSelfHeal.js +108 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +33 -12
- package/dist/adapter/downstream/terminalToSdkResult.d.ts +60 -1
- package/dist/adapter/downstream/terminalToSdkResult.js +209 -39
- 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/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 +1 -0
- package/dist/displayUntrusted.js +65 -8
- 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 +3 -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 +15 -2
- 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 +184 -2
- package/dist/i18n/messages.en.js +187 -5
- package/dist/i18n/messages.zh.js +197 -5
- package/dist/i18n/translate.js +3 -3
- package/dist/index.d.ts +69 -15
- package/dist/index.js +45 -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/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/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 +11 -0
- package/dist/ownKey.js +164 -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/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 +5 -1
- package/dist/request/submissionIdentity.d.ts +37 -0
- package/dist/request/submissionIdentity.js +65 -0
- package/dist/request/taskRequest.d.ts +12 -4
- package/dist/request/taskRequest.js +221 -152
- 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 +2 -2
- package/dist/seatContract.d.ts +46 -1
- package/dist/seatContract.js +49 -19
- package/dist/selfOrchestrationDenial.js +1 -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 +60 -5
- 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/toolHistoryMismatch.d.ts +8 -0
- package/dist/toolHistoryMismatch.js +37 -6
- package/dist/toolResult.d.ts +13 -3
- package/dist/toolResult.js +158 -9
- 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 +607 -181
- package/package.json +14 -3
|
@@ -3,10 +3,11 @@ import { askParkRowArm } from './askParkRowRouting.js';
|
|
|
3
3
|
import { parkGateArmOf } from './frameRouter.js';
|
|
4
4
|
import { seatSessionRowOf } from './standingRows.js';
|
|
5
5
|
import { hostLog } from '../host.js';
|
|
6
|
-
import { guardedRead, readAskOrigin, readOwnDataNonEmptyString, readOwnDataValue, readOwnNonEmptyString } from '../ownKey.js';
|
|
6
|
+
import { appendOwnElement, guardedRead, readAskOrigin, readOwnDataNonEmptyString, readOwnDataValue, readOwnNonEmptyString } from '../ownKey.js';
|
|
7
|
+
import { ownReadingSlot } from '../engineWireFor.js';
|
|
7
8
|
import { DEPLOYMENT_LIST_ASK_CLASSES, readAskClassPair } from './askClassPair.js';
|
|
8
9
|
import { invokeHostCallbackIsolated } from '../hostCallbackGuard.js';
|
|
9
|
-
import { approvalWindowKeysOf, readRequiresRealApproval } from './approvalCardReading.js';
|
|
10
|
+
import { approvalWindowKeysOf, readApprovalCardWord, readRequiresRealApproval } from './approvalCardReading.js';
|
|
10
11
|
import { readAllowRuleShadowFromWire, retiredAllowRuleShadowKeyPresent, RETIRED_SHADOW_EVIDENCE_LABEL } from './allowRuleShadow.js';
|
|
11
12
|
import { createSessionSlot, DEFAULT_SESSION_KEY } from '../sessionSlot.js';
|
|
12
13
|
import { readEngineActiveBgTasks } from '../fleet/fleetLedger.js';
|
|
@@ -18,16 +19,17 @@ import { approvalCallKey, liveFrameCallKey } from './gateIdentity.js';
|
|
|
18
19
|
import { displayUntrusted } from '../displayUntrusted.js';
|
|
19
20
|
import { frameBindingOf } from '../frameBinding.js';
|
|
20
21
|
import { carriesAttributionKey, deliverWithAttributionLadder } from './attributionLadder.js';
|
|
22
|
+
import { deliverApprovalDecision, newSendTally } from './approvalDelivery.js';
|
|
21
23
|
import { approvalDecisionHolds, approvalHoldFor, awaitApprovalHolder, claimApprovalCardFor, enterLiveRespondPhase, holdLiveCard, joinLiveCard, liveCardHoldOf, clearSettledApprovals, noteHolderSettledApproval, settledApprovalOf, settledForDurableLane, settledLiveCardOutcome } from './approvalHolds.js';
|
|
22
|
-
import { joinedResolution, resolutionOfDecisionFailure } from './approvalResolution.js';
|
|
24
|
+
import { directFailureVerdictOf, directSafetyStopOf, joinedResolution, resolutionOfDecisionFailure } from './approvalResolution.js';
|
|
23
25
|
import { parkRowDeadlineState } from './parkExpiryJudgements.js';
|
|
24
26
|
import { isApprovalMandateWord } from '../gateVocabulary.js';
|
|
25
27
|
import { approvalDecidedByAdmitted } from '../approvalDecidedByCapability.js';
|
|
26
28
|
import { decideFailureNote } from '../decideFailureNote.js';
|
|
27
|
-
import { wireFailureTextsOf } from '../wireFailureShape.js';
|
|
29
|
+
import { slotPresenceOf, wireFailureTextsOf } from '../wireFailureShape.js';
|
|
28
30
|
import { DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED } from '../engineErrorCodes.js';
|
|
29
31
|
import { readDecideReceipt } from '../decideReceipt.js';
|
|
30
|
-
import { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS, RULE_OFFERS_ABSENCE_REASONS, ASK_ORIGINS,
|
|
32
|
+
import { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS, RULE_OFFERS_ABSENCE_REASONS, ASK_ORIGINS, } from '@sema-agent/sdk';
|
|
31
33
|
export function toolNameIsFsWrite(name) {
|
|
32
34
|
const n = name.replace(/[\s_-]+/g, '').toLowerCase();
|
|
33
35
|
return (n === 'write' || n === 'filewrite' || n === 'edit' || n === 'fileedit' || n === 'multiedit' || n === 'notebookedit');
|
|
@@ -78,7 +80,7 @@ export function readApprovalDenySettledBy(decision) {
|
|
|
78
80
|
catch {
|
|
79
81
|
return undefined;
|
|
80
82
|
}
|
|
81
|
-
if (d === undefined || !('value'
|
|
83
|
+
if (d === undefined || !Object.hasOwn(d, 'value'))
|
|
82
84
|
return undefined;
|
|
83
85
|
const v = d.value;
|
|
84
86
|
return typeof v === 'string' && APPROVAL_DENY_SETTLED_BY_WORDS.includes(v)
|
|
@@ -417,6 +419,7 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
417
419
|
}
|
|
418
420
|
return { kind: 'unsettled', ...at, cause: 'interrupted' };
|
|
419
421
|
case 'allow':
|
|
422
|
+
let rememberStop;
|
|
420
423
|
try {
|
|
421
424
|
let rememberRefused = false;
|
|
422
425
|
const approveBody = answerPayloadFor(card, 'decide');
|
|
@@ -434,6 +437,11 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
434
437
|
catch (e) {
|
|
435
438
|
if (rememberRefusalOf(e) === undefined)
|
|
436
439
|
throw e;
|
|
440
|
+
const verdict = directFailureVerdictOf(e, directSafetyStopOf(e));
|
|
441
|
+
if (verdict.yields) {
|
|
442
|
+
rememberStop = ownReadingSlot(verdict, 'directStop');
|
|
443
|
+
throw e;
|
|
444
|
+
}
|
|
437
445
|
rememberRefused = true;
|
|
438
446
|
logAfterDecided(`liveToolApprovalWire: decide(approve+remember) refused the remember part (${String(e)}) — falling back to plain approve`);
|
|
439
447
|
}
|
|
@@ -450,15 +458,17 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
450
458
|
return { kind: 'decided', ...at, decision: 'allow', ...(receipt !== undefined ? { receipt } : {}) };
|
|
451
459
|
}
|
|
452
460
|
catch (e) {
|
|
461
|
+
const directStop = rememberStop !== undefined && rememberStop.thrown === e ? rememberStop : directSafetyStopOf(e);
|
|
453
462
|
const failureTexts = wireFailureTextsOf(e);
|
|
454
463
|
hostLog('debug', `liveToolApprovalWire: decide(approve) failed: ${failureTexts.log}`);
|
|
455
|
-
return resolutionOfDecisionFailure(e, { lane: 'decide', route: 'approval_decide', gatedCallId, detail: `decide(approve) failed: ${failureTexts.reason}${decideFailureNote(e, 'approve')}
|
|
464
|
+
return resolutionOfDecisionFailure(e, { lane: 'decide', route: 'approval_decide', gatedCallId, detail: `decide(approve) failed: ${failureTexts.reason}${decideFailureNote(e, 'approve')}`, ...(directStop !== undefined ? { directStop } : {}) });
|
|
456
465
|
}
|
|
457
466
|
case 'deny': {
|
|
458
467
|
const denySettledByForWire = readApprovalDenySettledBy(card);
|
|
459
468
|
const attributionKeys = decisionAttributionKeyOf(decidedByReading, denySettledByForWire);
|
|
460
469
|
const denyReasonSnapshot = ((r) => (typeof r === 'string' ? r : undefined))(card.reason);
|
|
461
470
|
let lastSendCarriedAttribution = false;
|
|
471
|
+
let ladderSafetyStop;
|
|
462
472
|
try {
|
|
463
473
|
const denyPayload = { decision: 'deny', reason: answerPayloadFor({ kind: 'deny', ...(denyReasonSnapshot !== undefined ? { reason: denyReasonSnapshot } : {}) }, 'decide').reason };
|
|
464
474
|
const denyBody = { ...denyPayload, ...attributionKeys };
|
|
@@ -479,10 +489,11 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
479
489
|
: `liveToolApprovalWire: decide(deny) for task ${taskId} was refused again because the settlement note is not part of ` +
|
|
480
490
|
'what this deployment signs — re-sending the SAME decision exactly once more with that key removed ' +
|
|
481
491
|
'(still before the approval was judged)');
|
|
482
|
-
});
|
|
492
|
+
}, { kind: 'direct', stopOf: directSafetyStopOf });
|
|
483
493
|
}
|
|
484
494
|
finally {
|
|
485
495
|
lastSendCarriedAttribution = ladder.lastCarried;
|
|
496
|
+
ladderSafetyStop = ladder.safetyStop;
|
|
486
497
|
}
|
|
487
498
|
const attributionDropped = ladder.dropped;
|
|
488
499
|
const attributionRenamed = ladder.renamed;
|
|
@@ -497,6 +508,7 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
497
508
|
};
|
|
498
509
|
}
|
|
499
510
|
catch (e) {
|
|
511
|
+
const directStop = ladderSafetyStop !== undefined && ladderSafetyStop.thrown === e ? ladderSafetyStop : directSafetyStopOf(e);
|
|
500
512
|
const failureTexts = wireFailureTextsOf(e);
|
|
501
513
|
hostLog('debug', `liveToolApprovalWire: decide(deny) failed: ${failureTexts.log}`);
|
|
502
514
|
return resolutionOfDecisionFailure(e, {
|
|
@@ -505,6 +517,7 @@ async function presentFsApprovalAndDecide(deps, taskId, argsByCall, signal, foun
|
|
|
505
517
|
gatedCallId,
|
|
506
518
|
detail: `decide(deny) failed: ${failureTexts.reason}${decideFailureNote(e, 'deny')}`,
|
|
507
519
|
attributionCarried: lastSendCarriedAttribution,
|
|
520
|
+
...(directStop !== undefined ? { directStop } : {}),
|
|
508
521
|
});
|
|
509
522
|
}
|
|
510
523
|
}
|
|
@@ -588,20 +601,7 @@ export function readApprovalMandate(v) {
|
|
|
588
601
|
const raw = v.mandate;
|
|
589
602
|
return isApprovalMandateWord(raw) ? raw : undefined;
|
|
590
603
|
}
|
|
591
|
-
|
|
592
|
-
export function readApprovalCardWord(carrier) {
|
|
593
|
-
try {
|
|
594
|
-
if (typeof carrier !== 'object' || carrier === null)
|
|
595
|
-
return undefined;
|
|
596
|
-
const d = Object.getOwnPropertyDescriptor(carrier, 'approvalCard');
|
|
597
|
-
if (d === undefined || !('value' in d))
|
|
598
|
-
return undefined;
|
|
599
|
-
return APPROVAL_CARD_WORD_SET.has(d.value) ? d.value : undefined;
|
|
600
|
-
}
|
|
601
|
-
catch {
|
|
602
|
-
return undefined;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
604
|
+
export { readApprovalCardWord };
|
|
605
605
|
export function toolPermissionRequestAskBits(card, requestId) {
|
|
606
606
|
if (typeof card !== 'object' || card === null)
|
|
607
607
|
return {};
|
|
@@ -958,7 +958,7 @@ function ownDataValue(v, key) {
|
|
|
958
958
|
return undefined;
|
|
959
959
|
try {
|
|
960
960
|
const d = Object.getOwnPropertyDescriptor(v, key);
|
|
961
|
-
return d !== undefined && 'value'
|
|
961
|
+
return d !== undefined && Object.hasOwn(d, 'value') ? d.value : undefined;
|
|
962
962
|
}
|
|
963
963
|
catch {
|
|
964
964
|
return undefined;
|
|
@@ -974,9 +974,9 @@ function ownStringList(v) {
|
|
|
974
974
|
const out = [];
|
|
975
975
|
for (let i = 0; i < length; i++) {
|
|
976
976
|
const d = Object.getOwnPropertyDescriptor(v, i);
|
|
977
|
-
if (d === undefined || !('value'
|
|
977
|
+
if (d === undefined || !Object.hasOwn(d, 'value') || typeof d.value !== 'string' || d.value === '')
|
|
978
978
|
return undefined;
|
|
979
|
-
out
|
|
979
|
+
appendOwnElement(out, d.value);
|
|
980
980
|
}
|
|
981
981
|
return v.length === length ? Object.freeze(out) : undefined;
|
|
982
982
|
}
|
|
@@ -1085,18 +1085,8 @@ const UNREADABLE_EVIDENCE_KEYS = Object.freeze({
|
|
|
1085
1085
|
]),
|
|
1086
1086
|
generic: Object.freeze([['ruleOffersAbsence', 'ruleOffersAbsence'], ['askClass', 'askClass'], ['classes', 'classes']]),
|
|
1087
1087
|
});
|
|
1088
|
-
function carrierHas(carrier, key) {
|
|
1089
|
-
if (typeof carrier !== 'object' || carrier === null)
|
|
1090
|
-
return false;
|
|
1091
|
-
try {
|
|
1092
|
-
return key in carrier;
|
|
1093
|
-
}
|
|
1094
|
-
catch {
|
|
1095
|
-
return true;
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
1088
|
function v1RiskUnreadable(card) {
|
|
1099
|
-
if (
|
|
1089
|
+
if (slotPresenceOf(card, 'risk') === 'absent')
|
|
1100
1090
|
return false;
|
|
1101
1091
|
try {
|
|
1102
1092
|
const risk = card.risk;
|
|
@@ -1109,12 +1099,12 @@ function v1RiskUnreadable(card) {
|
|
|
1109
1099
|
function withUnreadableEvidence(carrier, leg, req, reported = []) {
|
|
1110
1100
|
const keys = new Set(reported);
|
|
1111
1101
|
for (const [from, to] of UNREADABLE_EVIDENCE_KEYS[leg]) {
|
|
1112
|
-
if (
|
|
1102
|
+
if (slotPresenceOf(carrier, from) !== 'absent' && !Object.hasOwn(req, to))
|
|
1113
1103
|
keys.add(from);
|
|
1114
1104
|
}
|
|
1115
1105
|
if (leg === 'row') {
|
|
1116
1106
|
const rd = ownDataValue(carrier, 'riskDescriptor');
|
|
1117
|
-
if (
|
|
1107
|
+
if (typeof rd === 'object' && rd !== null && slotPresenceOf(rd, 'allowRuleShadowed') !== 'absent' && !Object.hasOwn(req, 'allowRuleShadow'))
|
|
1118
1108
|
keys.add('riskDescriptor.allowRuleShadowed');
|
|
1119
1109
|
}
|
|
1120
1110
|
if (leg !== 'generic' && !Object.hasOwn(req, 'allowRuleShadow')) {
|
|
@@ -1845,6 +1835,7 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
1845
1835
|
const attributionKeys = decision === 'deny' ? decisionAttributionKeyOf(decidedByReading, denySettledByForWire) : {};
|
|
1846
1836
|
const sentAttributionKey = carriesAttributionKey(attributionKeys);
|
|
1847
1837
|
let lastSendCarriedAttribution = sentAttributionKey;
|
|
1838
|
+
let deliveryFailure;
|
|
1848
1839
|
const denyReasonSnapshot = denyReasonRead;
|
|
1849
1840
|
if (card.kind === 'failed') {
|
|
1850
1841
|
hostLog('debug', `liveToolApprovalWire: approval card unavailable (${card.reason}) — fail-closed deny for ${approvalId}`);
|
|
@@ -1926,8 +1917,8 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
1926
1917
|
ruleArmDroppedForCheck = 'text_not_offered';
|
|
1927
1918
|
}
|
|
1928
1919
|
}
|
|
1920
|
+
const signalPreAborted = signal !== undefined && signal.aborted;
|
|
1929
1921
|
const respondOpts = {
|
|
1930
|
-
...(signal && !signal.aborted ? { signal } : {}),
|
|
1931
1922
|
...(basePayload?.updatedInput !== undefined ? { updatedInput: basePayload.updatedInput } : {}),
|
|
1932
1923
|
...(persistRule !== undefined ? { persistRule } : {}),
|
|
1933
1924
|
...(persistRuleEdited !== undefined ? { persistRuleEdited } : {}),
|
|
@@ -1940,19 +1931,36 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
1940
1931
|
if (basePayload !== undefined)
|
|
1941
1932
|
emitAnswerCommitted(liveFrameCallKey(approvalId), 'respond', answerSnapshot, basePayload);
|
|
1942
1933
|
try {
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1934
|
+
const delivery = await deliverApprovalDecision({
|
|
1935
|
+
approvalId,
|
|
1936
|
+
body: respondOpts,
|
|
1937
|
+
send: (o, sig) => respond(approvalId, decision, !signalPreAborted && sig !== undefined ? { ...o, signal: sig } : o),
|
|
1938
|
+
signal,
|
|
1939
|
+
tally: newSendTally(),
|
|
1940
|
+
ladder,
|
|
1941
|
+
onLadderStep: (step) => {
|
|
1942
|
+
hostLog('debug', step === 'renamed'
|
|
1943
|
+
? `liveToolApprovalWire: respond(deny) for ${approvalId} was refused because the settlement note was sent under a name ` +
|
|
1944
|
+
'this engine has retired — re-sending the SAME decision exactly once with that one key renamed to the name the refusal points to ' +
|
|
1951
1945
|
'(the refusal happened before the approval was judged, so nothing was consumed and this is a re-delivery, not a second act)'
|
|
1952
|
-
:
|
|
1953
|
-
|
|
1954
|
-
|
|
1946
|
+
: step === 'dropped'
|
|
1947
|
+
? `liveToolApprovalWire: respond(deny) for ${approvalId} was refused because the settlement note is not part of ` +
|
|
1948
|
+
'what this deployment signs — re-sending the SAME decision exactly once with that one key removed ' +
|
|
1949
|
+
'(the refusal happened before the approval was judged, so nothing was consumed and this is a re-delivery, not a second act)'
|
|
1950
|
+
: `liveToolApprovalWire: respond(deny) for ${approvalId} was refused again because the settlement note is not part of ` +
|
|
1951
|
+
'what this deployment signs — re-sending the SAME decision exactly once more with that key removed ' +
|
|
1952
|
+
'(still before the approval was judged)');
|
|
1953
|
+
},
|
|
1954
|
+
parkingOf: (body) => {
|
|
1955
|
+
const p = readToolApprovalRespondParking(body);
|
|
1956
|
+
return p?.kind === 'parking' ? p.view : undefined;
|
|
1957
|
+
},
|
|
1955
1958
|
});
|
|
1959
|
+
if (delivery.kind === 'thrown') {
|
|
1960
|
+
deliveryFailure = delivery;
|
|
1961
|
+
throw delivery.error;
|
|
1962
|
+
}
|
|
1963
|
+
raw = delivery.raw;
|
|
1956
1964
|
}
|
|
1957
1965
|
finally {
|
|
1958
1966
|
lastSendCarriedAttribution = ladder.lastCarried;
|
|
@@ -1963,9 +1971,11 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
1963
1971
|
if (parkingBody !== undefined) {
|
|
1964
1972
|
const parking = parkingBody.kind === 'parking' && parkingBody.view.approvalId === approvalId ? parkingBody.view : undefined;
|
|
1965
1973
|
if (parking !== undefined) {
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1974
|
+
const hint = ownReadingSlot(parking, 'retryAfterMs');
|
|
1975
|
+
const decidePath = ownReadingSlot(parking, 'decidePath');
|
|
1976
|
+
hostLog('debug', `liveToolApprovalWire: respond(${decision}) for ${approvalId} answered 202 parking_in_progress${hint !== undefined ? ` (retryAfterMs=${hint})` : ''} — ` +
|
|
1977
|
+
`the answer did NOT take effect${decidePath !== undefined ? ' (the engine pointed at a decide path for the parked card)' : ''}; not reported as decided (the one invited re-send, if any, has already been made); the user is told to answer again on the parked card`);
|
|
1978
|
+
surfaceApprovalParking(hint);
|
|
1969
1979
|
return { kind: 'unsettled', lane: 'respond', cause: 'parking_in_progress', parking };
|
|
1970
1980
|
}
|
|
1971
1981
|
hostLog('error', `liveToolApprovalWire: 202 parking body for ${approvalId} is ${parkingBody.kind === 'parking' ? `for another approval (${parkingBody.view.approvalId})` : 'unreadable (approvalId is not usable)'} — ` +
|
|
@@ -2065,7 +2075,15 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
2065
2075
|
return { kind: 'decided', lane: 'respond', decision, ...(ack !== undefined ? { ack } : {}), ...(deny !== undefined ? { deny } : {}) };
|
|
2066
2076
|
}
|
|
2067
2077
|
catch (e) {
|
|
2068
|
-
const
|
|
2078
|
+
const fromDelivery = deliveryFailure !== undefined && deliveryFailure.error === e ? deliveryFailure : undefined;
|
|
2079
|
+
const r = resolutionOfDecisionFailure(e, {
|
|
2080
|
+
lane: 'respond',
|
|
2081
|
+
route: 'live_respond',
|
|
2082
|
+
attributionCarried: lastSendCarriedAttribution,
|
|
2083
|
+
...(fromDelivery?.transportExhausted === true ? { transportExhausted: true } : {}),
|
|
2084
|
+
...(fromDelivery?.afterRetry === true ? { afterRetry: true } : {}),
|
|
2085
|
+
...(fromDelivery !== undefined ? { delivered: fromDelivery.reading } : {}),
|
|
2086
|
+
});
|
|
2069
2087
|
const refusal = r.kind === 'unsettled' ? r.refusal : undefined;
|
|
2070
2088
|
hostLog('debug', `liveToolApprovalWire: respond(${decision}) failed for ${approvalId} ` +
|
|
2071
2089
|
`(status=${refusal?.status ?? 'none'} errorCode=${logSafeErrorCode(refusal?.errorCode)} ` +
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
1
2
|
export type HookMatcherUnjudgedReason = 'event_out_of_scope' | 'not_a_string' | 'oversize' | 'pattern_unsupported' | 'over_budget';
|
|
2
3
|
export type HookMatcherRefusedReason = 'alias_without_canonical' | 'invalid_regex';
|
|
3
4
|
export type HookMatcherVerdict = {
|
|
@@ -24,3 +25,4 @@ export type HookMatcherVerdict = {
|
|
|
24
25
|
readonly reason: HookMatcherUnjudgedReason;
|
|
25
26
|
};
|
|
26
27
|
export declare function hookMatcherVerdict(event: string, matcher: unknown): HookMatcherVerdict;
|
|
28
|
+
export declare function hookMatcherUnjudgedWhy(reason: HookMatcherUnjudgedReason | string, lang?: UiLanguage): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
1
2
|
import { HOOK_TOOL_ALIASES } from './hookToolAliases.js';
|
|
2
3
|
import { SETTINGS_TOOL_NAME_MATCHER_EVENTS } from './generated/settingsSchemaTables.js';
|
|
3
4
|
import { SETTINGS_HOOK_MATCHER_FORM, SETTINGS_HOOK_MATCHER_SELECTS } from './generated/settingsSchemaFns.js';
|
|
@@ -231,3 +232,14 @@ export function hookMatcherVerdict(event, matcher) {
|
|
|
231
232
|
}
|
|
232
233
|
return Object.freeze({ kind: 'accepted', reading, aliases: Object.freeze(selected.map((p) => Object.freeze({ ...p }))) });
|
|
233
234
|
}
|
|
235
|
+
const UNJUDGED_WHY_KEY = {
|
|
236
|
+
event_out_of_scope: 'config.hooks.matcher.unjudged.eventOutOfScope',
|
|
237
|
+
not_a_string: 'config.hooks.matcher.unjudged.notAString',
|
|
238
|
+
oversize: 'config.hooks.matcher.unjudged.oversize',
|
|
239
|
+
pattern_unsupported: 'config.hooks.matcher.unjudged.patternUnsupported',
|
|
240
|
+
over_budget: 'config.hooks.matcher.unjudged.overBudget',
|
|
241
|
+
};
|
|
242
|
+
export function hookMatcherUnjudgedWhy(reason, lang) {
|
|
243
|
+
const key = typeof reason === 'string' && Object.hasOwn(UNJUDGED_WHY_KEY, reason) ? UNJUDGED_WHY_KEY[reason] : 'config.hooks.matcher.unjudged.unknown';
|
|
244
|
+
return renderMessage(msg(key), lang);
|
|
245
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
|
+
export declare const COMPACT_LATCH_STATES: readonly ["armed", "fired", "none"];
|
|
3
|
+
export type CompactLatchState = (typeof COMPACT_LATCH_STATES)[number];
|
|
4
|
+
export declare const COMPACT_SUMMARY_LEGS: readonly ["engine", "local_fallback", "local_fallback_unavailable", "none"];
|
|
5
|
+
export type CompactSummaryLeg = (typeof COMPACT_SUMMARY_LEGS)[number];
|
|
6
|
+
export type CompactHookExecutor = 'engine' | 'shell' | 'none';
|
|
7
|
+
export type CompactHookDisclosure = 'engine_outcome_unknown' | 'neither_ran';
|
|
8
|
+
export interface CompactHookTransitionInput {
|
|
9
|
+
readonly latch: CompactLatchState;
|
|
10
|
+
readonly leg: CompactSummaryLeg;
|
|
11
|
+
}
|
|
12
|
+
export interface CompactHookTransition {
|
|
13
|
+
readonly executor: CompactHookExecutor;
|
|
14
|
+
readonly revokeEngineRun: boolean;
|
|
15
|
+
readonly shellRunsHook: boolean;
|
|
16
|
+
readonly disclosure?: CompactHookDisclosure;
|
|
17
|
+
}
|
|
18
|
+
export declare function compactHookTransition(input: CompactHookTransitionInput): CompactHookTransition;
|
|
19
|
+
export declare function compactHookDisclosureSentence(disclosure: CompactHookDisclosure, lang?: UiLanguage): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
2
|
+
import { readOwnDataValue } from './ownKey.js';
|
|
3
|
+
export const COMPACT_LATCH_STATES = Object.freeze(['armed', 'fired', 'none']);
|
|
4
|
+
export const COMPACT_SUMMARY_LEGS = Object.freeze(['engine', 'local_fallback', 'local_fallback_unavailable', 'none']);
|
|
5
|
+
const frozen = (t) => Object.freeze({ ...t });
|
|
6
|
+
const KEEP = Object.freeze({ executor: 'engine', revokeEngineRun: false, shellRunsHook: false });
|
|
7
|
+
function inSet(set, v) {
|
|
8
|
+
return typeof v === 'string' && set.includes(v);
|
|
9
|
+
}
|
|
10
|
+
export function compactHookTransition(input) {
|
|
11
|
+
let latch;
|
|
12
|
+
let leg;
|
|
13
|
+
try {
|
|
14
|
+
latch = readOwnDataValue(input, 'latch');
|
|
15
|
+
leg = readOwnDataValue(input, 'leg');
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return KEEP;
|
|
19
|
+
}
|
|
20
|
+
if (!inSet(COMPACT_LATCH_STATES, latch) || !inSet(COMPACT_SUMMARY_LEGS, leg))
|
|
21
|
+
return KEEP;
|
|
22
|
+
if (leg === 'none')
|
|
23
|
+
return latch === 'none' ? frozen({ executor: 'none', revokeEngineRun: false, shellRunsHook: false }) : KEEP;
|
|
24
|
+
if (leg === 'engine')
|
|
25
|
+
return KEEP;
|
|
26
|
+
if (latch === 'fired')
|
|
27
|
+
return frozen({ executor: 'engine', revokeEngineRun: false, shellRunsHook: false, disclosure: 'engine_outcome_unknown' });
|
|
28
|
+
if (leg === 'local_fallback') {
|
|
29
|
+
return latch === 'armed'
|
|
30
|
+
? frozen({ executor: 'shell', revokeEngineRun: true, shellRunsHook: true })
|
|
31
|
+
: frozen({ executor: 'shell', revokeEngineRun: false, shellRunsHook: true });
|
|
32
|
+
}
|
|
33
|
+
return frozen({ executor: 'none', revokeEngineRun: false, shellRunsHook: false, disclosure: 'neither_ran' });
|
|
34
|
+
}
|
|
35
|
+
export function compactHookDisclosureSentence(disclosure, lang) {
|
|
36
|
+
if (disclosure === 'engine_outcome_unknown')
|
|
37
|
+
return renderMessage(msg('session.hooks.compactTransition.disclosure.engineOutcomeUnknown'), lang);
|
|
38
|
+
if (disclosure === 'neither_ran')
|
|
39
|
+
return renderMessage(msg('session.hooks.compactTransition.disclosure.neitherRan'), lang);
|
|
40
|
+
return '';
|
|
41
|
+
}
|
package/dist/hooksWireCaps.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface HooksForWireOptions {
|
|
|
7
7
|
readonly plan: HooksWirePlan;
|
|
8
8
|
}
|
|
9
9
|
export declare function hooksForWire(opts: HooksForWireOptions): WireHooksConfig | undefined;
|
|
10
|
-
export declare function hooksWirePlan(opts
|
|
10
|
+
export declare function hooksWirePlan(opts: HooksWirePlanOptions): HooksWirePlan;
|
|
11
11
|
export declare function __resetHooksWireCapsForTests(): void;
|
|
12
12
|
export declare function fleetHookFailureNoticeCapable(baseUrl: string | undefined): boolean;
|
|
13
13
|
export declare const HOOK_FAILURE_WARN_PREFIX = "Hook error";
|