@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,255 @@
|
|
|
1
|
+
import { readOwnDataValue } from './ownKey.js';
|
|
2
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
|
+
import { quoteUntrustedForSentence } from './displayUntrusted.js';
|
|
4
|
+
import { seatCapabilityUnavailableDetail } from './seatContract.js';
|
|
5
|
+
import { THINKING_LATCH_EVENTS, } from './thinkingLatchWords.js';
|
|
6
|
+
const UNSET_WHYS = Object.freeze(['no_port', 'never_set', 'unreadable', 'malformed']);
|
|
7
|
+
const THINKING_LATCH_TRANSITIONS = Object.freeze({
|
|
8
|
+
on: Object.freeze({ on: 'on', off: 'off', toggle: 'off', clear: 'unset' }),
|
|
9
|
+
off: Object.freeze({ on: 'on', off: 'off', toggle: 'on', clear: 'unset' }),
|
|
10
|
+
unset: Object.freeze({ on: 'on', off: 'off', toggle: 'off', clear: 'unset' }),
|
|
11
|
+
});
|
|
12
|
+
const storedOf = (state) => (state === 'on' ? true : state === 'off' ? false : undefined);
|
|
13
|
+
const setReading = (state) => Object.freeze({ state });
|
|
14
|
+
const unsetReading = (why) => Object.freeze({ state: 'unset', why });
|
|
15
|
+
function normalizedReading(v) {
|
|
16
|
+
try {
|
|
17
|
+
if (typeof v !== 'object' || v === null)
|
|
18
|
+
return unsetReading('malformed');
|
|
19
|
+
const state = readOwnDataValue(v, 'state');
|
|
20
|
+
if (state === 'on' || state === 'off')
|
|
21
|
+
return setReading(state);
|
|
22
|
+
if (state !== 'unset')
|
|
23
|
+
return unsetReading('malformed');
|
|
24
|
+
const why = readOwnDataValue(v, 'why');
|
|
25
|
+
return typeof why === 'string' && UNSET_WHYS.includes(why) ? unsetReading(why) : unsetReading('malformed');
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return unsetReading('malformed');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function readThinkingLatch(port) {
|
|
32
|
+
if (port === undefined || port === null)
|
|
33
|
+
return unsetReading('no_port');
|
|
34
|
+
let stored;
|
|
35
|
+
try {
|
|
36
|
+
const read = port.read;
|
|
37
|
+
if (typeof read !== 'function')
|
|
38
|
+
return unsetReading('unreadable');
|
|
39
|
+
stored = Reflect.apply(read, port, []);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return unsetReading('unreadable');
|
|
43
|
+
}
|
|
44
|
+
if (stored === true)
|
|
45
|
+
return setReading('on');
|
|
46
|
+
if (stored === false)
|
|
47
|
+
return setReading('off');
|
|
48
|
+
if (stored === undefined)
|
|
49
|
+
return unsetReading('never_set');
|
|
50
|
+
return unsetReading('malformed');
|
|
51
|
+
}
|
|
52
|
+
export function writeThinkingLatch(port, event) {
|
|
53
|
+
if (port === undefined || port === null)
|
|
54
|
+
return Object.freeze({ kind: 'not_saved', why: 'no_port', previous: unsetReading('no_port') });
|
|
55
|
+
const previous = readThinkingLatch(port);
|
|
56
|
+
const ev = event;
|
|
57
|
+
if (typeof ev !== 'string' || !THINKING_LATCH_EVENTS.includes(ev)) {
|
|
58
|
+
return Object.freeze({ kind: 'not_saved', why: 'bad_event', previous });
|
|
59
|
+
}
|
|
60
|
+
const target = THINKING_LATCH_TRANSITIONS[previous.state][ev];
|
|
61
|
+
const clean = previous.why === undefined || previous.why === 'never_set';
|
|
62
|
+
if (clean && target === previous.state)
|
|
63
|
+
return Object.freeze({ kind: 'unchanged', state: target });
|
|
64
|
+
let wrote = false;
|
|
65
|
+
try {
|
|
66
|
+
const write = port.write;
|
|
67
|
+
if (typeof write === 'function') {
|
|
68
|
+
Reflect.apply(write, port, [storedOf(target)]);
|
|
69
|
+
wrote = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
wrote = false;
|
|
74
|
+
}
|
|
75
|
+
if (!wrote)
|
|
76
|
+
return Object.freeze({ kind: 'not_saved', why: 'write_failed', attempted: target, now: readThinkingLatch(port) });
|
|
77
|
+
return Object.freeze({ kind: 'saved', previous, state: target });
|
|
78
|
+
}
|
|
79
|
+
const ownSlotOf = (v, key) => {
|
|
80
|
+
try {
|
|
81
|
+
const d = Object.getOwnPropertyDescriptor(v, key);
|
|
82
|
+
if (d === undefined)
|
|
83
|
+
return { kind: 'absent' };
|
|
84
|
+
return Object.hasOwn(d, 'value') ? { kind: 'data', value: d.value } : { kind: 'unreadable' };
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return { kind: 'unreadable' };
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
function capabilityReadingOf(capability) {
|
|
91
|
+
if (typeof capability !== 'object' || capability === null)
|
|
92
|
+
return Object.freeze({ kind: 'malformed' });
|
|
93
|
+
const kind = ownSlotOf(capability, 'kind');
|
|
94
|
+
if (kind.kind !== 'data')
|
|
95
|
+
return Object.freeze({ kind: 'malformed' });
|
|
96
|
+
if (kind.value === 'not_reported')
|
|
97
|
+
return Object.freeze({ kind: 'not_reported' });
|
|
98
|
+
if (kind.value === 'reported') {
|
|
99
|
+
const available = ownSlotOf(capability, 'available');
|
|
100
|
+
return available.kind === 'data' && typeof available.value === 'boolean'
|
|
101
|
+
? Object.freeze({ kind: 'reported', available: available.value })
|
|
102
|
+
: Object.freeze({ kind: 'malformed' });
|
|
103
|
+
}
|
|
104
|
+
return Object.freeze({ kind: 'malformed' });
|
|
105
|
+
}
|
|
106
|
+
const seatCarries = (capability) => {
|
|
107
|
+
try {
|
|
108
|
+
return seatCapabilityUnavailableDetail('thinkingLatch', capabilityReadingOf(capability)) === undefined;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const carrierBlocks = (carrier) => {
|
|
115
|
+
if (carrier.kind === 'absent')
|
|
116
|
+
return false;
|
|
117
|
+
if (carrier.kind === 'unreadable')
|
|
118
|
+
return true;
|
|
119
|
+
const c = carrier.value;
|
|
120
|
+
if (c === undefined)
|
|
121
|
+
return false;
|
|
122
|
+
if (typeof c !== 'object' || c === null)
|
|
123
|
+
return true;
|
|
124
|
+
const kind = ownSlotOf(c, 'kind');
|
|
125
|
+
if (kind.kind !== 'data')
|
|
126
|
+
return true;
|
|
127
|
+
if (kind.value === 'engine')
|
|
128
|
+
return false;
|
|
129
|
+
if (kind.value === 'seat') {
|
|
130
|
+
const capability = ownSlotOf(c, 'capability');
|
|
131
|
+
return capability.kind !== 'data' || !seatCarries(capability.value);
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
};
|
|
135
|
+
export function thinkingLatchView(reading, ctx) {
|
|
136
|
+
const r = normalizedReading(reading);
|
|
137
|
+
let carrier = { kind: 'absent' };
|
|
138
|
+
let modelSaysNoThinking = false;
|
|
139
|
+
if (ctx !== undefined && ctx !== null) {
|
|
140
|
+
if (typeof ctx !== 'object')
|
|
141
|
+
carrier = { kind: 'unreadable' };
|
|
142
|
+
else {
|
|
143
|
+
carrier = ownSlotOf(ctx, 'carrier');
|
|
144
|
+
const model = ownSlotOf(ctx, 'model');
|
|
145
|
+
if (model.kind === 'data' && typeof model.value === 'object' && model.value !== null) {
|
|
146
|
+
const mk = ownSlotOf(model.value, 'kind');
|
|
147
|
+
modelSaysNoThinking = mk.kind === 'data' && mk.value === 'not_applicable';
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const conflict = carrierBlocks(carrier) ? 'seat_cannot_carry' : r.state === 'on' && modelSaysNoThinking ? 'model_cannot_think' : undefined;
|
|
152
|
+
return Object.freeze({ state: r.state, ...(r.why !== undefined ? { why: r.why } : {}), ...(conflict !== undefined ? { conflict } : {}) });
|
|
153
|
+
}
|
|
154
|
+
const MODEL_NAME_MAX = 120;
|
|
155
|
+
const stateSentence = (state, lang) => state === 'on'
|
|
156
|
+
? renderMessage(msg('session.thinking.state.on'), lang)
|
|
157
|
+
: state === 'off'
|
|
158
|
+
? renderMessage(msg('session.thinking.state.off'), lang)
|
|
159
|
+
: state === 'unset'
|
|
160
|
+
? renderMessage(msg('session.thinking.state.unset'), lang)
|
|
161
|
+
: undefined;
|
|
162
|
+
export function thinkingLatchSentence(subject, lang) {
|
|
163
|
+
try {
|
|
164
|
+
if (typeof subject !== 'object' || subject === null)
|
|
165
|
+
return undefined;
|
|
166
|
+
const kind = readOwnDataValue(subject, 'kind');
|
|
167
|
+
if (kind === 'state')
|
|
168
|
+
return stateSentence(readOwnDataValue(subject, 'state'), lang);
|
|
169
|
+
if (kind === 'turn') {
|
|
170
|
+
const p = readOwnDataValue(subject, 'projection');
|
|
171
|
+
if (typeof p !== 'object' || p === null)
|
|
172
|
+
return undefined;
|
|
173
|
+
return readOwnDataValue(p, 'verdict') === 'off' && readOwnDataValue(p, 'ultracodeStamped') === true
|
|
174
|
+
? renderMessage(msg('session.thinking.offWithUltracodeOnBody'), lang)
|
|
175
|
+
: undefined;
|
|
176
|
+
}
|
|
177
|
+
if (kind === 'view') {
|
|
178
|
+
const view = readOwnDataValue(subject, 'view');
|
|
179
|
+
if (typeof view !== 'object' || view === null)
|
|
180
|
+
return undefined;
|
|
181
|
+
const conflict = readOwnDataValue(view, 'conflict');
|
|
182
|
+
if (conflict === 'seat_cannot_carry') {
|
|
183
|
+
const carrier = readOwnDataValue(subject, 'carrier');
|
|
184
|
+
const capability = typeof carrier === 'object' && carrier !== null && readOwnDataValue(carrier, 'kind') === 'seat'
|
|
185
|
+
? readOwnDataValue(carrier, 'capability')
|
|
186
|
+
: undefined;
|
|
187
|
+
return seatCapabilityUnavailableDetail('thinkingLatch', capabilityReadingOf(capability));
|
|
188
|
+
}
|
|
189
|
+
if (conflict === 'model_cannot_think') {
|
|
190
|
+
const model = readOwnDataValue(subject, 'model');
|
|
191
|
+
const shown = typeof model === 'string' && model.length > 0 ? quoteUntrustedForSentence(model, MODEL_NAME_MAX) : undefined;
|
|
192
|
+
return shown === undefined ? undefined : renderMessage(msg('session.thinking.modelCannotThink', { model: shown }), lang);
|
|
193
|
+
}
|
|
194
|
+
if (conflict !== undefined)
|
|
195
|
+
return undefined;
|
|
196
|
+
const r = normalizedReading(view);
|
|
197
|
+
if (r.why === 'unreadable' || r.why === 'malformed')
|
|
198
|
+
return renderMessage(msg('session.thinking.storeUnreadable'), lang);
|
|
199
|
+
return stateSentence(r.state, lang);
|
|
200
|
+
}
|
|
201
|
+
if (kind === 'write') {
|
|
202
|
+
const outcome = readOwnDataValue(subject, 'outcome');
|
|
203
|
+
if (typeof outcome !== 'object' || outcome === null)
|
|
204
|
+
return undefined;
|
|
205
|
+
return readOwnDataValue(outcome, 'kind') === 'not_saved' ? renderMessage(msg('session.thinking.notSaved'), lang) : undefined;
|
|
206
|
+
}
|
|
207
|
+
if (kind === 'seat_ack') {
|
|
208
|
+
const ack = readOwnDataValue(subject, 'ack');
|
|
209
|
+
if (typeof ack !== 'object' || ack === null)
|
|
210
|
+
return undefined;
|
|
211
|
+
return readOwnDataValue(ack, 'ok') === false ? renderMessage(msg('session.thinking.notSaved'), lang) : undefined;
|
|
212
|
+
}
|
|
213
|
+
return undefined;
|
|
214
|
+
}
|
|
215
|
+
catch {
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
export function thinkingLatchRowWordOf(reading) {
|
|
220
|
+
const r = normalizedReading(reading);
|
|
221
|
+
if (r.state === 'on' || r.state === 'off')
|
|
222
|
+
return r.state;
|
|
223
|
+
if (r.why === 'unreadable')
|
|
224
|
+
return 'unreadable';
|
|
225
|
+
if (r.why === 'malformed')
|
|
226
|
+
return 'malformed';
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
export function readSeatThinkingLatch(record, capability) {
|
|
230
|
+
if (!seatCarries(capability))
|
|
231
|
+
return unsetReading('no_port');
|
|
232
|
+
const row = record;
|
|
233
|
+
if (row === undefined || row === null)
|
|
234
|
+
return unsetReading('no_port');
|
|
235
|
+
try {
|
|
236
|
+
if (typeof row !== 'object')
|
|
237
|
+
return unsetReading('malformed');
|
|
238
|
+
const d = Object.getOwnPropertyDescriptor(row, 'thinkingLatch');
|
|
239
|
+
if (d === undefined)
|
|
240
|
+
return unsetReading('never_set');
|
|
241
|
+
if (!Object.hasOwn(d, 'value'))
|
|
242
|
+
return unsetReading('malformed');
|
|
243
|
+
const w = d.value;
|
|
244
|
+
if (w === undefined)
|
|
245
|
+
return unsetReading('never_set');
|
|
246
|
+
if (w === 'on' || w === 'off')
|
|
247
|
+
return setReading(w);
|
|
248
|
+
if (w === 'unreadable')
|
|
249
|
+
return unsetReading('unreadable');
|
|
250
|
+
return unsetReading('malformed');
|
|
251
|
+
}
|
|
252
|
+
catch {
|
|
253
|
+
return unsetReading('unreadable');
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const THINKING_LATCH_STATES: readonly ["on", "off", "unset"];
|
|
2
|
+
export type ThinkingLatchState = (typeof THINKING_LATCH_STATES)[number];
|
|
3
|
+
export declare const THINKING_LATCH_SET_STATES: readonly ["on", "off"];
|
|
4
|
+
export declare const THINKING_LATCH_EVENTS: readonly ["on", "off", "toggle", "clear"];
|
|
5
|
+
export type ThinkingLatchEvent = (typeof THINKING_LATCH_EVENTS)[number];
|
|
6
|
+
export declare const THINKING_LATCH_ROW_WORDS: readonly ["on", "off", "unreadable", "malformed"];
|
|
7
|
+
export type ThinkingLatchRowWord = (typeof THINKING_LATCH_ROW_WORDS)[number];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const THINKING_LATCH_STATES = Object.freeze(['on', 'off', 'unset']);
|
|
2
|
+
export const THINKING_LATCH_SET_STATES = Object.freeze(['on', 'off']);
|
|
3
|
+
export const THINKING_LATCH_EVENTS = Object.freeze(['on', 'off', 'toggle', 'clear']);
|
|
4
|
+
export const THINKING_LATCH_ROW_WORDS = Object.freeze(['on', 'off', 'unreadable', 'malformed']);
|
|
@@ -29,6 +29,8 @@ export interface ToolHistoryMismatchRowKey {
|
|
|
29
29
|
}
|
|
30
30
|
export declare function toolHistoryMismatchRowKey(m: ToolHistoryMismatch, consecutive: number | undefined, rewindOffered: boolean): ToolHistoryMismatchRowKey;
|
|
31
31
|
export declare function readToolHistoryMismatchKey(v: object | null | undefined): ToolHistoryMismatchRowKey | undefined;
|
|
32
|
+
export declare const SEMA_TOOL_HISTORY_ACCEPTED_KEY = "_sema_tool_history_accepted";
|
|
33
|
+
export declare function readToolHistoryAcceptedKey(frame: object | null | undefined): true | undefined;
|
|
32
34
|
export declare const TOOL_HISTORY_LEDGER_CAP = 64;
|
|
33
35
|
export declare function openToolHistoryGeneration(): number;
|
|
34
36
|
export interface ToolHistoryTerminalNote {
|
|
@@ -38,8 +40,14 @@ export interface ToolHistoryTerminalNote {
|
|
|
38
40
|
runId: string | undefined;
|
|
39
41
|
replay: boolean;
|
|
40
42
|
mismatch: ToolHistoryMismatch | null;
|
|
43
|
+
accepted?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ToolHistoryTerminalFacts {
|
|
46
|
+
readonly consecutive: number | undefined;
|
|
47
|
+
readonly acceptedSinceMismatch: true | undefined;
|
|
41
48
|
}
|
|
42
49
|
export declare function noteToolHistoryTerminal(note: ToolHistoryTerminalNote): number | undefined;
|
|
50
|
+
export declare function noteToolHistoryTerminalFacts(note: ToolHistoryTerminalNote): ToolHistoryTerminalFacts;
|
|
43
51
|
export declare function _resetToolHistoryLedgerForTest(): void;
|
|
44
52
|
export interface ToolHistoryRow {
|
|
45
53
|
readonly toolUseIds?: readonly string[];
|
|
@@ -286,6 +286,18 @@ function ownDataMember(o, k) {
|
|
|
286
286
|
return undefined;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
+
export const SEMA_TOOL_HISTORY_ACCEPTED_KEY = '_sema_tool_history_accepted';
|
|
290
|
+
export function readToolHistoryAcceptedKey(frame) {
|
|
291
|
+
try {
|
|
292
|
+
if (typeof frame !== 'object' || frame === null)
|
|
293
|
+
return undefined;
|
|
294
|
+
const d = Object.getOwnPropertyDescriptor(frame, SEMA_TOOL_HISTORY_ACCEPTED_KEY);
|
|
295
|
+
return d !== undefined && Object.hasOwn(d, 'value') && d.value === true ? true : undefined;
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
return undefined;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
289
301
|
export const TOOL_HISTORY_LEDGER_CAP = 64;
|
|
290
302
|
const PRIOR_RUN_IDS_CAP = 16;
|
|
291
303
|
const ECHOED_SESSION_IDS_CAP = TOOL_HISTORY_LEDGER_CAP * 4;
|
|
@@ -308,16 +320,30 @@ export function openToolHistoryGeneration() {
|
|
|
308
320
|
return toolHistoryGenerationSeq;
|
|
309
321
|
}
|
|
310
322
|
const fingerprintOf = (m) => `${m.kind}\u0000${m.toolUseId ?? ''}`;
|
|
323
|
+
function acceptanceStep(prev, note, attributed) {
|
|
324
|
+
if (note.replay)
|
|
325
|
+
return { awaiting: prev, accepted: undefined };
|
|
326
|
+
if (note.mismatch !== null)
|
|
327
|
+
return { awaiting: true, accepted: undefined };
|
|
328
|
+
if (note.accepted === true)
|
|
329
|
+
return attributed ? { awaiting: false, accepted: prev ? true : undefined } : { awaiting: prev, accepted: undefined };
|
|
330
|
+
return { awaiting: prev, accepted: undefined };
|
|
331
|
+
}
|
|
311
332
|
export function noteToolHistoryTerminal(note) {
|
|
333
|
+
return noteToolHistoryTerminalFacts(note).consecutive;
|
|
334
|
+
}
|
|
335
|
+
export function noteToolHistoryTerminalFacts(note) {
|
|
336
|
+
const none = { consecutive: undefined, acceptedSinceMismatch: undefined };
|
|
312
337
|
const { sessionId, generation, runId, replay, mismatch } = note;
|
|
313
338
|
if (typeof sessionId !== 'string' || sessionId.length === 0) {
|
|
314
339
|
unattributedTerminalSeq += 1;
|
|
315
|
-
return
|
|
340
|
+
return none;
|
|
316
341
|
}
|
|
317
342
|
if (note.sessionEchoed === true)
|
|
318
343
|
rememberEchoedSession(sessionId);
|
|
319
344
|
else if (!echoedSessionIds.has(sessionId))
|
|
320
345
|
unattributedTerminalSeq += 1;
|
|
346
|
+
const attributed = note.sessionEchoed === true || echoedSessionIds.has(sessionId);
|
|
321
347
|
const row = toolHistoryLedger.get(sessionId);
|
|
322
348
|
const fingerprint = mismatch === null ? null : fingerprintOf(mismatch);
|
|
323
349
|
const run = !replay && typeof runId === 'string' && runId.length > 0 ? runId : undefined;
|
|
@@ -330,25 +356,29 @@ export function noteToolHistoryTerminal(note) {
|
|
|
330
356
|
unattributedMark: unattributedTerminalSeq,
|
|
331
357
|
lastRunId: undefined,
|
|
332
358
|
recentRunIds: run !== undefined ? [...row.recentRunIds, run].slice(-PRIOR_RUN_IDS_CAP) : row.recentRunIds,
|
|
359
|
+
awaitingAcceptance: row.awaitingAcceptance,
|
|
333
360
|
});
|
|
334
361
|
}
|
|
335
|
-
return
|
|
362
|
+
return none;
|
|
336
363
|
}
|
|
337
364
|
if (row !== undefined)
|
|
338
365
|
row.writtenGeneration = generation;
|
|
339
366
|
const interrupted = row !== undefined && row.unattributedMark < unattributedTerminalSeq;
|
|
340
367
|
if (run !== undefined && row !== undefined && (row.segmentRunIds.has(run) || row.recentRunIds.includes(run))) {
|
|
341
|
-
|
|
368
|
+
const repeated = !interrupted && row.lastRunId === run && fingerprint !== null && row.fingerprint === fingerprint ? row.segmentRunIds.size : undefined;
|
|
369
|
+
return { consecutive: repeated, acceptedSinceMismatch: undefined };
|
|
342
370
|
}
|
|
371
|
+
const acceptance = acceptanceStep(row?.awaitingAcceptance ?? false, note, attributed);
|
|
343
372
|
if (row !== undefined && row.fingerprint === fingerprint && !(interrupted && fingerprint !== null && run !== undefined)) {
|
|
373
|
+
row.awaitingAcceptance = acceptance.awaiting;
|
|
344
374
|
if (run === undefined)
|
|
345
|
-
return undefined;
|
|
375
|
+
return { consecutive: undefined, acceptedSinceMismatch: acceptance.accepted };
|
|
346
376
|
if (fingerprint !== null)
|
|
347
377
|
row.segmentRunIds.add(run);
|
|
348
378
|
row.lastRunId = run;
|
|
349
379
|
row.recentRunIds = [...row.recentRunIds, run].slice(-PRIOR_RUN_IDS_CAP);
|
|
350
380
|
touchLedgerRow(sessionId, row);
|
|
351
|
-
return fingerprint === null ? undefined : row.segmentRunIds.size;
|
|
381
|
+
return { consecutive: fingerprint === null ? undefined : row.segmentRunIds.size, acceptedSinceMismatch: acceptance.accepted };
|
|
352
382
|
}
|
|
353
383
|
touchLedgerRow(sessionId, {
|
|
354
384
|
fingerprint,
|
|
@@ -357,8 +387,9 @@ export function noteToolHistoryTerminal(note) {
|
|
|
357
387
|
unattributedMark: unattributedTerminalSeq,
|
|
358
388
|
lastRunId: run,
|
|
359
389
|
recentRunIds: run !== undefined ? [...(row?.recentRunIds ?? []), run].slice(-PRIOR_RUN_IDS_CAP) : [...(row?.recentRunIds ?? [])],
|
|
390
|
+
awaitingAcceptance: acceptance.awaiting,
|
|
360
391
|
});
|
|
361
|
-
return fingerprint !== null && run !== undefined ? 1 : undefined;
|
|
392
|
+
return { consecutive: fingerprint !== null && run !== undefined ? 1 : undefined, acceptedSinceMismatch: acceptance.accepted };
|
|
362
393
|
}
|
|
363
394
|
function touchLedgerRow(sessionId, row) {
|
|
364
395
|
toolHistoryLedger.delete(sessionId);
|
package/dist/toolResult.d.ts
CHANGED
|
@@ -112,21 +112,31 @@ export interface ToolResultRowFlags {
|
|
|
112
112
|
}
|
|
113
113
|
export declare function toolResultRowFlagsOf(row: object | null | undefined): ToolResultRowFlags;
|
|
114
114
|
export type ToolKillCause = NonNullable<ReturnType<typeof toolKillCauseAcrossEngineIdentity>> | 'memory_pressure';
|
|
115
|
-
export declare function wireOutputToBody(toolName: string, output: unknown, isError: boolean, truncated: boolean, flatten: FlattenWireOutput,
|
|
115
|
+
export declare function wireOutputToBody(toolName: string, output: unknown, isError: boolean, truncated: boolean, flatten: FlattenWireOutput, structuredIn?: unknown, leaderLedger?: boolean, killCauseOf?: () => ToolKillCause | undefined): ToolResultBody;
|
|
116
116
|
export declare function structuredToToolUseResult(structured: unknown, modelText?: string, leaderLedger?: boolean): {
|
|
117
117
|
toolUseResult: unknown;
|
|
118
118
|
isError?: boolean;
|
|
119
119
|
} | null;
|
|
120
|
+
export interface WebSearchSource {
|
|
121
|
+
readonly title: string;
|
|
122
|
+
readonly url: string;
|
|
123
|
+
}
|
|
124
|
+
export type WebSearchSources = readonly WebSearchSource[] & {
|
|
125
|
+
readonly droppedCount: number;
|
|
126
|
+
};
|
|
127
|
+
export declare function webSearchSourcesOf(toolEnd: {} | null | undefined): WebSearchSources | undefined;
|
|
120
128
|
export interface EngineBgShellRegistration {
|
|
121
129
|
kind: 'register';
|
|
122
130
|
taskId: string;
|
|
131
|
+
toolUseId?: string;
|
|
123
132
|
command: string;
|
|
124
133
|
description?: string;
|
|
125
134
|
receipt: string;
|
|
135
|
+
outputFile?: string;
|
|
126
136
|
source: 'bash' | 'monitor';
|
|
127
137
|
}
|
|
128
|
-
export declare function detectEngineBgShellReceipt(toolName: string, rawInput: unknown, outputText: string | undefined, structured?: unknown): EngineBgShellRegistration | null;
|
|
129
|
-
export declare function detectEngineBgShellDetach(toolName: string, rawInput: unknown, structured: unknown, outputText: string | undefined): EngineBgShellRegistration | null;
|
|
138
|
+
export declare function detectEngineBgShellReceipt(toolName: string, rawInput: unknown, outputText: string | undefined, structured?: unknown, toolUseId?: string): EngineBgShellRegistration | null;
|
|
139
|
+
export declare function detectEngineBgShellDetach(toolName: string, rawInput: unknown, structured: unknown, outputText: string | undefined, toolUseId?: string): EngineBgShellRegistration | null;
|
|
130
140
|
export declare function todoWriteToolUseResult(rawInput: unknown, oldTodos: unknown[], isError: boolean): {
|
|
131
141
|
toolUseResult: unknown;
|
|
132
142
|
isError: boolean;
|