@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { engineCapsLandingOf } from './engineCapsCache.js';
|
|
2
|
-
import {
|
|
2
|
+
import { engineWireTargetBaseUrl } from './engineWireTarget.js';
|
|
3
3
|
import { msg, renderMessage } from './i18n/translate.js';
|
|
4
|
+
import { guardedRead, readOwnDataValue } from './ownKey.js';
|
|
4
5
|
function laneOrder() {
|
|
5
6
|
return ['processEnv', 'settingsEnv', 'modelCatalogFile', 'followedSettingsFile', 'followedProviderEnv'];
|
|
6
7
|
}
|
|
@@ -22,10 +23,10 @@ function laneState(lanes, lane) {
|
|
|
22
23
|
const v = hit.v;
|
|
23
24
|
return v === 'complete' || v === 'partial' || v === 'absent' || v === 'unreadable' ? v : 'unusable';
|
|
24
25
|
}
|
|
25
|
-
function catalogDefaultEvidence(catalog,
|
|
26
|
+
function catalogDefaultEvidence(catalog, adoption) {
|
|
26
27
|
const _evidencePin = true;
|
|
27
28
|
void _evidencePin;
|
|
28
|
-
return catalog === 'complete' &&
|
|
29
|
+
return catalog === 'complete' && adoption !== 'refused' ? { catalog, adoption: adoption ?? 'not_reported' } : undefined;
|
|
29
30
|
}
|
|
30
31
|
function routeGapOf(reading) {
|
|
31
32
|
const v = own(reading, 'routeGap')?.v;
|
|
@@ -35,6 +36,24 @@ function catalogAdoptionOf(reading) {
|
|
|
35
36
|
const v = own(reading, 'catalogAdoption')?.v;
|
|
36
37
|
return v === 'absent' || v === 'refused' || v === 'undetermined' ? v : undefined;
|
|
37
38
|
}
|
|
39
|
+
const ownDataValue = (o, key) => guardedRead(() => readOwnDataValue(o, key));
|
|
40
|
+
function isPlainObjectSafe(v) {
|
|
41
|
+
try {
|
|
42
|
+
return isPlainObject(v);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function catalogFactsDerivedOf(reading) {
|
|
49
|
+
const facts = ownDataValue(reading, 'catalogFacts');
|
|
50
|
+
if (!isPlainObjectSafe(facts) || ownDataValue(facts, 'shapeRefused') !== true)
|
|
51
|
+
return undefined;
|
|
52
|
+
if (catalogAdoptionOf(reading) !== 'refused')
|
|
53
|
+
return undefined;
|
|
54
|
+
const listed = ownDataValue(facts, 'listed');
|
|
55
|
+
return typeof listed === 'number' && Number.isSafeInteger(listed) && listed > 0 ? 'partial' : 'absent';
|
|
56
|
+
}
|
|
38
57
|
function analyse(reading) {
|
|
39
58
|
try {
|
|
40
59
|
if (!isPlainObject(reading))
|
|
@@ -51,34 +70,32 @@ function analyse(reading) {
|
|
|
51
70
|
const lanesHit = own(reading, 'lanes')?.v;
|
|
52
71
|
const order = laneOrder();
|
|
53
72
|
if (!isPlainObject(lanesHit)) {
|
|
54
|
-
return { verdict: 'unknown', why: 'lanes', unreadable: [], unreported: [...order], unusable: [],
|
|
73
|
+
return { verdict: 'unknown', why: 'lanes', unreadable: [], unreported: [...order], unusable: [], catalogRefused: false };
|
|
55
74
|
}
|
|
56
75
|
const partial = [];
|
|
57
76
|
const unreadable = [];
|
|
58
77
|
const unreported = [];
|
|
59
78
|
const unusable = [];
|
|
60
|
-
let catalogRefused =
|
|
61
|
-
let catalogUnconfirmed = null;
|
|
79
|
+
let catalogRefused = false;
|
|
62
80
|
for (const lane of order) {
|
|
63
|
-
const s = laneState(lanesHit, lane);
|
|
64
81
|
if (lane === 'modelCatalogFile') {
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
const factsDerived = catalogFactsDerivedOf(reading);
|
|
83
|
+
if (factsDerived !== undefined) {
|
|
84
|
+
if (factsDerived === 'partial') {
|
|
67
85
|
partial.push(lane);
|
|
68
|
-
catalogRefused =
|
|
69
|
-
continue;
|
|
86
|
+
catalogRefused = true;
|
|
70
87
|
}
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const s = laneState(lanesHit, lane);
|
|
92
|
+
if (lane === 'modelCatalogFile') {
|
|
93
|
+
if (s === 'complete') {
|
|
94
|
+
const evidence = catalogDefaultEvidence(s, catalogAdoptionOf(reading));
|
|
73
95
|
if (evidence !== undefined)
|
|
74
96
|
return { verdict: 'resolvable', why: 'catalog_default', evidence };
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
catalogRefused = 'engine';
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
catalogUnconfirmed = bit === undefined || bit.v === undefined ? 'not_reported' : 'unusable';
|
|
81
|
-
}
|
|
97
|
+
partial.push(lane);
|
|
98
|
+
catalogRefused = true;
|
|
82
99
|
continue;
|
|
83
100
|
}
|
|
84
101
|
}
|
|
@@ -97,8 +114,8 @@ function analyse(reading) {
|
|
|
97
114
|
else if (s === 'unusable')
|
|
98
115
|
unusable.push(lane);
|
|
99
116
|
}
|
|
100
|
-
if (unreadable.length > 0 || unreported.length > 0 || unusable.length > 0
|
|
101
|
-
return { verdict: 'unknown', why: 'lanes', unreadable, unreported, unusable,
|
|
117
|
+
if (unreadable.length > 0 || unreported.length > 0 || unusable.length > 0) {
|
|
118
|
+
return { verdict: 'unknown', why: 'lanes', unreadable, unreported, unusable, catalogRefused };
|
|
102
119
|
}
|
|
103
120
|
return { verdict: 'not_resolvable', why: 'lanes', partial, catalogRefused };
|
|
104
121
|
}
|
|
@@ -109,6 +126,26 @@ function analyse(reading) {
|
|
|
109
126
|
export function modelIdentityResolvability(reading) {
|
|
110
127
|
return analyse(reading).verdict;
|
|
111
128
|
}
|
|
129
|
+
export function modelIdentityCatalogDeviationOf(reading) {
|
|
130
|
+
try {
|
|
131
|
+
if (!isPlainObject(reading) || own(reading, 'engine')?.v !== 'local')
|
|
132
|
+
return undefined;
|
|
133
|
+
const lanesHit = own(reading, 'lanes')?.v;
|
|
134
|
+
if (!isPlainObject(lanesHit))
|
|
135
|
+
return undefined;
|
|
136
|
+
const derived = catalogFactsDerivedOf(reading);
|
|
137
|
+
if (derived === undefined)
|
|
138
|
+
return undefined;
|
|
139
|
+
const reported = laneState(lanesHit, 'modelCatalogFile');
|
|
140
|
+
if (reported === 'not_reported')
|
|
141
|
+
return undefined;
|
|
142
|
+
const withoutFacts = reported === 'complete' ? 'partial' : reported;
|
|
143
|
+
return withoutFacts === derived ? undefined : Object.freeze({ kind: 'catalog_lane_overridden_by_facts', reported, derived });
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
112
149
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
113
150
|
processEnv: 'model.identity.lane.processEnv',
|
|
114
151
|
settingsEnv: 'model.identity.lane.settingsEnv',
|
|
@@ -160,17 +197,12 @@ export function modelIdentityDetail(reading) {
|
|
|
160
197
|
const partialClause = others.length > 0
|
|
161
198
|
? `${joinPhrases(others.map(laneLabel))} ${others.length > 1 ? 'carry' : 'carries'} part of a model configuration (such as a gateway address or a credential) but no model name`
|
|
162
199
|
: '';
|
|
163
|
-
if (a.catalogRefused
|
|
200
|
+
if (a.catalogRefused) {
|
|
164
201
|
const clause = msg('model.identity.catalogAdoption.refused', { lane: msg(LANE_LABEL_KEYS.modelCatalogFile) });
|
|
165
202
|
return partialClause !== ''
|
|
166
203
|
? renderMessage(msg('model.identity.catalogAdoption.notResolvableWithPartial', { clause, partial: partialClause }))
|
|
167
204
|
: renderMessage(msg('model.identity.catalogAdoption.notResolvable', { clause }));
|
|
168
205
|
}
|
|
169
|
-
if (a.catalogRefused === 'engine') {
|
|
170
|
-
return (`no model name is configured for the local engine to start with — ${laneLabel('modelCatalogFile')} names a default model, but the local engine is reported not to accept a catalog default in place of a startup model name` +
|
|
171
|
-
(partialClause !== '' ? `, and ${partialClause}` : '') +
|
|
172
|
-
', and the engine does not start without one');
|
|
173
|
-
}
|
|
174
206
|
if (others.length > 0) {
|
|
175
207
|
return `no model name is configured for the local engine — ${partialClause}, and the engine does not start without one`;
|
|
176
208
|
}
|
|
@@ -188,18 +220,9 @@ export function modelIdentityDetail(reading) {
|
|
|
188
220
|
...a.unreported.map((l) => `${laneLabel(l)} was not reported`),
|
|
189
221
|
...a.unusable.map((l) => `${laneLabel(l)} gave no usable reading`),
|
|
190
222
|
];
|
|
191
|
-
if (a.
|
|
192
|
-
parts.push(`${laneLabel('modelCatalogFile')} names a default model, but whether the local engine accepts a catalog default in place of a startup model name was not reported`);
|
|
193
|
-
}
|
|
194
|
-
else if (a.catalogUnconfirmed === 'unusable') {
|
|
195
|
-
parts.push(`${laneLabel('modelCatalogFile')} names a default model, but the report of whether the local engine accepts a catalog default in place of a startup model name gave no usable reading`);
|
|
196
|
-
}
|
|
197
|
-
else if (a.catalogRefused === 'adoption') {
|
|
223
|
+
if (a.catalogRefused) {
|
|
198
224
|
parts.push(renderMessage(msg('model.identity.catalogAdoption.refused', { lane: msg(LANE_LABEL_KEYS.modelCatalogFile) })));
|
|
199
225
|
}
|
|
200
|
-
else if (a.catalogRefused === 'engine') {
|
|
201
|
-
parts.push(`${laneLabel('modelCatalogFile')} names a default model, but the local engine is reported not to accept a catalog default in place of a startup model name`);
|
|
202
|
-
}
|
|
203
226
|
return `whether the local engine has a model name is unknown — ${joinPhrases(parts)}, and no other place this client reads provides one`;
|
|
204
227
|
}
|
|
205
228
|
return "this reading of the engine's model configuration could not be interpreted, so whether the engine has a model name is unknown";
|
|
@@ -238,6 +261,6 @@ export function modelSetupNotice(decision) {
|
|
|
238
261
|
return null;
|
|
239
262
|
}
|
|
240
263
|
}
|
|
241
|
-
export function observedEngineAnswer(baseUrl =
|
|
264
|
+
export function observedEngineAnswer(baseUrl = engineWireTargetBaseUrl()) {
|
|
242
265
|
return engineCapsLandingOf(baseUrl).kind === 'not_landed' ? 'not_observed' : 'answered';
|
|
243
266
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModEventRow } from '@sema-agent/mods-kernel';
|
|
2
|
+
export interface ModsKernelSource {
|
|
3
|
+
readonly KERNEL_CONTRACT_VERSION: number;
|
|
4
|
+
readonly MOD_EVENT_TABLE: Readonly<Record<string, ModEventRow>>;
|
|
5
|
+
}
|
|
6
|
+
export interface ModsKernelIdentity {
|
|
7
|
+
readonly contractVersion: number;
|
|
8
|
+
readonly tableDigest: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function modsKernelIdentity(kernel?: ModsKernelSource): ModsKernelIdentity;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { KERNEL_CONTRACT_VERSION, MOD_EVENT_TABLE } from '@sema-agent/mods-kernel';
|
|
2
|
+
const MAX_DEPTH = 16;
|
|
3
|
+
const MAX_NODES = 100_000;
|
|
4
|
+
function canonical(v, depth, budget) {
|
|
5
|
+
budget.nodes += 1;
|
|
6
|
+
if (budget.nodes > MAX_NODES)
|
|
7
|
+
throw new TypeError('modsKernelIdentity: the event table is larger than a data table is');
|
|
8
|
+
if (depth > MAX_DEPTH)
|
|
9
|
+
throw new TypeError('modsKernelIdentity: the event table nests deeper than a data table does');
|
|
10
|
+
if (v === null || typeof v === 'string' || typeof v === 'boolean')
|
|
11
|
+
return JSON.stringify(v);
|
|
12
|
+
if (typeof v === 'number') {
|
|
13
|
+
if (!Number.isFinite(v))
|
|
14
|
+
throw new TypeError('modsKernelIdentity: the event table holds a number that is not finite');
|
|
15
|
+
return JSON.stringify(v);
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(v)) {
|
|
18
|
+
const parts = [];
|
|
19
|
+
for (let i = 0; i < v.length; i++) {
|
|
20
|
+
if (!(i in v))
|
|
21
|
+
throw new TypeError('modsKernelIdentity: the event table holds an array with a hole');
|
|
22
|
+
parts.push(canonical(v[i], depth + 1, budget));
|
|
23
|
+
}
|
|
24
|
+
return `[${parts.join(',')}]`;
|
|
25
|
+
}
|
|
26
|
+
if (typeof v === 'object') {
|
|
27
|
+
const proto = Object.getPrototypeOf(v);
|
|
28
|
+
if (proto !== Object.prototype && proto !== null)
|
|
29
|
+
throw new TypeError('modsKernelIdentity: the event table holds an object that is not a plain record');
|
|
30
|
+
const o = v;
|
|
31
|
+
return `{${Object.keys(o)
|
|
32
|
+
.sort()
|
|
33
|
+
.map((k) => `${JSON.stringify(k)}:${canonical(o[k], depth + 1, budget)}`)
|
|
34
|
+
.join(',')}}`;
|
|
35
|
+
}
|
|
36
|
+
throw new TypeError('modsKernelIdentity: the event table holds a value that is not plain data');
|
|
37
|
+
}
|
|
38
|
+
function sha256Hex(msg) {
|
|
39
|
+
const k = [
|
|
40
|
+
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
|
41
|
+
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
|
42
|
+
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
|
43
|
+
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
|
|
44
|
+
];
|
|
45
|
+
const h = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19];
|
|
46
|
+
const len = msg.length;
|
|
47
|
+
const padded = new Uint8Array(((len + 8) >>> 6) * 64 + 64);
|
|
48
|
+
padded.set(msg);
|
|
49
|
+
padded[len] = 0x80;
|
|
50
|
+
const view = new DataView(padded.buffer);
|
|
51
|
+
view.setUint32(padded.length - 8, Math.floor(len / 0x20000000));
|
|
52
|
+
view.setUint32(padded.length - 4, (len << 3) >>> 0);
|
|
53
|
+
const w = new Array(64).fill(0);
|
|
54
|
+
const rotr = (x, n) => (x >>> n) | (x << (32 - n));
|
|
55
|
+
for (let off = 0; off < padded.length; off += 64) {
|
|
56
|
+
for (let t = 0; t < 16; t++)
|
|
57
|
+
w[t] = view.getUint32(off + t * 4);
|
|
58
|
+
for (let t = 16; t < 64; t++) {
|
|
59
|
+
const x = w[t - 15] ?? 0;
|
|
60
|
+
const y = w[t - 2] ?? 0;
|
|
61
|
+
const s0 = rotr(x, 7) ^ rotr(x, 18) ^ (x >>> 3);
|
|
62
|
+
const s1 = rotr(y, 17) ^ rotr(y, 19) ^ (y >>> 10);
|
|
63
|
+
w[t] = ((w[t - 16] ?? 0) + s0 + (w[t - 7] ?? 0) + s1) | 0;
|
|
64
|
+
}
|
|
65
|
+
let [a, b, c, d, e, f, g, hh] = h;
|
|
66
|
+
for (let t = 0; t < 64; t++) {
|
|
67
|
+
const t1 = (hh + (rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) + ((e & f) ^ (~e & g)) + (k[t] ?? 0) + (w[t] ?? 0)) | 0;
|
|
68
|
+
const t2 = ((rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) + ((a & b) ^ (a & c) ^ (b & c))) | 0;
|
|
69
|
+
hh = g;
|
|
70
|
+
g = f;
|
|
71
|
+
f = e;
|
|
72
|
+
e = (d + t1) | 0;
|
|
73
|
+
d = c;
|
|
74
|
+
c = b;
|
|
75
|
+
b = a;
|
|
76
|
+
a = (t1 + t2) | 0;
|
|
77
|
+
}
|
|
78
|
+
const next = [a, b, c, d, e, f, g, hh];
|
|
79
|
+
for (let i = 0; i < 8; i++)
|
|
80
|
+
h[i] = ((h[i] ?? 0) + (next[i] ?? 0)) | 0;
|
|
81
|
+
}
|
|
82
|
+
return h.map((x) => (x >>> 0).toString(16).padStart(8, '0')).join('');
|
|
83
|
+
}
|
|
84
|
+
export function modsKernelIdentity(kernel = { KERNEL_CONTRACT_VERSION, MOD_EVENT_TABLE }) {
|
|
85
|
+
try {
|
|
86
|
+
if (typeof kernel !== 'object' || kernel === null)
|
|
87
|
+
throw new TypeError('modsKernelIdentity: the source is not a kernel module');
|
|
88
|
+
const contractVersion = kernel.KERNEL_CONTRACT_VERSION;
|
|
89
|
+
const table = kernel.MOD_EVENT_TABLE;
|
|
90
|
+
if (typeof contractVersion !== 'number' || !Number.isFinite(contractVersion)) {
|
|
91
|
+
throw new TypeError('modsKernelIdentity: the source carries no readable contract number');
|
|
92
|
+
}
|
|
93
|
+
if (typeof table !== 'object' || table === null || Array.isArray(table)) {
|
|
94
|
+
throw new TypeError('modsKernelIdentity: the source carries no readable event table');
|
|
95
|
+
}
|
|
96
|
+
return { contractVersion, tableDigest: sha256Hex(new TextEncoder().encode(canonical(table, 0, { nodes: 0 }))) };
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
if (e instanceof TypeError)
|
|
100
|
+
throw e;
|
|
101
|
+
throw new TypeError('modsKernelIdentity: the source could not be read', { cause: e });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { KERNEL_CONTRACT_VERSION, MOD_TIERS, MOD_SEATS, MOD_EVENT_SIDES, MOD_FAILURE_ANSWERS, MOD_ABORT_POSTURES, NEXT_TO_TABLE, SEAT_TIER_TABLE, MOD_EVENT_TABLE, nextToRefusal, expandModPattern, isModEventName, stationOn, readOnSide, } from '@sema-agent/mods-kernel';
|
|
2
|
+
export { DEFAULT_MOD_BUDGET_MS, CATCH_BUDGET_MS, RUNAWAY_AFTER_MS, POST_ABORT_GRACE_MS, MAX_TIMER_MS, resolveModBudgetMs, } from '@sema-agent/mods-kernel';
|
|
3
|
+
export { MOD_FAILURE_CAUSES } from '@sema-agent/mods-kernel';
|
|
4
|
+
export { ENGINE_ORIGIN, MODS_INVALID_CODE, MODS_REGISTRATION_REFUSED_CODE, MOD_TRACE_OUTCOMES } from '@sema-agent/mods-kernel';
|
|
5
|
+
export { admitMods } from '@sema-agent/mods-kernel';
|
|
6
|
+
export type { ModTier, ModRegistrationTier, ModSeat, ModEventSide, ModBusSide, ModFailureAnswer, ModAbortPosture, ModStation, ModEventRow, ModEventName, ModBudgetReading, ModFailureCause, ModEventPayload, ModAnswerCheck, ModAnswerer, ModMatcher, ModSkip, ModTraceOutcome, ModUses, ModOrigin, ModPluginFacts, ModDollarBase, ModTraceEntry, ModCaughtError, ModNext, ModHandler, ModHandlerOptions, On, ModRegistration, ModAdmissionRecord, ModSeats, ModFrame, ModBottomContext, ModMethodBottom, ModMethodSeat, ModMethodBottoms, ModDispatchOutcome, ModDispatchOptions, ModBus, ModMountedHandler, ModBusInput, } from '@sema-agent/mods-kernel';
|
|
7
|
+
export { modsKernelIdentity } from './modsKernelIdentity.js';
|
|
8
|
+
export type { ModsKernelIdentity, ModsKernelSource } from './modsKernelIdentity.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { KERNEL_CONTRACT_VERSION, MOD_TIERS, MOD_SEATS, MOD_EVENT_SIDES, MOD_FAILURE_ANSWERS, MOD_ABORT_POSTURES, NEXT_TO_TABLE, SEAT_TIER_TABLE, MOD_EVENT_TABLE, nextToRefusal, expandModPattern, isModEventName, stationOn, readOnSide, } from '@sema-agent/mods-kernel';
|
|
2
|
+
export { DEFAULT_MOD_BUDGET_MS, CATCH_BUDGET_MS, RUNAWAY_AFTER_MS, POST_ABORT_GRACE_MS, MAX_TIMER_MS, resolveModBudgetMs, } from '@sema-agent/mods-kernel';
|
|
3
|
+
export { MOD_FAILURE_CAUSES } from '@sema-agent/mods-kernel';
|
|
4
|
+
export { ENGINE_ORIGIN, MODS_INVALID_CODE, MODS_REGISTRATION_REFUSED_CODE, MOD_TRACE_OUTCOMES } from '@sema-agent/mods-kernel';
|
|
5
|
+
export { admitMods } from '@sema-agent/mods-kernel';
|
|
6
|
+
export { modsKernelIdentity } from './modsKernelIdentity.js';
|
package/dist/notifications.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PlanReviewOutcomeMeta } from './hitl/planReviewWire.js';
|
|
2
|
+
import type { SubmissionKind } from './request/submissionIdentity.js';
|
|
2
3
|
export interface TaskNotificationFields {
|
|
3
4
|
taskId: string;
|
|
4
5
|
status: string;
|
|
@@ -15,17 +16,33 @@ export interface TaskNotificationFields {
|
|
|
15
16
|
recentSteps?: string[];
|
|
16
17
|
resumable?: boolean;
|
|
17
18
|
externalSource?: string;
|
|
19
|
+
completionId?: string;
|
|
20
|
+
seq?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const CORE_TASK_NOTIFICATION_TAGS: readonly string[];
|
|
23
|
+
export declare function renderTaskNotificationXml(raw: TaskNotificationFields): string;
|
|
24
|
+
export declare function freezeTaskNotificationFields(n: TaskNotificationFields): Readonly<TaskNotificationFields>;
|
|
25
|
+
export interface PendingNotificationCommand {
|
|
26
|
+
readonly value: string;
|
|
27
|
+
readonly mode: 'task-notification';
|
|
28
|
+
readonly _sema_task_notification?: Readonly<TaskNotificationFields>;
|
|
29
|
+
}
|
|
30
|
+
export interface TaskNotificationQueueCommand {
|
|
31
|
+
readonly value: string;
|
|
32
|
+
readonly mode: 'task-notification';
|
|
33
|
+
readonly _sema_task_notification: Readonly<TaskNotificationFields>;
|
|
18
34
|
}
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
35
|
+
export declare function taskNotificationQueueCommand(n: TaskNotificationFields): TaskNotificationQueueCommand;
|
|
36
|
+
export declare function taskNotificationOf(carrier: object | null | undefined): Readonly<TaskNotificationFields> | undefined;
|
|
37
|
+
export declare function deriveNotificationResidualLines(raw: Record<string, unknown>): string[];
|
|
38
|
+
export declare function normalizeTaskNotification(raw: Record<string, unknown>): TaskNotificationFields | null;
|
|
22
39
|
export declare function taskNotificationDedupKey(n: {
|
|
23
40
|
taskId: string;
|
|
24
41
|
status: string;
|
|
25
42
|
seq?: number | string;
|
|
26
43
|
taskType?: string;
|
|
27
44
|
}): string;
|
|
28
|
-
export declare function taskNotificationDedupKeyFromWire(
|
|
45
|
+
export declare function taskNotificationDedupKeyFromWire(raw: Record<string, unknown>): string;
|
|
29
46
|
export interface TranscriptNotificationSeeds {
|
|
30
47
|
renderedKeys: string[];
|
|
31
48
|
notifiedKeys: string[];
|
|
@@ -38,16 +55,15 @@ export interface TaskNotificationXmlRead {
|
|
|
38
55
|
readonly external: boolean;
|
|
39
56
|
}
|
|
40
57
|
export declare function readTaskNotificationXml(xml: string): TaskNotificationXmlRead | undefined;
|
|
58
|
+
export declare const TASK_NOTIFICATION_TAG = "task-notification";
|
|
41
59
|
export interface QueuedCommandLike {
|
|
42
60
|
mode?: unknown;
|
|
43
61
|
agentId?: unknown;
|
|
44
62
|
value?: unknown;
|
|
63
|
+
_sema_task_notification?: {} | null;
|
|
45
64
|
}
|
|
46
65
|
export interface NotificationQueuePort {
|
|
47
|
-
enqueuePendingNotification(command:
|
|
48
|
-
value: string;
|
|
49
|
-
mode: 'task-notification';
|
|
50
|
-
}): void;
|
|
66
|
+
enqueuePendingNotification(command: PendingNotificationCommand): void;
|
|
51
67
|
removeByFilter(predicate: (cmd: QueuedCommandLike) => boolean): QueuedCommandLike[];
|
|
52
68
|
enqueueMetaPrompt?(command: {
|
|
53
69
|
value: string;
|
|
@@ -91,6 +107,7 @@ export declare function installWorkflowStatusProbe(probe: WorkflowStatusProbe):
|
|
|
91
107
|
type BgTaskStatusProbe = (taskId: string) => Promise<{
|
|
92
108
|
terminal: boolean;
|
|
93
109
|
status: string;
|
|
110
|
+
completionId?: string;
|
|
94
111
|
} | null>;
|
|
95
112
|
export declare function outstandingBgTaskPrompt(taskId: string): string | undefined;
|
|
96
113
|
export declare function installBgTaskStatusProbe(probe: BgTaskStatusProbe): void;
|
|
@@ -104,21 +121,22 @@ export interface EngineWorkflowCompletion {
|
|
|
104
121
|
status: 'completed' | 'failed';
|
|
105
122
|
summary: string;
|
|
106
123
|
}
|
|
107
|
-
export declare function enqueueBgChildNotification(
|
|
124
|
+
export declare function enqueueBgChildNotification(raw: {
|
|
108
125
|
taskId: string;
|
|
109
126
|
status: string;
|
|
110
127
|
seq?: number;
|
|
111
128
|
summary?: string;
|
|
129
|
+
completionId?: string;
|
|
112
130
|
}): void;
|
|
113
|
-
export declare function enqueueEngineWorkflowNotification(
|
|
131
|
+
export declare function enqueueEngineWorkflowNotification(raw: EngineWorkflowCompletion): void;
|
|
114
132
|
export declare function _resetEngineTaskNotificationForTest(): void;
|
|
115
133
|
export declare function _tickWatchOnceForTest(nowMs?: number): Promise<void>;
|
|
116
134
|
export declare function _setWatcherTimingForTest(o: {
|
|
117
135
|
probeTimeoutMs?: number;
|
|
118
136
|
stuckTickResetMs?: number;
|
|
119
137
|
} | null): void;
|
|
120
|
-
export declare function isTaskNotificationObjective(objective: unknown): boolean;
|
|
121
|
-
export declare function taskNotificationDeliverySupplement(objective: unknown): string | undefined;
|
|
138
|
+
export declare function isTaskNotificationObjective(objective: unknown, kind?: SubmissionKind): boolean;
|
|
139
|
+
export declare function taskNotificationDeliverySupplement(objective: unknown, kind?: SubmissionKind, notification?: Pick<TaskNotificationFields, 'status'>): string | undefined;
|
|
122
140
|
export declare function splitApiErrorSupplement(text: string): {
|
|
123
141
|
main: string;
|
|
124
142
|
supplement?: string;
|