@sema-agent/client-core 0.93.1 → 0.95.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 +554 -0
- package/README.md +89 -55
- package/dist/adapt/arms.js +13 -11
- package/dist/adapt/panelTasks.js +4 -10
- package/dist/adapt/toolCards.js +2 -2
- package/dist/adapt/wireShapes.js +3 -8
- package/dist/adapter/activeRunSelfHeal.d.ts +8 -3
- package/dist/adapter/activeRunSelfHeal.js +20 -12
- package/dist/adapter/downstream/eventToSdkMessage.js +24 -17
- package/dist/adapter/downstream/terminalToSdkResult.js +13 -6
- package/dist/adapter/runStream.js +2 -1
- package/dist/adapter/types.d.ts +7 -0
- package/dist/adapter/types.js +15 -0
- package/dist/agentSession/backgroundView.js +5 -1
- package/dist/agentSession/engineAgentRegistryRead.js +2 -1
- package/dist/agentSession/engineSessionBackgroundStop.js +5 -3
- package/dist/agentsWireCaps.d.ts +17 -0
- package/dist/agentsWireCaps.js +111 -1
- package/dist/approvalDecidedByCapability.d.ts +0 -1
- package/dist/approvalDecidedByCapability.js +2 -7
- package/dist/approvalReachWire.d.ts +18 -0
- package/dist/approvalReachWire.js +58 -0
- package/dist/approvalsStreamLiveCapability.d.ts +0 -1
- package/dist/approvalsStreamLiveCapability.js +15 -14
- package/dist/atMostOnce.d.ts +8 -0
- package/dist/atMostOnce.js +36 -0
- package/dist/attachmentSeatCapability.d.ts +0 -1
- package/dist/attachmentSeatCapability.js +0 -3
- package/dist/attachmentsWireCaps.js +11 -6
- package/dist/bashExitReading.d.ts +10 -0
- package/dist/bashExitReading.js +12 -0
- package/dist/callerCwdCapability.d.ts +15 -0
- package/dist/callerCwdCapability.js +42 -0
- package/dist/centerWiringCapability.d.ts +1 -3
- package/dist/centerWiringCapability.js +18 -21
- package/dist/classifierStatus.js +4 -4
- package/dist/cloudConfigWireCaps.js +43 -21
- package/dist/compensations.js +1 -1
- package/dist/controlRouter.js +3 -10
- package/dist/coreValuePorts.d.ts +64 -1
- package/dist/coreValuePorts.js +30 -0
- package/dist/cycleOrder.d.ts +15 -0
- package/dist/cycleOrder.js +45 -0
- package/dist/decideFailureNote.js +4 -1
- package/dist/decideReceipt.d.ts +2 -1
- package/dist/decideReceipt.js +41 -13
- package/dist/declared/supportFloorDeclared.d.ts +1 -0
- package/dist/declared/supportFloorDeclared.js +5 -0
- package/dist/detachWire.d.ts +1 -4
- package/dist/detachWire.js +1 -1
- package/dist/deviceExecutorManagementCapability.d.ts +0 -1
- package/dist/deviceExecutorManagementCapability.js +36 -40
- package/dist/deviceFlowPolling.d.ts +5 -0
- package/dist/deviceFlowPolling.js +28 -0
- package/dist/deviceRebind.d.ts +88 -0
- package/dist/deviceRebind.js +242 -0
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +963 -30
- package/dist/engineAgentAbsence.d.ts +2 -2
- package/dist/engineAgentPanelStore.d.ts +8 -18
- package/dist/engineAgentPanelStore.js +19 -537
- package/dist/engineCapReader.d.ts +6 -6
- package/dist/engineCapReader.js +30 -43
- package/dist/engineCapsCache.d.ts +7 -2
- package/dist/engineCapsCache.js +64 -26
- package/dist/engineCredentialRequirement.d.ts +9 -0
- package/dist/engineCredentialRequirement.js +23 -0
- package/dist/engineEnvSourcing.d.ts +53 -0
- package/dist/engineEnvSourcing.js +81 -0
- package/dist/engineErrorCodes.d.ts +19 -4
- package/dist/engineErrorCodes.js +39 -21
- package/dist/engineIdentity.js +2 -0
- package/dist/engineNoticeCodes.d.ts +22 -2
- package/dist/engineNoticeCodes.js +73 -6
- package/dist/engineRefusedToolName.d.ts +1 -0
- package/dist/engineRefusedToolName.js +8 -0
- package/dist/engineWireSdk.js +2 -2
- package/dist/executionLaneCapability.d.ts +2 -3
- package/dist/executionLaneCapability.js +28 -28
- package/dist/fileHistoryCaptureCapability.d.ts +0 -1
- package/dist/fileHistoryCaptureCapability.js +13 -12
- package/dist/fileHistoryLegNotice.d.ts +14 -2
- package/dist/fileHistoryLegNotice.js +101 -15
- package/dist/fleet/fleetLedger.d.ts +2 -0
- package/dist/fleet/fleetLedger.js +74 -52
- package/dist/fleet/fleetProjection.d.ts +0 -3
- package/dist/fleet/fleetProjection.js +9 -16
- package/dist/fleetAgentPanelProjection.d.ts +4 -17
- package/dist/fleetAgentPanelProjection.js +7 -197
- package/dist/fleetAgentRowLike.d.ts +16 -0
- package/dist/fleetAgentRowLike.js +1 -0
- package/dist/gateOutcome.d.ts +2 -1
- package/dist/gateOutcome.js +33 -18
- package/dist/gateVocabulary.js +1 -1
- package/dist/generated/engineAskFaceTables.d.ts +3 -0
- package/dist/generated/engineAskFaceTables.js +12 -0
- package/dist/generated/engineFactTables.d.ts +4 -2
- package/dist/generated/engineFactTables.js +13 -0
- package/dist/generated/engineNoticeTables.d.ts +5 -0
- package/dist/generated/engineNoticeTables.js +7 -0
- package/dist/generated/sdkFactTables.d.ts +5 -0
- package/dist/generated/sdkFactTables.js +34 -0
- package/dist/generated/settingsSchemaFns.d.ts +10 -0
- package/dist/generated/settingsSchemaFns.js +22 -0
- package/dist/generated/settingsSchemaTables.d.ts +3 -0
- package/dist/generated/settingsSchemaTables.js +3 -0
- package/dist/headlessPermissionModeWire.d.ts +2 -2
- package/dist/headlessPermissionModeWire.js +11 -21
- package/dist/headlessReconnectWire.js +49 -20
- package/dist/hitl/allowRuleShadow.d.ts +1 -1
- package/dist/hitl/allowRuleShadow.js +49 -8
- package/dist/hitl/approvalCompleteParked.d.ts +1 -0
- package/dist/hitl/approvalCompleteParked.js +14 -0
- package/dist/hitl/approvalEndingCause.d.ts +5 -0
- package/dist/hitl/approvalEndingCause.js +61 -0
- package/dist/hitl/approvalHolds.d.ts +46 -0
- package/dist/hitl/approvalHolds.js +140 -0
- package/dist/hitl/approvalOutcomeNote.js +2 -1
- package/dist/hitl/approvalResolution.js +9 -1
- package/dist/hitl/approvalsFeed.js +23 -6
- package/dist/hitl/askGateWire.d.ts +2 -1
- package/dist/hitl/askGateWire.js +29 -1
- package/dist/hitl/automaticAnswerVerdict.d.ts +8 -2
- package/dist/hitl/automaticAnswerVerdict.js +71 -23
- package/dist/hitl/crashConverged.js +2 -0
- package/dist/hitl/decisionConflict.d.ts +3 -0
- package/dist/hitl/decisionConflict.js +43 -0
- package/dist/hitl/decisionRefusal.d.ts +23 -0
- package/dist/hitl/decisionRefusal.js +88 -0
- package/dist/hitl/frameRouter.d.ts +10 -0
- package/dist/hitl/frameRouter.js +71 -32
- package/dist/hitl/gateLedger.d.ts +8 -0
- package/dist/hitl/gateLedger.js +38 -0
- package/dist/hitl/hitlBridge.d.ts +14 -3
- package/dist/hitl/hitlBridge.js +75 -62
- package/dist/hitl/hitlHostSurface.d.ts +3 -0
- package/dist/hitl/hitlHostSurface.js +17 -15
- package/dist/hitl/livePendingAsk.d.ts +16 -6
- package/dist/hitl/livePendingAsk.js +36 -4
- package/dist/hitl/localAllowRule.js +2 -1
- package/dist/hitl/noAllowCause.d.ts +9 -0
- package/dist/hitl/noAllowCause.js +26 -0
- package/dist/hitl/parkExpiryJudgements.d.ts +19 -0
- package/dist/hitl/parkExpiryJudgements.js +46 -0
- package/dist/hitl/parkResolver.d.ts +3 -7
- package/dist/hitl/parkResolver.js +55 -28
- package/dist/hitl/parkRowBirthWait.js +2 -1
- package/dist/hitl/persistedRulesWire.d.ts +6 -1
- package/dist/hitl/persistedRulesWire.js +16 -4
- package/dist/hitl/planReviewWire.d.ts +2 -3
- package/dist/hitl/planReviewWire.js +86 -39
- package/dist/hitl/replayedApproval.d.ts +8 -0
- package/dist/hitl/replayedApproval.js +125 -10
- package/dist/hitl/resumeRunningCard.d.ts +2 -0
- package/dist/hitl/resumeRunningCard.js +15 -4
- package/dist/hitl/sessionPolicyDeliverable.d.ts +1 -1
- package/dist/hitl/sessionPolicyDeliverable.js +3 -8
- package/dist/hitl/sessionPolicyWire.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +50 -5
- package/dist/hitl/toolApprovalWire.js +368 -56
- package/dist/hooksWireCaps.js +38 -6
- package/dist/host.d.ts +5 -0
- package/dist/host.js +3 -1
- package/dist/hostCallbackGuard.d.ts +1 -0
- package/dist/hostCallbackGuard.js +25 -0
- package/dist/humanTurnRead.d.ts +15 -1
- package/dist/humanTurnRead.js +28 -2
- package/dist/index.d.ts +45 -14
- package/dist/index.js +33 -12
- package/dist/interactiveInterrupt.d.ts +8 -0
- package/dist/interactiveInterrupt.js +54 -0
- package/dist/limitsWire.d.ts +5 -1
- package/dist/limitsWire.js +51 -13
- package/dist/liveModelCatalog.d.ts +109 -0
- package/dist/liveModelCatalog.js +344 -18
- package/dist/mcpEngineLeg.d.ts +25 -0
- package/dist/mcpEngineLeg.js +71 -15
- package/dist/mcpPanel.js +2 -1
- package/dist/mcpProbeCapability.d.ts +0 -1
- package/dist/mcpProbeCapability.js +13 -12
- package/dist/mcpReconnect.d.ts +1 -3
- package/dist/mcpReconnect.js +20 -10
- package/dist/memoryComplianceCapability.d.ts +0 -1
- package/dist/memoryComplianceCapability.js +14 -13
- package/dist/memoryOriginCapability.d.ts +0 -1
- package/dist/memoryOriginCapability.js +14 -13
- package/dist/memoryVerbsWire.d.ts +1 -1
- package/dist/memoryVerbsWire.js +4 -0
- package/dist/model/liveCatalogShape.d.ts +14 -0
- package/dist/model/liveCatalogShape.js +71 -0
- package/dist/model/modelSupplyRules.d.ts +1 -0
- package/dist/model/modelSupplyRules.js +30 -9
- package/dist/model/modelsPolicy.d.ts +21 -0
- package/dist/model/modelsPolicy.js +90 -0
- package/dist/modelIdentityResolvability.d.ts +4 -2
- package/dist/modelIdentityResolvability.js +25 -5
- package/dist/modelSwitchFallback.d.ts +69 -0
- package/dist/modelSwitchFallback.js +206 -0
- package/dist/notifications.js +12 -11
- package/dist/outputStyleSeatCapability.d.ts +15 -0
- package/dist/outputStyleSeatCapability.js +42 -0
- package/dist/ownKey.d.ts +7 -0
- package/dist/ownKey.js +58 -0
- package/dist/panelReduce.d.ts +114 -0
- package/dist/panelReduce.js +1135 -0
- package/dist/panelStateHolder.d.ts +17 -0
- package/dist/panelStateHolder.js +201 -0
- package/dist/peerLaneCapability.d.ts +0 -1
- package/dist/peerLaneCapability.js +15 -14
- package/dist/permissionModesCapability.d.ts +0 -1
- package/dist/permissionModesCapability.js +5 -10
- package/dist/permissionRuleIssue.js +1 -1
- package/dist/permissionRulesWriteCapability.d.ts +0 -1
- package/dist/permissionRulesWriteCapability.js +15 -14
- package/dist/permissionsAllowGrantCapability.d.ts +2 -1
- package/dist/permissionsAllowGrantCapability.js +35 -19
- package/dist/permissionsDeclaration.d.ts +16 -1
- package/dist/permissionsDeclaration.js +142 -15
- package/dist/printToolResultFrame.js +2 -10
- package/dist/promptDelivery.js +0 -8
- package/dist/protocolSegment.d.ts +1 -0
- package/dist/protocolSegment.js +13 -1
- package/dist/request/taskRequest.d.ts +11 -3
- package/dist/request/taskRequest.js +13 -1
- package/dist/resultFrameKeys.d.ts +4 -0
- package/dist/resultFrameKeys.js +13 -0
- package/dist/resumeRefusalCopy.d.ts +18 -1
- package/dist/resumeRefusalCopy.js +132 -31
- package/dist/retryStatus.js +6 -4
- package/dist/rewindArchiveCapability.d.ts +2 -1
- package/dist/rewindArchiveCapability.js +28 -15
- package/dist/rewindEngineAction.d.ts +21 -0
- package/dist/rewindEngineAction.js +36 -0
- package/dist/rewindWireCaps.d.ts +2 -1
- package/dist/rewindWireCaps.js +1 -0
- package/dist/{hitl/rosterMountedNames.d.ts → rosterMountedNames.d.ts} +1 -1
- package/dist/runCancelContext.js +2 -1
- package/dist/runTerminal.d.ts +0 -11
- package/dist/runTerminal.js +4 -27
- package/dist/sdkRegistryTransit.d.ts +2 -1
- package/dist/sdkRegistryTransit.js +1 -0
- package/dist/sealedKeyCapability.d.ts +0 -1
- package/dist/sealedKeyCapability.js +19 -20
- package/dist/seatContract.d.ts +85 -28
- package/dist/seatContract.js +512 -148
- package/dist/sessionIdSegment.d.ts +1 -0
- package/dist/sessionIdSegment.js +11 -0
- package/dist/sessionMemoryErase.d.ts +1 -1
- package/dist/sessionMemoryErase.js +6 -1
- package/dist/sessionMemoryStatus.js +3 -2
- package/dist/sessionPolicyCapability.d.ts +0 -1
- package/dist/sessionPolicyCapability.js +14 -13
- package/dist/sessionReadRedactionCapability.d.ts +15 -0
- package/dist/sessionReadRedactionCapability.js +42 -0
- package/dist/sessionSyncFileHistoryCapability.d.ts +0 -1
- package/dist/sessionSyncFileHistoryCapability.js +13 -12
- package/dist/skillToolListsCapability.d.ts +0 -1
- package/dist/skillToolListsCapability.js +13 -12
- package/dist/skillsWireCaps.d.ts +4 -0
- package/dist/skillsWireCaps.js +66 -1
- package/dist/sqlEngineCapability.d.ts +0 -1
- package/dist/sqlEngineCapability.js +21 -21
- package/dist/steerPriorityCapability.d.ts +0 -1
- package/dist/steerPriorityCapability.js +18 -19
- package/dist/storePostureCapability.d.ts +1 -1
- package/dist/storePostureCapability.js +16 -16
- package/dist/streamDrainingLegs.d.ts +6 -0
- package/dist/streamDrainingLegs.js +23 -0
- package/dist/subagent/agentStateDetail.d.ts +1 -0
- package/dist/subagent/agentStateDetail.js +41 -0
- package/dist/subagent/engineCompactWire.d.ts +15 -0
- package/dist/subagent/engineCompactWire.js +82 -45
- package/dist/subagent/engineDelegatedPrompt.js +10 -6
- package/dist/subagent/engineSubagentOutput.d.ts +0 -1
- package/dist/subagent/engineSubagentOutput.js +5 -20
- package/dist/subagent/engineSubagentTail.d.ts +0 -1
- package/dist/subagent/engineSubagentTail.js +7 -32
- package/dist/subagentContentStore.js +3 -3
- package/dist/supportFloor.js +2 -5
- package/dist/taskRequestWords.d.ts +2 -4
- package/dist/taskRequestWords.js +3 -2
- package/dist/terminalStatuses.d.ts +30 -0
- package/dist/terminalStatuses.js +67 -0
- package/dist/toolResult.d.ts +5 -0
- package/dist/toolResult.js +88 -36
- package/dist/types/engineState.d.ts +2 -1
- package/dist/usageAnalytics.d.ts +146 -0
- package/dist/usageAnalytics.js +311 -0
- package/dist/userAttachmentEnvelope.d.ts +22 -1
- package/dist/userAttachmentEnvelope.js +90 -2
- package/dist/userInvokedSkillsCapability.d.ts +0 -1
- package/dist/userInvokedSkillsCapability.js +13 -12
- package/dist/webSearchBackendCapability.d.ts +0 -1
- package/dist/webSearchBackendCapability.js +20 -19
- package/dist/webSearchWireCaps.js +3 -11
- package/dist/wireErrorTriage.d.ts +11 -0
- package/dist/wireErrorTriage.js +35 -0
- package/dist/wireFailureShape.d.ts +10 -0
- package/dist/wireFailureShape.js +72 -5
- package/dist/wireRefusalCopy.d.ts +6 -1
- package/dist/wireRefusalCopy.js +23 -25
- package/dist/wiringInstructionsAttribution.d.ts +10 -0
- package/dist/wiringInstructionsAttribution.js +67 -0
- package/dist/workflowClient.js +19 -2
- package/dist/workflowsJournalCapability.d.ts +0 -1
- package/dist/workflowsJournalCapability.js +13 -12
- package/dist/writeProtectionCapability.d.ts +0 -1
- package/dist/writeProtectionCapability.js +26 -26
- package/docs/INTEGRATION-CLIENTS.md +1733 -52
- package/package.json +5 -5
- package/dist/askSurvivesStandingAnswer.d.ts +0 -13
- package/dist/askSurvivesStandingAnswer.js +0 -53
- package/dist/engineCapsGenerationGuard.d.ts +0 -4
- package/dist/engineCapsGenerationGuard.js +0 -19
- package/dist/hitl/askSurvivesPosture.d.ts +0 -20
- package/dist/hitl/askSurvivesPosture.js +0 -48
- package/dist/panelRunningHistory.d.ts +0 -22
- package/dist/panelRunningHistory.js +0 -82
- package/dist/registryConflict.d.ts +0 -3
- package/dist/registryConflict.js +0 -44
- /package/dist/{hitl/rosterMountedNames.js → rosterMountedNames.js} +0 -0
package/dist/hooksWireCaps.js
CHANGED
|
@@ -71,6 +71,35 @@ function startupModeWord(settings) {
|
|
|
71
71
|
hostLog('debug', `hooksWireCaps: hooksStartupMode() returned ${describeStartupModeValue(v)}, which is neither 'safe' nor 'bare' — treated as neither mode (settings hooks not narrowed)`);
|
|
72
72
|
return undefined;
|
|
73
73
|
}
|
|
74
|
+
const MANAGED_POLICY_STATES = ['absent', 'in-effect', 'unreadable'];
|
|
75
|
+
const _managedPolicyStatesPin = [true, true];
|
|
76
|
+
void _managedPolicyStatesPin;
|
|
77
|
+
function managedPolicyUnreadable(settings) {
|
|
78
|
+
try {
|
|
79
|
+
const member = settings.managedPolicyReading;
|
|
80
|
+
if (member === undefined)
|
|
81
|
+
return false;
|
|
82
|
+
if (typeof member !== 'function') {
|
|
83
|
+
hostLog('debug', `hooksWireCaps: managedPolicyReading is ${describeStartupModeValue(member)}, not a method — fail-closed (no hooks projected to the engine)`);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
const r = member.call(settings);
|
|
87
|
+
const state = typeof r === 'object' && r !== null && !Array.isArray(r) ? r.state : undefined;
|
|
88
|
+
const word = MANAGED_POLICY_STATES.find((w) => w === state);
|
|
89
|
+
if (word === 'absent' || word === 'in-effect')
|
|
90
|
+
return false;
|
|
91
|
+
if (word === 'unreadable') {
|
|
92
|
+
hostLog('debug', 'hooksWireCaps: managed policy layer reported unreadable — fail-closed (no hooks projected to the engine)');
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
hostLog('debug', `hooksWireCaps: managedPolicyReading() returned ${describeStartupModeValue(state)} as its state, which is none of 'absent' / 'in-effect' / 'unreadable' — fail-closed (no hooks projected to the engine)`);
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
hostLog('debug', `hooksWireCaps: managedPolicyReading() threw — fail-closed (no hooks projected to the engine): ${String(err)}`);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
74
103
|
function hooksOfSource(source) {
|
|
75
104
|
try {
|
|
76
105
|
const s = hostSettings()?.getSettingsForSource(source);
|
|
@@ -183,11 +212,12 @@ export function hooksWirePlan(opts = {}) {
|
|
|
183
212
|
const shellRuns = (event, type) => {
|
|
184
213
|
if (!shellEvents.has(event))
|
|
185
214
|
return false;
|
|
186
|
-
|
|
215
|
+
if (typesByEvent === undefined)
|
|
216
|
+
return type !== 'prompt' && type !== 'agent';
|
|
217
|
+
const types = typesByEvent.get(event);
|
|
187
218
|
return types === undefined || (typeof type === 'string' && types.has(type));
|
|
188
219
|
};
|
|
189
|
-
|
|
190
|
-
return buildHooksWirePlan(engine, shellRuns, true, promptAuthoredByUserOf(o), settingsShellRuns);
|
|
220
|
+
return buildHooksWirePlan(engine, shellRuns, true, promptAuthoredByUserOf(o));
|
|
191
221
|
}
|
|
192
222
|
function taskHooksCapability(baseUrl) {
|
|
193
223
|
const v = engineCapValue(baseUrl, 'taskSettings');
|
|
@@ -218,7 +248,7 @@ function shellHookTypesOf(o) {
|
|
|
218
248
|
return out;
|
|
219
249
|
}
|
|
220
250
|
catch (err) {
|
|
221
|
-
hostLog('debug', `hooksWirePlan: shellHookTypesByEvent is malformed — treated as absent (command and http hooks count as running on every reported event; prompt and agent hooks
|
|
251
|
+
hostLog('debug', `hooksWirePlan: shellHookTypesByEvent is malformed — treated as absent (command and http hooks count as running on every reported event; prompt and agent hooks are not counted as running locally): ${String(err)}`);
|
|
222
252
|
return undefined;
|
|
223
253
|
}
|
|
224
254
|
}
|
|
@@ -238,11 +268,11 @@ function promptAuthoredByUserOf(o) {
|
|
|
238
268
|
}
|
|
239
269
|
return true;
|
|
240
270
|
}
|
|
241
|
-
function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
|
|
271
|
+
function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser) {
|
|
242
272
|
const settingsDropped = [];
|
|
243
273
|
const settingsVerdicts = [];
|
|
244
274
|
const settingsExcluded = [];
|
|
245
|
-
const judge = withPlugins ? createSettingsHookJudge(engine,
|
|
275
|
+
const judge = withPlugins ? createSettingsHookJudge(engine, shellRuns, promptAuthoredByUser) : undefined;
|
|
246
276
|
let settingsStripped = 0;
|
|
247
277
|
const planOf = (pluginReader, wire, verdicts = [], excluded = []) => ({ engine, pluginReader, verdicts, excluded, settingsDropped, settingsVerdicts, settingsExcluded, wire });
|
|
248
278
|
const closedPlan = (settings, reason) => {
|
|
@@ -278,6 +308,8 @@ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
|
|
|
278
308
|
hostLog('debug', `hooksWireCaps: workspace trust check threw — fail-closed (no hooks projected to the engine): ${String(err)}`);
|
|
279
309
|
return closedPlan(settings, 'governance_unreadable');
|
|
280
310
|
}
|
|
311
|
+
if (managedPolicyUnreadable(settings))
|
|
312
|
+
return closedPlan(settings, 'governance_unreadable');
|
|
281
313
|
let policy = null;
|
|
282
314
|
try {
|
|
283
315
|
policy = settings.getSettingsForSource('policySettings');
|
package/dist/host.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export interface SettingsPort {
|
|
|
8
8
|
mergedDisableAllHooks?(): boolean | undefined;
|
|
9
9
|
enabledPluginHooks?(): PluginHooksReading;
|
|
10
10
|
hooksStartupMode?(): HooksStartupMode | undefined;
|
|
11
|
+
managedPolicyReading?(): ManagedPolicyReading;
|
|
12
|
+
}
|
|
13
|
+
export type ManagedPolicyState = 'absent' | 'in-effect' | 'unreadable';
|
|
14
|
+
export interface ManagedPolicyReading {
|
|
15
|
+
readonly state: ManagedPolicyState;
|
|
11
16
|
}
|
|
12
17
|
export type HooksStartupMode = 'safe' | 'bare';
|
|
13
18
|
export type PluginHookOptionValue = string | number | boolean;
|
package/dist/host.js
CHANGED
|
@@ -48,7 +48,9 @@ export function installHostFor(sessionKey, ports) {
|
|
|
48
48
|
}
|
|
49
49
|
function callDiagnosticPort(call) {
|
|
50
50
|
try {
|
|
51
|
-
call();
|
|
51
|
+
const out = call();
|
|
52
|
+
if (out !== undefined && out !== null)
|
|
53
|
+
void Promise.resolve(out).then(undefined, () => undefined);
|
|
52
54
|
return true;
|
|
53
55
|
}
|
|
54
56
|
catch {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function invokeHostCallbackIsolated(label: string, call: () => void): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { hostLog } from './host.js';
|
|
2
|
+
function faultText(e) {
|
|
3
|
+
try {
|
|
4
|
+
return String(e).slice(0, 160);
|
|
5
|
+
}
|
|
6
|
+
catch {
|
|
7
|
+
return '(unprintable)';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function reportHostCallbackFault(label, what, e) {
|
|
11
|
+
hostLog('debug', `${label} ${what}: ${faultText(e)}`);
|
|
12
|
+
}
|
|
13
|
+
export function invokeHostCallbackIsolated(label, call) {
|
|
14
|
+
try {
|
|
15
|
+
const out = call();
|
|
16
|
+
if (out && typeof out.then === 'function') {
|
|
17
|
+
void Promise.resolve(out).then(undefined, (e) => {
|
|
18
|
+
reportHostCallbackFault(label, 'rejected', e);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
reportHostCallbackFault(label, 'threw', e);
|
|
24
|
+
}
|
|
25
|
+
}
|
package/dist/humanTurnRead.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ImageInput } from './imagesWireCaps.js';
|
|
2
|
-
import type { UserAttachmentDescriptor, UserAttachmentNotIncludedReason, UserAttachmentSource } from './userAttachmentEnvelope.js';
|
|
2
|
+
import type { UserAttachmentDescriptor, UserAttachmentMcpResourcePart, UserAttachmentNotIncludedReason, UserAttachmentSource } from './userAttachmentEnvelope.js';
|
|
3
3
|
import type { HumanTurnAttachment, HumanTurnEncoding, HumanTurnInput, HumanTurnMissing } from './humanTurn.js';
|
|
4
4
|
import type { ImageVision } from './liveModelCatalog.js';
|
|
5
5
|
export interface CellView {
|
|
@@ -55,6 +55,20 @@ export type DescriptorView = {
|
|
|
55
55
|
path: string;
|
|
56
56
|
sizeBytes: number | null;
|
|
57
57
|
reason: UserAttachmentNotIncludedReason;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'not-included';
|
|
60
|
+
target: 'mcp-resource';
|
|
61
|
+
server: string;
|
|
62
|
+
uri: string;
|
|
63
|
+
name: string;
|
|
64
|
+
reason: UserAttachmentNotIncludedReason;
|
|
65
|
+
} | {
|
|
66
|
+
kind: 'mcp-resource';
|
|
67
|
+
server: string;
|
|
68
|
+
uri: string;
|
|
69
|
+
name: string;
|
|
70
|
+
parts: UserAttachmentMcpResourcePart[];
|
|
71
|
+
truncated: boolean;
|
|
58
72
|
};
|
|
59
73
|
export declare function readDescriptor(x: UserAttachmentDescriptor | HumanTurnAttachment['descriptor'], imageDelivery: 'required' | 'ignored'): DescriptorView | undefined;
|
|
60
74
|
type Reason = Exclude<Extract<HumanTurnEncoding, {
|
package/dist/humanTurnRead.js
CHANGED
|
@@ -40,6 +40,23 @@ const strArray = (v) => ownArray(v).map(str);
|
|
|
40
40
|
const sizeOf = (v) => (v === null ? null : typeof v === 'number' ? v : bad());
|
|
41
41
|
const posInt = (v) => (typeof v === 'number' && Number.isSafeInteger(v) && v >= 1 ? v : bad());
|
|
42
42
|
const natInt = (v) => (typeof v === 'number' && Number.isSafeInteger(v) && v >= 0 ? v : bad());
|
|
43
|
+
const NOT_INCLUDED_REASON_LIST = ['too-large', 'unreadable', 'read-denied', 'approval-required', 'server-not-connected', 'resource-not-listed', 'read-failed'];
|
|
44
|
+
const notIncludedReasonsExhaustive = true;
|
|
45
|
+
void notIncludedReasonsExhaustive;
|
|
46
|
+
const NOT_INCLUDED_REASONS = new Set(NOT_INCLUDED_REASON_LIST);
|
|
47
|
+
function readMcpPart(x) {
|
|
48
|
+
if (!isPlainObject(x))
|
|
49
|
+
bad();
|
|
50
|
+
const o = x;
|
|
51
|
+
const kind = ownData(o, 'kind');
|
|
52
|
+
if (kind === 'text')
|
|
53
|
+
return { kind, text: str(ownData(o, 'text')) };
|
|
54
|
+
if (kind === 'binary') {
|
|
55
|
+
const mt = ownData(o, 'mimeType');
|
|
56
|
+
return { kind, mimeType: mt === null ? null : str(mt) };
|
|
57
|
+
}
|
|
58
|
+
return bad();
|
|
59
|
+
}
|
|
43
60
|
function sourceOf(v) {
|
|
44
61
|
return v === 'at-mention' || v === 'compact-restore' ? v : bad();
|
|
45
62
|
}
|
|
@@ -120,9 +137,12 @@ function readDescriptorAny(x, imageDelivery) {
|
|
|
120
137
|
case 'not-included': {
|
|
121
138
|
const target = ownData(o, 'target');
|
|
122
139
|
const reason = ownData(o, 'reason');
|
|
123
|
-
if (
|
|
140
|
+
if (!NOT_INCLUDED_REASONS.has(reason))
|
|
124
141
|
bad();
|
|
125
|
-
if (
|
|
142
|
+
if (target === 'mcp-resource') {
|
|
143
|
+
return { kind, target, server: str(ownData(o, 'server')), uri: str(ownData(o, 'uri')), name: name(), reason: reason };
|
|
144
|
+
}
|
|
145
|
+
if (target !== 'file' && target !== 'directory' && target !== 'path')
|
|
126
146
|
bad();
|
|
127
147
|
return {
|
|
128
148
|
kind,
|
|
@@ -133,6 +153,12 @@ function readDescriptorAny(x, imageDelivery) {
|
|
|
133
153
|
reason: reason,
|
|
134
154
|
};
|
|
135
155
|
}
|
|
156
|
+
case 'mcp-resource': {
|
|
157
|
+
const truncated = ownData(o, 'truncated');
|
|
158
|
+
if (typeof truncated !== 'boolean')
|
|
159
|
+
bad();
|
|
160
|
+
return { kind, server: str(ownData(o, 'server')), uri: str(ownData(o, 'uri')), name: name(), parts: ownArray(ownData(o, 'parts')).map(readMcpPart), truncated: truncated };
|
|
161
|
+
}
|
|
136
162
|
default:
|
|
137
163
|
return undefined;
|
|
138
164
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type { BgTerminalFacts, SubagentContentEvent, SubagentContentItem, Subage
|
|
|
18
18
|
export * from './engineAgentPanelStore.js';
|
|
19
19
|
export * from './engineAgentAbsence.js';
|
|
20
20
|
export * from './fleetAgentPanelProjection.js';
|
|
21
|
+
export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './panelReduce.js';
|
|
22
|
+
export type { PanelFrame, PanelDelta, PanelRowFields, PanelReduceState } from './panelReduce.js';
|
|
21
23
|
export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
|
|
22
24
|
export type { AskQuestion, AskQuestionOption, QuestionAnswer, QuestionFrame, } from './liveQuestionStore.js';
|
|
23
25
|
export * from './engineInlineTaskStats.js';
|
|
@@ -31,7 +33,7 @@ export * from './executionLaneCapability.js';
|
|
|
31
33
|
export * from './approvalsStreamLiveCapability.js';
|
|
32
34
|
export * from './peerLaneCapability.js';
|
|
33
35
|
export * from './permissionRulesWriteCapability.js';
|
|
34
|
-
export { __resetPermissionsAllowGrantReadingsForTests,
|
|
36
|
+
export { __resetPermissionsAllowGrantReadingsForTests, noteEngineCapsForPermissionsAllowGrant, observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
|
|
35
37
|
export type { PermissionsAllowGrantReading } from './permissionsAllowGrantCapability.js';
|
|
36
38
|
export * from './sessionPolicyCapability.js';
|
|
37
39
|
export * from './memoryComplianceCapability.js';
|
|
@@ -40,9 +42,13 @@ export * from './memoryEntriesWire.js';
|
|
|
40
42
|
export * from './memoryVerbsWire.js';
|
|
41
43
|
export * from './deviceExecutorManagementCapability.js';
|
|
42
44
|
export * from './mcpReconnect.js';
|
|
45
|
+
export * from './hitl/parkExpiryJudgements.js';
|
|
46
|
+
export * from './usageAnalytics.js';
|
|
43
47
|
export * from './leaderConflict.js';
|
|
44
48
|
export * from './runTerminal.js';
|
|
45
|
-
export {
|
|
49
|
+
export { CORE_SEMA_TASK_TERMINAL_STATUSES, CORE_TASK_NOTIFICATION_TERMINAL_STATUSES, CORE_TERMINAL_CAUSE_KINDS, SDK_FLEET_TASK_TERMINAL_STATUSES, SDK_RUN_TERMINAL_STATUSES, ccTaskTerminalStatusOf, isCoreSemaTaskTerminal, isCoreTaskNotificationTerminal, isCoreTaskNotificationTerminalNotSuccess, isCoreTerminalCauseKind, isSdkFleetTaskTerminal, isSdkFleetTaskTerminalNotSuccess, isSdkRunTerminal, isSdkRunTerminalNotSuccess, } from './terminalStatuses.js';
|
|
50
|
+
export type { CcTaskTerminalStatus, CoreSemaTaskTerminalStatus, CoreTaskNotificationTerminalStatus, CoreTerminalCauseKind, SdkFleetTaskTerminalStatus, SdkRunTerminalStatus, } from './terminalStatuses.js';
|
|
51
|
+
export type { ProviderRejectionResend } from './providerRejection.js';
|
|
46
52
|
export * from './runCancelContext.js';
|
|
47
53
|
export * from './argvFlagValue.js';
|
|
48
54
|
export * from './readFacePosture.js';
|
|
@@ -57,6 +63,8 @@ export * from './skillToolListsCapability.js';
|
|
|
57
63
|
export * from './steerPriorityCapability.js';
|
|
58
64
|
export * from './permissionModesCapability.js';
|
|
59
65
|
export * from './approvalDecidedByCapability.js';
|
|
66
|
+
export * from './sessionReadRedactionCapability.js';
|
|
67
|
+
export * from './outputStyleSeatCapability.js';
|
|
60
68
|
export * from './mcpProbeWire.js';
|
|
61
69
|
export * from './effectiveFacts.js';
|
|
62
70
|
export * from './gateOutcome.js';
|
|
@@ -86,7 +94,7 @@ export * from './engineWireSdk.js';
|
|
|
86
94
|
export * from './classifierVerdictWire.js';
|
|
87
95
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
88
96
|
export { findSystemReminderOpenTag, type SystemReminderOpenTagSpan } from './systemReminderTag.js';
|
|
89
|
-
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_REFUSAL_CODES, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
97
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_REFUSAL_CODES, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
90
98
|
export type { DelegationCapDisposition, ModelFallbackReason, OperatorGateRefusal, RunDeathVerdictCode, } from './engineErrorCodes.js';
|
|
91
99
|
export * from './agentsWireCaps.js';
|
|
92
100
|
export * from './attachmentsWireCaps.js';
|
|
@@ -102,9 +110,13 @@ export * from './retainBackgroundWireCaps.js';
|
|
|
102
110
|
export * from './oneShotWireCaps.js';
|
|
103
111
|
export * from './rewindWireCaps.js';
|
|
104
112
|
export * from './rewindArchiveCapability.js';
|
|
113
|
+
export * from './rewindEngineAction.js';
|
|
105
114
|
export * from './fileHistoryCaptureCapability.js';
|
|
106
115
|
export { FILE_HISTORY_LEG_VERDICTS, fileHistoryLegNoticeVerdict, fileHistoryLegNoticeSentence, fileHistoryDeclarationOfBody, createFileHistoryDeclarationLedger, } from './fileHistoryLegNotice.js';
|
|
107
116
|
export type { FileHistoryDeclarationFact, FileHistoryLegNoticeVerdict, FileHistoryLegNoticeInput, FileHistoryDeclarationLedger } from './fileHistoryLegNotice.js';
|
|
117
|
+
export * from './callerCwdCapability.js';
|
|
118
|
+
export { legCwdOfBody, engineSelectedInstructionsFile } from './wiringInstructionsAttribution.js';
|
|
119
|
+
export type { InstructionsAttributionInput } from './wiringInstructionsAttribution.js';
|
|
108
120
|
export * from './sealedKeyCapability.js';
|
|
109
121
|
export * from './storePostureCapability.js';
|
|
110
122
|
export * from './centerWiringCapability.js';
|
|
@@ -118,19 +130,23 @@ export * from './liveModelCatalog.js';
|
|
|
118
130
|
export * from './modelBudgetRule.js';
|
|
119
131
|
export * from './modelIdentityResolvability.js';
|
|
120
132
|
export * from './sessionModelLatch.js';
|
|
133
|
+
export * from './modelSwitchFallback.js';
|
|
121
134
|
export * from './effortWire.js';
|
|
122
135
|
export * from './adapter/types.js';
|
|
123
136
|
export * from './adapter/downstream/turnUsageToModelUsage.js';
|
|
124
137
|
export * from './adapter/downstream/eventToSdkMessage.js';
|
|
125
138
|
export type { WiringManifestView, WiringManifestSections, WiringManifestFleetView } from './adapter/downstream/wiringManifestView.js';
|
|
126
139
|
export * from './adapter/downstream/terminalToSdkResult.js';
|
|
140
|
+
export { resultErrorCodeOf, resultSelectedModelOf, resultSalvagedResultOf, resultParkFailedReasonOf } from './resultFrameKeys.js';
|
|
127
141
|
export * from './adapter/runStream.js';
|
|
128
142
|
export * from './adapter/activeRunSelfHeal.js';
|
|
129
143
|
export * from './request/taskRequest.js';
|
|
130
144
|
export { disableSkillsDeclaration, disableSkillsDeclarationSettled } from './disableSkillsWire.js';
|
|
145
|
+
export { approvalReachDeclaration, approvalReachDeclarationSettled } from './approvalReachWire.js';
|
|
146
|
+
export type { ApprovalReachDeclaration, ApprovalReachWithheldCause, ApprovalReachWord } from './approvalReachWire.js';
|
|
131
147
|
export type { DisableSkillsDeclaration } from './disableSkillsWire.js';
|
|
132
|
-
export { PERMISSIONS_KEPT_REASONS, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
|
|
133
|
-
export type { PermissionsDeclaration, PermissionsDeclarationBuckets, PermissionsDeclarationInput, PermissionsDeclarationReport, PermissionsKeptReason, PermissionsKeptRule, PermissionsRewrittenRule, PermissionsUncheckedRule, PermissionsUnreachableRule, WireRuleOrigin, WireRuleOrigins, } from './permissionsDeclaration.js';
|
|
148
|
+
export { PERMISSIONS_KEPT_REASONS, WIRE_RULE_TRUST_ORDER, permissionsAllowKeptNotice, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
|
|
149
|
+
export type { PermissionsAllowKeptFacts, PermissionsClientOwnedStatement, PermissionsDeclaration, PermissionsDeclarationBuckets, PermissionsDeclarationInput, PermissionsDeclarationReport, PermissionsKeptReason, PermissionsKeptRule, PermissionsRewrittenRule, PermissionsUncheckedRule, PermissionsUnreachableRule, WireRuleOrigin, WireRuleOrigins, } from './permissionsDeclaration.js';
|
|
134
150
|
export * from './clientSlice.js';
|
|
135
151
|
export * from './host.js';
|
|
136
152
|
export { abortableSleep } from './abortableSleep.js';
|
|
@@ -145,7 +161,7 @@ export * from './limitsWire.js';
|
|
|
145
161
|
export * from './interactiveToolsWire.js';
|
|
146
162
|
export * from './headlessPermissionModeWire.js';
|
|
147
163
|
export * from './headlessReconnectWire.js';
|
|
148
|
-
export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows,
|
|
164
|
+
export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows, wireResumable, wireRowUsage, } from './fleet/fleetProjection.js';
|
|
149
165
|
export type { FleetRowUsage, FleetTaskStatus, FleetTaskView, FleetWorkflowView, NotProjectedEntry, ProjectTasksOptions, } from './fleet/fleetProjection.js';
|
|
150
166
|
export * from './fleet/fleetLedger.js';
|
|
151
167
|
export * from './fleet/workflowSizeWarning.js';
|
|
@@ -158,6 +174,7 @@ export type { RetainWithoutWakeInput, RetainWithoutWakeVerdict, SubagentOwnerCon
|
|
|
158
174
|
export * from './subagent/engineTaskHandleWire.js';
|
|
159
175
|
export * from './subagent/engineCompactWire.js';
|
|
160
176
|
export * from './subagent/engineSubagentTail.js';
|
|
177
|
+
export { subagentStateDetail } from './subagent/agentStateDetail.js';
|
|
161
178
|
export { __resetBgOwnerAbsenceForTests, } from './subagent/subagentOwnerAbsence.js';
|
|
162
179
|
export * from './engineSessionParam.js';
|
|
163
180
|
export { engineWireTarget, engineWireTargetFor, installEngineWireTarget, installEngineWireTargetFor, } from './engineWireTarget.js';
|
|
@@ -169,15 +186,15 @@ export * from './corruptSessionCopy.js';
|
|
|
169
186
|
export { classifyToolHistoryMismatch, readToolHistoryMismatchKey, resolveToolHistoryRewindTarget } from './toolHistoryMismatch.js';
|
|
170
187
|
export type { ToolHistoryMismatchRowKey } from './toolHistoryMismatch.js';
|
|
171
188
|
export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
|
|
172
|
-
export {
|
|
173
|
-
export type {
|
|
189
|
+
export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
|
|
190
|
+
export type { DeviceFlowPollingPlan } from './deviceFlowPolling.js';
|
|
174
191
|
export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
|
|
175
192
|
export type { PromptDeliveryLedger, PromptDeliveryRecord } from './promptDelivery.js';
|
|
176
193
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
177
194
|
export type { UserAttachmentDescriptor, UserAttachmentNotebookCell } from './userAttachmentEnvelope.js';
|
|
178
195
|
export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
|
|
179
196
|
export type { HumanTurnInput, HumanTurnItem, HumanTurnAttachment, HumanTurnRider, HumanTurnMissing, HumanTurnCaps, HumanTurnEncoding, HumanTurnShare, HumanTurnSharePart, HumanTurnDegraded, HumanTurnDelivered, } from './humanTurn.js';
|
|
180
|
-
export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat,
|
|
197
|
+
export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat, __resetAttachmentSeatReadingsForTests, } from './attachmentSeatCapability.js';
|
|
181
198
|
export type { AttachmentSeatReading } from './attachmentSeatCapability.js';
|
|
182
199
|
export * from './resumeRefusalCopy.js';
|
|
183
200
|
export * from './wireRefusalCopy.js';
|
|
@@ -196,7 +213,6 @@ export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
|
196
213
|
export type { HookMatcherVerdict, HookMatcherUnjudgedReason } from './hookMatcherVerdict.js';
|
|
197
214
|
export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
|
|
198
215
|
export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinTiers, type ReadDenyBuiltinTiersParse } from './readDenyTiers.js';
|
|
199
|
-
export { MODE_ARBITRATION, askSurvivesStandingAnswer, type StandingAnswerVerdict } from './askSurvivesStandingAnswer.js';
|
|
200
216
|
export * from './liveInitToolFace.js';
|
|
201
217
|
export * from './printInitToolFace.js';
|
|
202
218
|
export * from './model/providerPresets.js';
|
|
@@ -226,15 +242,27 @@ export * from './hitl/sessionPolicyWire.js';
|
|
|
226
242
|
export * from './hitl/sessionPolicyDeliverable.js';
|
|
227
243
|
export * from './hitl/approvalsFeed.js';
|
|
228
244
|
export * from './hitl/livePendingAsk.js';
|
|
229
|
-
export { replayedApprovalDisposition } from './hitl/replayedApproval.js';
|
|
245
|
+
export { replayedApprovalDisposition, replayedApprovalSentence } from './hitl/replayedApproval.js';
|
|
230
246
|
export type { ReplayedApprovalDisposition, ReplayPendingBasis } from './hitl/replayedApproval.js';
|
|
231
|
-
export
|
|
232
|
-
export { automaticAnswerVerdict, type AutomaticAnswerLane, type AutomaticAnswerFacts, type AutomaticAnswerRoad, type AutomaticAnswerUnknownWhy, type AutomaticAnswerVerdict, } from './hitl/automaticAnswerVerdict.js';
|
|
233
|
-
export {
|
|
247
|
+
export { hasLedgerPositionKey } from './hitl/gateLedger.js';
|
|
248
|
+
export { MODE_ARBITRATION, automaticAnswerVerdict, mandatedApprovalDetailOf, permissionRequestHookScope, type AutomaticAnswerLane, type AutomaticAnswerAskFace, type AutomaticAnswerFacts, type AutomaticAnswerRoad, type AutomaticAnswerUnknownWhy, type AutomaticAnswerVerdict, type PermissionRequestHookScope, } from './hitl/automaticAnswerVerdict.js';
|
|
249
|
+
export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, type DecisionRefusalStanding, type DecisionRefusalClassified, type DecisionRefusalConflict, type LiveAskPendingReading, type UndeliverableDecisionEnd, type UndeliverableDecisionFacts, } from './hitl/decisionRefusal.js';
|
|
250
|
+
export { noAllowCauseOf, type NoAllowCause, type RuleLadderNoAllowFacts } from './hitl/noAllowCause.js';
|
|
251
|
+
export { policyDenyReason, type PolicyDenyLane, type PolicyDenyReasonFacts } from './hitl/frameRouter.js';
|
|
252
|
+
export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadowSentence, type ApprovalAllowRuleShadow, type ApprovalAllowRuleShadowMember, type AllowRuleShadowedWireMember, } from './hitl/allowRuleShadow.js';
|
|
234
253
|
export { projectCrashConverged } from './hitl/crashConverged.js';
|
|
235
254
|
export type { ApprovalsListEnvelope, CrashConvergedOrphanState, CrashConvergedProjection, CrashConvergedRow } from './hitl/crashConverged.js';
|
|
236
255
|
export * from './hitl/crashConvergedNotice.js';
|
|
256
|
+
export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
|
|
257
|
+
export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
|
237
258
|
export * from './interactiveHalt.js';
|
|
259
|
+
export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
|
|
260
|
+
export type { InteractiveInterruptRuns, InteractiveInterruptOptions } from './interactiveInterrupt.js';
|
|
261
|
+
export { listDevices, readSessionBinding, rebindSession, reconcileRebindOutcome, rebindProvesRequestNotApplied } from './deviceRebind.js';
|
|
262
|
+
export type { DeviceSummary, DeviceListResult, DeviceBinding, DeviceSessionBinding, DeviceRebindRequest, DeviceRevokeRequest, DeviceRebindResult, DeviceEnrollToken, DeviceEnrollRequest, DeviceEnrollResult, DeviceRevokeResult, } from '@sema-agent/sdk';
|
|
263
|
+
export type { DeviceListVerb, DeviceSessionBindingVerb, DeviceRebindVerb, DeviceRosterRow, DeviceBindingReading, DeviceRefused, DeviceLaneAbsent, DeviceTransport, DeviceUnreadable, DeviceUnarmed, DeviceListOutcome, DeviceSessionBindingOutcome, DeviceRebindInput, DeviceRebindUnconfirmed, DeviceRebindOutcome, DeviceRebindReconcileVerdict, } from './deviceRebind.js';
|
|
264
|
+
export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js';
|
|
265
|
+
export type { EngineEnvView, EngineEnvGroupDecl, EngineEnvSourcingInput, EngineEnvTouchedKey, EngineEnvGroupReading, EngineEnvKeyReason, EngineEnvSourcingVerdict, } from './engineEnvSourcing.js';
|
|
238
266
|
export * from './compensations.js';
|
|
239
267
|
export * from './request/printNotification.js';
|
|
240
268
|
export * from './seatContract.js';
|
|
@@ -259,3 +287,6 @@ export * from './env/localeTag.js';
|
|
|
259
287
|
export * from './env/uiLanguage.js';
|
|
260
288
|
export type { PendingCheckpoint, RuleSuggestion } from '@sema-agent/sdk';
|
|
261
289
|
export * from './ruleRemovalConsequence.js';
|
|
290
|
+
export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
|
|
291
|
+
export type { EngineProbeAnswer, EngineCredentialNeed } from './engineCredentialRequirement.js';
|
|
292
|
+
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export { __resetSubagentContentStoreConfigForTests, __resetSubagentOwnerLedgerFo
|
|
|
15
15
|
export * from './engineAgentPanelStore.js';
|
|
16
16
|
export * from './engineAgentAbsence.js';
|
|
17
17
|
export * from './fleetAgentPanelProjection.js';
|
|
18
|
+
export { reducePanelFrame, createPanelReduceState, PANEL_DELTA_OPS } from './panelReduce.js';
|
|
18
19
|
export { _resetLiveQuestionStore, hasLocalQuestionResponder, hasQuestionOverlay, hasQuestionOverlayFor, onQuestionFrame, onQuestionFrameFor, publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionResponder, respondToQuestion, setQuestionRespond, } from './liveQuestionStore.js';
|
|
19
20
|
export * from './engineInlineTaskStats.js';
|
|
20
21
|
export * from './printToolResultFrame.js';
|
|
@@ -26,7 +27,7 @@ export * from './executionLaneCapability.js';
|
|
|
26
27
|
export * from './approvalsStreamLiveCapability.js';
|
|
27
28
|
export * from './peerLaneCapability.js';
|
|
28
29
|
export * from './permissionRulesWriteCapability.js';
|
|
29
|
-
export { __resetPermissionsAllowGrantReadingsForTests,
|
|
30
|
+
export { __resetPermissionsAllowGrantReadingsForTests, noteEngineCapsForPermissionsAllowGrant, observedPermissionsAllowGrant, permissionsAllowGrantAvailable, permissionsAllowGrantDoctorDetail, projectPermissionsAllowGrantCapability, } from './permissionsAllowGrantCapability.js';
|
|
30
31
|
export * from './sessionPolicyCapability.js';
|
|
31
32
|
export * from './memoryComplianceCapability.js';
|
|
32
33
|
export * from './memoryOriginCapability.js';
|
|
@@ -34,9 +35,11 @@ export * from './memoryEntriesWire.js';
|
|
|
34
35
|
export * from './memoryVerbsWire.js';
|
|
35
36
|
export * from './deviceExecutorManagementCapability.js';
|
|
36
37
|
export * from './mcpReconnect.js';
|
|
38
|
+
export * from './hitl/parkExpiryJudgements.js';
|
|
39
|
+
export * from './usageAnalytics.js';
|
|
37
40
|
export * from './leaderConflict.js';
|
|
38
41
|
export * from './runTerminal.js';
|
|
39
|
-
export {
|
|
42
|
+
export { CORE_SEMA_TASK_TERMINAL_STATUSES, CORE_TASK_NOTIFICATION_TERMINAL_STATUSES, CORE_TERMINAL_CAUSE_KINDS, SDK_FLEET_TASK_TERMINAL_STATUSES, SDK_RUN_TERMINAL_STATUSES, ccTaskTerminalStatusOf, isCoreSemaTaskTerminal, isCoreTaskNotificationTerminal, isCoreTaskNotificationTerminalNotSuccess, isCoreTerminalCauseKind, isSdkFleetTaskTerminal, isSdkFleetTaskTerminalNotSuccess, isSdkRunTerminal, isSdkRunTerminalNotSuccess, } from './terminalStatuses.js';
|
|
40
43
|
export * from './runCancelContext.js';
|
|
41
44
|
export * from './argvFlagValue.js';
|
|
42
45
|
export * from './readFacePosture.js';
|
|
@@ -51,6 +54,8 @@ export * from './skillToolListsCapability.js';
|
|
|
51
54
|
export * from './steerPriorityCapability.js';
|
|
52
55
|
export * from './permissionModesCapability.js';
|
|
53
56
|
export * from './approvalDecidedByCapability.js';
|
|
57
|
+
export * from './sessionReadRedactionCapability.js';
|
|
58
|
+
export * from './outputStyleSeatCapability.js';
|
|
54
59
|
export * from './mcpProbeWire.js';
|
|
55
60
|
export * from './effectiveFacts.js';
|
|
56
61
|
export * from './gateOutcome.js';
|
|
@@ -77,7 +82,7 @@ export * from './engineWireSdk.js';
|
|
|
77
82
|
export * from './classifierVerdictWire.js';
|
|
78
83
|
export { stripSystemReminderBlocks, unwrapSystemReminder } from './systemReminderTag.js';
|
|
79
84
|
export { findSystemReminderOpenTag } from './systemReminderTag.js';
|
|
80
|
-
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_REFUSAL_CODES, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
85
|
+
export { ACTIVE_RUN_BUSY_ERROR_CODE, APPROVAL_EXPIRED, ASK_GONE, asModelFallbackReason, CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED, CAPABILITY_SELF_ORCHESTRATION_REQUIRED, CONFIG_AGENT_UNKNOWN_TOOL, CONFIG_DELEGATION_ENTRY_CAPS, CONFIG_IMAGE_INVALID, CONFIG_LEGACY_TOOL_NAME, CONFIG_LIMIT_INVALID, CONFIG_LIMIT_UNKNOWN_KEY, CONFIG_MEMORY_PROJECT_KEY_SPELLING, CONFIG_MEMORY_WRITE_SCOPE_MISMATCH, CONFIG_OUTPUT_STYLE_INVALID, CONFIG_REFUSAL_CODES, CONFIG_STRATEGY_FIND_LIMIT_INVALID, CONFIG_STRATEGY_MAX_SIZE_INVALID, CORRUPT_SESSION_ERROR_CODE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_PARK_MOVED_CODES, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, DELEGATION_CAP_CODES, DELEGATION_CONCURRENCY_CAP, DELEGATION_SESSION_CAP, delegationCapDispositionOf, DRAINING_ERROR_CODE, ENGINE_STOP_REASONS, engineStopReasonToCc, ENV_LIFETIME_EXPIRED, FLEET_LEASE_UNAVAILABLE, GATE_PARKED_ERROR_CODE, imageInvalidFailureNoteOf, isConfigRefusalCode, isCorruptSessionCode, isDecideParkMovedCode, isDelegationCapCode, isInterruptedToolEndCode, isLimitsExceededCode, isRewindFamilyCode, isRulesRefusalCode, isStatusDerivedCoarseCode, isWorkflowParkRefusalCode, LIMITS_MAX_COST_EXCEEDED, LIMITS_MAX_TOKENS_EXCEEDED, LIMITS_MAX_TURNS_EXCEEDED, LIMITS_MAX_WALLTIME_EXCEEDED, MCP_SERVER_REVOKED, MODEL_FALLBACK_INHERIT_NO_TIER_BINDING, operatorGateRefusalContent, OUTPUT_INVALID, PARKED_RESUME_STARTUP_FAILED, REQUEST_AUTONOMY_LANE_REFUSED, RESUME_AT_ERROR_CODE_PREFIX, RESUME_CONTEXT_UNAVAILABLE, RESUME_ENV_FAILED, RESUME_PLACEMENT_MISMATCH, RESUME_POLICY_FOLD_CODE, RESUME_PREFLIGHT_REJECTED, RESUME_REOPEN_CODES, RESUME_RETRY_LATER_CODES, RESUME_TOOL_CONTRACT_MISMATCH, RESUME_TOOL_UNAVAILABLE, RESUME_USAGE_WINDOW_EXHAUSTED, REWIND_ERROR_CODE_PREFIXES, RULES_LEGACY_TOOL_NAME, RUN_DEATH_VERDICT_CODES, RUN_ORPHANED, RUN_STALLED, runDeathVerdictNoteOf, SCENARIO_ASSIGNMENT_UNKNOWN_ERROR_CODE, SCENARIO_NOT_ALLOWED_ERROR_CODE, STATUS_DERIVED_COARSE_CODES, STOP_CONFLICT_CODES, STREAM_MAX_DURATION, TOOL_END_INTERRUPTED_NEVER_STARTED, TOOL_END_INTERRUPTED_OUTCOME_UNKNOWN, USAGE_WINDOW_EXHAUSTED, WORKFLOW_PARK_REFUSAL_CODES, } from './engineErrorCodes.js';
|
|
81
86
|
export * from './agentsWireCaps.js';
|
|
82
87
|
export * from './attachmentsWireCaps.js';
|
|
83
88
|
export * from './clientContextWireCaps.js';
|
|
@@ -92,8 +97,11 @@ export * from './retainBackgroundWireCaps.js';
|
|
|
92
97
|
export * from './oneShotWireCaps.js';
|
|
93
98
|
export * from './rewindWireCaps.js';
|
|
94
99
|
export * from './rewindArchiveCapability.js';
|
|
100
|
+
export * from './rewindEngineAction.js';
|
|
95
101
|
export * from './fileHistoryCaptureCapability.js';
|
|
96
102
|
export { FILE_HISTORY_LEG_VERDICTS, fileHistoryLegNoticeVerdict, fileHistoryLegNoticeSentence, fileHistoryDeclarationOfBody, createFileHistoryDeclarationLedger, } from './fileHistoryLegNotice.js';
|
|
103
|
+
export * from './callerCwdCapability.js';
|
|
104
|
+
export { legCwdOfBody, engineSelectedInstructionsFile } from './wiringInstructionsAttribution.js';
|
|
97
105
|
export * from './sealedKeyCapability.js';
|
|
98
106
|
export * from './storePostureCapability.js';
|
|
99
107
|
export * from './centerWiringCapability.js';
|
|
@@ -107,16 +115,19 @@ export * from './liveModelCatalog.js';
|
|
|
107
115
|
export * from './modelBudgetRule.js';
|
|
108
116
|
export * from './modelIdentityResolvability.js';
|
|
109
117
|
export * from './sessionModelLatch.js';
|
|
118
|
+
export * from './modelSwitchFallback.js';
|
|
110
119
|
export * from './effortWire.js';
|
|
111
120
|
export * from './adapter/types.js';
|
|
112
121
|
export * from './adapter/downstream/turnUsageToModelUsage.js';
|
|
113
122
|
export * from './adapter/downstream/eventToSdkMessage.js';
|
|
114
123
|
export * from './adapter/downstream/terminalToSdkResult.js';
|
|
124
|
+
export { resultErrorCodeOf, resultSelectedModelOf, resultSalvagedResultOf, resultParkFailedReasonOf } from './resultFrameKeys.js';
|
|
115
125
|
export * from './adapter/runStream.js';
|
|
116
126
|
export * from './adapter/activeRunSelfHeal.js';
|
|
117
127
|
export * from './request/taskRequest.js';
|
|
118
128
|
export { disableSkillsDeclaration, disableSkillsDeclarationSettled } from './disableSkillsWire.js';
|
|
119
|
-
export {
|
|
129
|
+
export { approvalReachDeclaration, approvalReachDeclarationSettled } from './approvalReachWire.js';
|
|
130
|
+
export { PERMISSIONS_KEPT_REASONS, WIRE_RULE_TRUST_ORDER, permissionsAllowKeptNotice, permissionsDeclaration, permissionsDeclarationReport } from './permissionsDeclaration.js';
|
|
120
131
|
export * from './clientSlice.js';
|
|
121
132
|
export * from './host.js';
|
|
122
133
|
export { abortableSleep } from './abortableSleep.js';
|
|
@@ -131,7 +142,7 @@ export * from './limitsWire.js';
|
|
|
131
142
|
export * from './interactiveToolsWire.js';
|
|
132
143
|
export * from './headlessPermissionModeWire.js';
|
|
133
144
|
export * from './headlessReconnectWire.js';
|
|
134
|
-
export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows,
|
|
145
|
+
export { coerceTaskStatus, coerceWorkflowStatus, CONTROL_TOOL_VERBS, FLEET_TASK_ROW_KEYS_NOT_PROJECTED, FLEET_TASK_ROW_WIRE_KEYS, FLEET_TASK_VIEW_KEYS, FLEET_WORKFLOW_ROW_KEYS_NOT_PROJECTED, FLEET_WORKFLOW_ROW_WIRE_KEYS, FLEET_WORKFLOW_VIEW_KEYS, projectDescription, projectTasks, projectWorkflows, wireResumable, wireRowUsage, } from './fleet/fleetProjection.js';
|
|
135
146
|
export * from './fleet/fleetLedger.js';
|
|
136
147
|
export * from './fleet/workflowSizeWarning.js';
|
|
137
148
|
export * from './subagent/engineDelegatedPrompt.js';
|
|
@@ -142,6 +153,7 @@ export { __resetRetainWithoutWakeWarningForTests, auditRetainWithoutWake, classi
|
|
|
142
153
|
export * from './subagent/engineTaskHandleWire.js';
|
|
143
154
|
export * from './subagent/engineCompactWire.js';
|
|
144
155
|
export * from './subagent/engineSubagentTail.js';
|
|
156
|
+
export { subagentStateDetail } from './subagent/agentStateDetail.js';
|
|
145
157
|
export { __resetBgOwnerAbsenceForTests, } from './subagent/subagentOwnerAbsence.js';
|
|
146
158
|
export * from './engineSessionParam.js';
|
|
147
159
|
export { engineWireTarget, engineWireTargetFor, installEngineWireTarget, installEngineWireTargetFor, } from './engineWireTarget.js';
|
|
@@ -151,11 +163,11 @@ export * from './corruptSession.js';
|
|
|
151
163
|
export * from './corruptSessionCopy.js';
|
|
152
164
|
export { classifyToolHistoryMismatch, readToolHistoryMismatchKey, resolveToolHistoryRewindTarget } from './toolHistoryMismatch.js';
|
|
153
165
|
export { toolHistoryBadTurnSentence } from './toolHistoryBadTurn.js';
|
|
154
|
-
export {
|
|
166
|
+
export { deviceFlowPollingPlan } from './deviceFlowPolling.js';
|
|
155
167
|
export { createPromptDeliveryLedger, promptKnownUndelivered, withoutUndeliveredPrompts } from './promptDelivery.js';
|
|
156
168
|
export { mintUserAttachmentEnvelope } from './userAttachmentEnvelope.js';
|
|
157
169
|
export { encodeHumanTurn, deliveredUuidsOf } from './humanTurn.js';
|
|
158
|
-
export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat,
|
|
170
|
+
export { noteEngineCapsForAttachmentSeat, observedAttachmentSeat, __resetAttachmentSeatReadingsForTests, } from './attachmentSeatCapability.js';
|
|
159
171
|
export * from './resumeRefusalCopy.js';
|
|
160
172
|
export * from './wireRefusalCopy.js';
|
|
161
173
|
export * from './inheritEnvWire.js';
|
|
@@ -171,7 +183,6 @@ export { hookToolAliasesOf, canonicalHookToolName } from './hookToolAliases.js';
|
|
|
171
183
|
export { hookMatcherVerdict } from './hookMatcherVerdict.js';
|
|
172
184
|
export { ASK_EVIDENCE_ABSENCE_VALUES, SYSTEM_INJECTION_PRIORITIES } from './engineClosedSets.js';
|
|
173
185
|
export { READ_DENY_BUILTIN_TIERS, READ_DENY_DEFAULT_TIERS, parseReadDenyBuiltinTiers } from './readDenyTiers.js';
|
|
174
|
-
export { MODE_ARBITRATION, askSurvivesStandingAnswer } from './askSurvivesStandingAnswer.js';
|
|
175
186
|
export * from './liveInitToolFace.js';
|
|
176
187
|
export * from './printInitToolFace.js';
|
|
177
188
|
export * from './model/providerPresets.js';
|
|
@@ -199,13 +210,21 @@ export * from './hitl/sessionPolicyWire.js';
|
|
|
199
210
|
export * from './hitl/sessionPolicyDeliverable.js';
|
|
200
211
|
export * from './hitl/approvalsFeed.js';
|
|
201
212
|
export * from './hitl/livePendingAsk.js';
|
|
202
|
-
export { replayedApprovalDisposition } from './hitl/replayedApproval.js';
|
|
203
|
-
export
|
|
204
|
-
export { automaticAnswerVerdict, } from './hitl/automaticAnswerVerdict.js';
|
|
205
|
-
export {
|
|
213
|
+
export { replayedApprovalDisposition, replayedApprovalSentence } from './hitl/replayedApproval.js';
|
|
214
|
+
export { hasLedgerPositionKey } from './hitl/gateLedger.js';
|
|
215
|
+
export { MODE_ARBITRATION, automaticAnswerVerdict, mandatedApprovalDetailOf, permissionRequestHookScope, } from './hitl/automaticAnswerVerdict.js';
|
|
216
|
+
export { classifyDecisionRefusal, liveAskPendingReading, decisionRefusalClosesOut, undeliverableDecisionContent, } from './hitl/decisionRefusal.js';
|
|
217
|
+
export { noAllowCauseOf } from './hitl/noAllowCause.js';
|
|
218
|
+
export { policyDenyReason } from './hitl/frameRouter.js';
|
|
219
|
+
export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadowSentence, } from './hitl/allowRuleShadow.js';
|
|
206
220
|
export { projectCrashConverged } from './hitl/crashConverged.js';
|
|
207
221
|
export * from './hitl/crashConvergedNotice.js';
|
|
222
|
+
export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
|
|
223
|
+
export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
|
208
224
|
export * from './interactiveHalt.js';
|
|
225
|
+
export { fireInteractiveInterrupt } from './interactiveInterrupt.js';
|
|
226
|
+
export { listDevices, readSessionBinding, rebindSession, reconcileRebindOutcome, rebindProvesRequestNotApplied } from './deviceRebind.js';
|
|
227
|
+
export { resolveEngineEnvSourcing, engineEnvView } from './engineEnvSourcing.js';
|
|
209
228
|
export * from './compensations.js';
|
|
210
229
|
export * from './request/printNotification.js';
|
|
211
230
|
export * from './seatContract.js';
|
|
@@ -226,3 +245,5 @@ export * from './env/localeGeo.js';
|
|
|
226
245
|
export * from './env/localeTag.js';
|
|
227
246
|
export * from './env/uiLanguage.js';
|
|
228
247
|
export * from './ruleRemovalConsequence.js';
|
|
248
|
+
export { engineCredentialRequirementOf } from './engineCredentialRequirement.js';
|
|
249
|
+
export { isSessionIdPathSegment } from './sessionIdSegment.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentClient } from '@sema-agent/sdk';
|
|
2
|
+
import type { InteractiveHaltInterruptOutcome } from './interactiveHalt.js';
|
|
3
|
+
export type InteractiveInterruptRuns = Pick<AgentClient['runs'], 'interrupt'>;
|
|
4
|
+
export interface InteractiveInterruptOptions {
|
|
5
|
+
readonly sessionId?: string | undefined;
|
|
6
|
+
readonly signal?: AbortSignal | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function fireInteractiveInterrupt(runs: InteractiveInterruptRuns | null | undefined, taskId: string, opts?: InteractiveInterruptOptions): Promise<InteractiveHaltInterruptOutcome>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { atMostOnceVerdictOf } from './atMostOnce.js';
|
|
2
|
+
import { readOwnDataValue } from './ownKey.js';
|
|
3
|
+
function guardedSlot(e, key) {
|
|
4
|
+
if (e === null || (typeof e !== 'object' && typeof e !== 'function'))
|
|
5
|
+
return undefined;
|
|
6
|
+
try {
|
|
7
|
+
return e[key];
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function outcomeOfFailure(e) {
|
|
14
|
+
const v = atMostOnceVerdictOf(e);
|
|
15
|
+
if (v.status === undefined && v.name === 'SyntaxError')
|
|
16
|
+
return { kind: 'halted' };
|
|
17
|
+
if (v.delivery === 'rejected' && v.status !== undefined) {
|
|
18
|
+
return { kind: 'refused', status: v.status, ...(v.code !== undefined ? { errorCode: v.code } : {}) };
|
|
19
|
+
}
|
|
20
|
+
return { kind: 'transport', ...(v.name !== undefined ? { detail: v.name } : {}) };
|
|
21
|
+
}
|
|
22
|
+
function turnCutOf(receipt) {
|
|
23
|
+
if (receipt === null || typeof receipt !== 'object')
|
|
24
|
+
return undefined;
|
|
25
|
+
try {
|
|
26
|
+
if (Array.isArray(receipt))
|
|
27
|
+
return undefined;
|
|
28
|
+
const v = readOwnDataValue(receipt, 'turnCut');
|
|
29
|
+
return typeof v === 'boolean' ? v : undefined;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export async function fireInteractiveInterrupt(runs, taskId, opts = {}) {
|
|
36
|
+
const verb = guardedSlot(runs, 'interrupt');
|
|
37
|
+
if (typeof verb !== 'function')
|
|
38
|
+
return { kind: 'unarmed' };
|
|
39
|
+
const sessionId = guardedSlot(opts, 'sessionId');
|
|
40
|
+
const signal = guardedSlot(opts, 'signal');
|
|
41
|
+
const callOpts = {
|
|
42
|
+
...(typeof sessionId === 'string' && sessionId.length > 0 ? { session: sessionId } : {}),
|
|
43
|
+
...(signal !== undefined && signal !== null ? { signal } : {}),
|
|
44
|
+
};
|
|
45
|
+
let receipt;
|
|
46
|
+
try {
|
|
47
|
+
receipt = await verb.call(runs, taskId, undefined, callOpts);
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
return outcomeOfFailure(e);
|
|
51
|
+
}
|
|
52
|
+
const turnCut = turnCutOf(receipt);
|
|
53
|
+
return { kind: 'halted', ...(turnCut !== undefined ? { turnCut } : {}) };
|
|
54
|
+
}
|