@sema-agent/client-core 0.77.1 → 0.77.2
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 +13 -1
- package/README.md +5 -4
- package/dist/abortableSleep.d.ts +0 -28
- package/dist/abortableSleep.js +0 -28
- package/dist/adapt/arms.d.ts +0 -46
- package/dist/adapt/arms.js +9 -544
- package/dist/adapt/ids.d.ts +0 -58
- package/dist/adapt/ids.js +0 -63
- package/dist/adapt/instanceLedger.d.ts +0 -25
- package/dist/adapt/instanceLedger.js +0 -20
- package/dist/adapt/panelTasks.d.ts +0 -69
- package/dist/adapt/panelTasks.js +0 -95
- package/dist/adapt/textSegmentAuthority.d.ts +1 -137
- package/dist/adapt/textSegmentAuthority.js +0 -54
- package/dist/adapt/textStream.d.ts +0 -252
- package/dist/adapt/textStream.js +2 -281
- package/dist/adapt/toolCards.d.ts +0 -46
- package/dist/adapt/toolCards.js +0 -23
- package/dist/adapt/turnFlags.d.ts +0 -54
- package/dist/adapt/turnFlags.js +1 -17
- package/dist/adapt/wireShapes.d.ts +0 -92
- package/dist/adapt/wireShapes.js +0 -83
- package/dist/adapt.d.ts +0 -55
- package/dist/adapt.js +1 -120
- package/dist/adapter/activeRunSelfHeal.d.ts +22 -515
- package/dist/adapter/activeRunSelfHeal.js +10 -625
- package/dist/adapter/downstream/eventToSdkMessage.d.ts +2 -305
- package/dist/adapter/downstream/eventToSdkMessage.js +2 -867
- package/dist/adapter/downstream/terminalToSdkResult.d.ts +2 -314
- package/dist/adapter/downstream/terminalToSdkResult.js +13 -560
- package/dist/adapter/downstream/turnUsageToModelUsage.d.ts +0 -95
- package/dist/adapter/downstream/turnUsageToModelUsage.js +2 -31
- package/dist/adapter/runStream.d.ts +0 -206
- package/dist/adapter/runStream.js +6 -596
- package/dist/adapter/types.d.ts +0 -111
- package/dist/adapter/types.js +0 -29
- package/dist/agentSession/backgroundView.d.ts +0 -106
- package/dist/agentSession/backgroundView.js +3 -49
- package/dist/agentSession/contract.d.ts +0 -98
- package/dist/agentSession/contract.js +0 -12
- package/dist/agentsWireCaps.d.ts +0 -72
- package/dist/agentsWireCaps.js +4 -72
- package/dist/approvalsStreamLiveCapability.d.ts +0 -25
- package/dist/approvalsStreamLiveCapability.js +0 -31
- package/dist/argvFlagValue.d.ts +0 -33
- package/dist/argvFlagValue.js +3 -35
- package/dist/attachmentsWireCaps.d.ts +0 -127
- package/dist/attachmentsWireCaps.js +0 -144
- package/dist/autoModeUnavailable.d.ts +0 -120
- package/dist/autoModeUnavailable.js +0 -144
- package/dist/classifierStatus.d.ts +0 -72
- package/dist/classifierStatus.js +0 -167
- package/dist/classifierVerdictWire.d.ts +0 -54
- package/dist/classifierVerdictWire.js +0 -133
- package/dist/clientContextWireCaps.d.ts +0 -37
- package/dist/clientContextWireCaps.js +0 -36
- package/dist/clientSlice.d.ts +0 -63
- package/dist/clientSlice.js +0 -45
- package/dist/cloudConfigWireCaps.d.ts +0 -86
- package/dist/cloudConfigWireCaps.js +2 -65
- package/dist/compensations.d.ts +0 -52
- package/dist/compensations.js +2 -63
- package/dist/controlRouter.d.ts +2 -208
- package/dist/controlRouter.js +1 -129
- package/dist/coreValuePorts.d.ts +0 -84
- package/dist/coreValuePorts.js +0 -29
- package/dist/decideReceipt.d.ts +0 -110
- package/dist/decideReceipt.js +0 -84
- package/dist/detachWire.d.ts +0 -130
- package/dist/detachWire.js +1 -130
- package/dist/deviceExecutorManagementCapability.d.ts +2 -35
- package/dist/deviceExecutorManagementCapability.js +1 -37
- package/dist/diagnostics.d.ts +0 -8
- package/dist/diagnostics.js +0 -8
- package/dist/diff/patch.d.ts +0 -17
- package/dist/diff/patch.js +0 -19
- package/dist/effectiveFacts.d.ts +0 -40
- package/dist/effectiveFacts.js +0 -22
- package/dist/effortWire.d.ts +0 -11
- package/dist/effortWire.js +0 -12
- package/dist/engineAgentPanelStore.d.ts +0 -169
- package/dist/engineAgentPanelStore.js +13 -293
- package/dist/engineCapReader.d.ts +0 -62
- package/dist/engineCapReader.js +1 -43
- package/dist/engineCapsCache.d.ts +0 -177
- package/dist/engineCapsCache.js +0 -199
- package/dist/engineCapsGenerationGuard.d.ts +0 -2
- package/dist/engineCapsGenerationGuard.js +0 -11
- package/dist/engineErrorCodes.d.ts +1 -316
- package/dist/engineErrorCodes.js +0 -427
- package/dist/engineHttpTools.d.ts +0 -29
- package/dist/engineHttpTools.js +0 -29
- package/dist/engineIdentity.d.ts +0 -83
- package/dist/engineIdentity.js +0 -88
- package/dist/engineInlineTaskStats.d.ts +0 -57
- package/dist/engineInlineTaskStats.js +1 -42
- package/dist/engineNoticeCodes.d.ts +0 -190
- package/dist/engineNoticeCodes.js +0 -182
- package/dist/engineSessionParam.d.ts +0 -30
- package/dist/engineSessionParam.js +0 -52
- package/dist/engineToolLabelStore.d.ts +0 -29
- package/dist/engineToolLabelStore.js +0 -31
- package/dist/engineWireSdk.d.ts +0 -90
- package/dist/engineWireSdk.js +0 -74
- package/dist/engineWireTarget.d.ts +0 -14
- package/dist/engineWireTarget.js +0 -39
- package/dist/env/localeGeo.d.ts +0 -12
- package/dist/env/localeGeo.js +2 -77
- package/dist/env/localeTag.d.ts +0 -34
- package/dist/env/localeTag.js +0 -32
- package/dist/env/uiLanguage.d.ts +0 -13
- package/dist/env/uiLanguage.js +0 -25
- package/dist/envFlag.d.ts +0 -37
- package/dist/envFlag.js +0 -40
- package/dist/executionLaneCapability.d.ts +0 -48
- package/dist/executionLaneCapability.js +0 -54
- package/dist/finalVerifyWire.d.ts +0 -67
- package/dist/finalVerifyWire.js +3 -43
- package/dist/fleet/fleetLedger.d.ts +0 -308
- package/dist/fleet/fleetLedger.js +10 -429
- package/dist/fleet/fleetProjection.d.ts +0 -240
- package/dist/fleet/fleetProjection.js +0 -189
- package/dist/fleet/fleetRowAgentType.d.ts +0 -6
- package/dist/fleet/fleetRowAgentType.js +1 -32
- package/dist/fleet/workflowSizeWarning.d.ts +0 -47
- package/dist/fleet/workflowSizeWarning.js +1 -46
- package/dist/fleetAgentPanelProjection.d.ts +0 -48
- package/dist/fleetAgentPanelProjection.js +8 -173
- package/dist/fleetTaskDesc.d.ts +0 -39
- package/dist/fleetTaskDesc.js +0 -69
- package/dist/forkWireCaps.d.ts +0 -23
- package/dist/forkWireCaps.js +1 -24
- package/dist/gateOutcome.d.ts +0 -140
- package/dist/gateOutcome.js +0 -85
- package/dist/gateVocabulary.d.ts +0 -114
- package/dist/gateVocabulary.js +1 -161
- package/dist/goalStopHook.d.ts +0 -127
- package/dist/goalStopHook.js +0 -178
- package/dist/headlessPermissionModeWire.d.ts +0 -76
- package/dist/headlessPermissionModeWire.js +1 -155
- package/dist/headlessReconnectWire.d.ts +0 -84
- package/dist/headlessReconnectWire.js +13 -67
- package/dist/hitl/approvalDecisionNoteAudit.d.ts +0 -49
- package/dist/hitl/approvalDecisionNoteAudit.js +0 -56
- package/dist/hitl/approvalOutcomeNote.d.ts +0 -2
- package/dist/hitl/approvalOutcomeNote.js +0 -20
- package/dist/hitl/approvalResolution.d.ts +0 -113
- package/dist/hitl/approvalResolution.js +0 -66
- package/dist/hitl/approvalsFeed.d.ts +0 -183
- package/dist/hitl/approvalsFeed.js +12 -243
- package/dist/hitl/armedGateRegistry.d.ts +0 -55
- package/dist/hitl/armedGateRegistry.js +0 -146
- package/dist/hitl/askGateWire.d.ts +0 -86
- package/dist/hitl/askGateWire.js +1 -95
- package/dist/hitl/askParkRowRouting.d.ts +0 -123
- package/dist/hitl/askParkRowRouting.js +1 -89
- package/dist/hitl/crashConverged.d.ts +0 -148
- package/dist/hitl/crashConverged.js +0 -214
- package/dist/hitl/editedRuleTextPrecheck.d.ts +0 -109
- package/dist/hitl/editedRuleTextPrecheck.js +0 -71
- package/dist/hitl/frameRouter.d.ts +0 -134
- package/dist/hitl/frameRouter.js +6 -378
- package/dist/hitl/gateIdentity.d.ts +0 -39
- package/dist/hitl/gateIdentity.js +0 -41
- package/dist/hitl/gateLedger.d.ts +0 -267
- package/dist/hitl/gateLedger.js +0 -121
- package/dist/hitl/hitlBridge.d.ts +7 -431
- package/dist/hitl/hitlBridge.js +7 -476
- package/dist/hitl/hitlHostSurface.d.ts +0 -150
- package/dist/hitl/hitlHostSurface.js +0 -169
- package/dist/hitl/livePendingAsk.d.ts +0 -91
- package/dist/hitl/livePendingAsk.js +0 -74
- package/dist/hitl/localAllowRule.d.ts +0 -62
- package/dist/hitl/localAllowRule.js +1 -33
- package/dist/hitl/parkOwnership.d.ts +0 -56
- package/dist/hitl/parkOwnership.js +0 -22
- package/dist/hitl/parkResolver.d.ts +3 -88
- package/dist/hitl/parkResolver.js +8 -349
- package/dist/hitl/parkRowBirthWait.d.ts +2 -26
- package/dist/hitl/parkRowBirthWait.js +3 -93
- package/dist/hitl/persistedRulesWire.d.ts +13 -358
- package/dist/hitl/persistedRulesWire.js +0 -310
- package/dist/hitl/planReviewWire.d.ts +4 -176
- package/dist/hitl/planReviewWire.js +9 -312
- package/dist/hitl/resumeRunningCard.d.ts +0 -105
- package/dist/hitl/resumeRunningCard.js +0 -105
- package/dist/hitl/sessionPolicyWire.d.ts +11 -191
- package/dist/hitl/sessionPolicyWire.js +0 -149
- package/dist/hitl/suspendedReopen.d.ts +3 -24
- package/dist/hitl/suspendedReopen.js +0 -14
- package/dist/hitl/toolApprovalWire.d.ts +5 -1308
- package/dist/hitl/toolApprovalWire.js +5 -945
- package/dist/hooksWireCaps.d.ts +0 -38
- package/dist/hooksWireCaps.js +0 -190
- package/dist/host.d.ts +0 -105
- package/dist/host.js +0 -33
- package/dist/hostEnv.d.ts +0 -14
- package/dist/hostEnv.js +0 -13
- package/dist/imagesWireCaps.d.ts +0 -21
- package/dist/imagesWireCaps.js +0 -22
- package/dist/index.d.ts +0 -134
- package/dist/index.js +0 -476
- package/dist/interactiveHalt.d.ts +5 -153
- package/dist/interactiveHalt.js +0 -111
- package/dist/interactiveToolsWire.d.ts +0 -62
- package/dist/interactiveToolsWire.js +1 -67
- package/dist/leaderConflict.d.ts +0 -59
- package/dist/leaderConflict.js +0 -48
- package/dist/limitsWire.d.ts +0 -125
- package/dist/limitsWire.js +2 -120
- package/dist/liveInitToolFace.d.ts +0 -77
- package/dist/liveInitToolFace.js +1 -109
- package/dist/liveModelCatalog.d.ts +0 -52
- package/dist/liveModelCatalog.js +0 -48
- package/dist/liveQuestionStore.d.ts +0 -87
- package/dist/liveQuestionStore.js +1 -56
- package/dist/mcpLiveness.d.ts +0 -151
- package/dist/mcpLiveness.js +0 -122
- package/dist/mcpPanel.d.ts +0 -104
- package/dist/mcpPanel.js +0 -49
- package/dist/mcpReconnect.d.ts +0 -58
- package/dist/mcpReconnect.js +0 -69
- package/dist/mcpWireCaps.d.ts +0 -55
- package/dist/mcpWireCaps.js +1 -13
- package/dist/memoryComplianceCapability.d.ts +3 -57
- package/dist/memoryComplianceCapability.js +0 -57
- package/dist/memoryEntriesWire.d.ts +6 -198
- package/dist/memoryEntriesWire.js +0 -144
- package/dist/memoryOriginCapability.d.ts +3 -53
- package/dist/memoryOriginCapability.js +0 -50
- package/dist/memorySpecWire.d.ts +0 -116
- package/dist/memorySpecWire.js +0 -150
- package/dist/model/catalog.d.ts +0 -111
- package/dist/model/catalog.js +0 -87
- package/dist/model/catalogLoader.d.ts +0 -114
- package/dist/model/catalogLoader.js +2 -139
- package/dist/model/modelSupplyRules.d.ts +1 -55
- package/dist/model/modelSupplyRules.js +0 -62
- package/dist/model/providerAuth.d.ts +0 -103
- package/dist/model/providerAuth.js +2 -38
- package/dist/model/providerCatalog.d.ts +0 -45
- package/dist/model/providerCatalog.js +0 -37
- package/dist/model/providerPresets.d.ts +0 -33
- package/dist/model/providerPresets.js +2 -91
- package/dist/model/tierVocabulary.d.ts +0 -31
- package/dist/model/tierVocabulary.js +0 -27
- package/dist/modelBudgetRule.d.ts +0 -39
- package/dist/modelBudgetRule.js +0 -39
- package/dist/modelCapabilityProbe.d.ts +0 -175
- package/dist/modelCapabilityProbe.js +0 -147
- package/dist/modelWireCaps.d.ts +0 -13
- package/dist/modelWireCaps.js +0 -13
- package/dist/notifications.d.ts +0 -233
- package/dist/notifications.js +14 -492
- package/dist/oneShotWireCaps.d.ts +0 -34
- package/dist/oneShotWireCaps.js +0 -35
- package/dist/ownKey.d.ts +0 -33
- package/dist/ownKey.js +0 -33
- package/dist/panelRunningHistory.d.ts +0 -28
- package/dist/panelRunningHistory.js +0 -43
- package/dist/peerFrames.d.ts +0 -71
- package/dist/peerFrames.js +0 -168
- package/dist/peerLaneCapability.d.ts +0 -44
- package/dist/peerLaneCapability.js +0 -52
- package/dist/permissionRuleIssue.d.ts +0 -30
- package/dist/permissionRuleIssue.js +0 -78
- package/dist/permissionRulesWriteCapability.d.ts +0 -46
- package/dist/permissionRulesWriteCapability.js +0 -54
- package/dist/permissionWireCaps.d.ts +0 -37
- package/dist/permissionWireCaps.js +0 -37
- package/dist/postureKnob.d.ts +0 -71
- package/dist/postureKnob.js +0 -86
- package/dist/principalWire.d.ts +0 -17
- package/dist/principalWire.js +0 -17
- package/dist/printToolResultFrame.d.ts +0 -100
- package/dist/printToolResultFrame.js +0 -33
- package/dist/promptProfileWireCaps.d.ts +0 -13
- package/dist/promptProfileWireCaps.js +0 -13
- package/dist/readFacePosture.d.ts +0 -43
- package/dist/readFacePosture.js +0 -46
- package/dist/request/printNotification.d.ts +0 -20
- package/dist/request/printNotification.js +0 -55
- package/dist/request/taskRequest.d.ts +0 -249
- package/dist/request/taskRequest.js +6 -498
- package/dist/resumeRefusalCopy.d.ts +0 -136
- package/dist/resumeRefusalCopy.js +1 -117
- package/dist/retainBackgroundWireCaps.d.ts +0 -48
- package/dist/retainBackgroundWireCaps.js +0 -48
- package/dist/retryStatus.d.ts +2 -221
- package/dist/retryStatus.js +0 -107
- package/dist/rewindWireCaps.d.ts +0 -27
- package/dist/rewindWireCaps.js +0 -24
- package/dist/runCancelContext.d.ts +1 -20
- package/dist/runCancelContext.js +0 -34
- package/dist/runTerminal.d.ts +0 -273
- package/dist/runTerminal.js +0 -177
- package/dist/sandboxWire.d.ts +0 -38
- package/dist/sandboxWire.js +0 -82
- package/dist/scenarioWire.d.ts +0 -60
- package/dist/scenarioWire.js +0 -68
- package/dist/scratchpadWireCaps.d.ts +0 -11
- package/dist/scratchpadWireCaps.js +0 -32
- package/dist/sdkWireTransit.d.ts +0 -38
- package/dist/sdkWireTransit.js +0 -30
- package/dist/seam.d.ts +18 -853
- package/dist/seam.js +0 -52
- package/dist/seatContract.d.ts +0 -555
- package/dist/seatContract.js +5 -304
- package/dist/selfOrchestrationDenial.d.ts +0 -189
- package/dist/selfOrchestrationDenial.js +0 -162
- package/dist/selfOrchestrationWireCaps.d.ts +0 -38
- package/dist/selfOrchestrationWireCaps.js +0 -38
- package/dist/sessionMap.d.ts +0 -60
- package/dist/sessionMap.js +0 -37
- package/dist/sessionMemoryStatus.d.ts +11 -114
- package/dist/sessionMemoryStatus.js +0 -112
- package/dist/sessionModelLatch.d.ts +0 -29
- package/dist/sessionModelLatch.js +0 -40
- package/dist/sessionPolicyCapability.d.ts +3 -53
- package/dist/sessionPolicyCapability.js +0 -52
- package/dist/sessionSlot.d.ts +0 -26
- package/dist/sessionSlot.js +0 -17
- package/dist/skillsWireCaps.d.ts +0 -87
- package/dist/skillsWireCaps.js +0 -38
- package/dist/sqlEngineCapability.d.ts +0 -118
- package/dist/sqlEngineCapability.js +0 -134
- package/dist/sseIdleTriage.d.ts +0 -79
- package/dist/sseIdleTriage.js +1 -80
- package/dist/steering.d.ts +0 -54
- package/dist/steering.js +0 -63
- package/dist/subagent/engineCompactWire.d.ts +0 -34
- package/dist/subagent/engineCompactWire.js +4 -134
- package/dist/subagent/engineDelegatedPrompt.d.ts +0 -31
- package/dist/subagent/engineDelegatedPrompt.js +1 -103
- package/dist/subagent/engineRowStopGate.d.ts +0 -20
- package/dist/subagent/engineRowStopGate.js +0 -49
- package/dist/subagent/engineSubagentOutput.d.ts +0 -7
- package/dist/subagent/engineSubagentOutput.js +1 -51
- package/dist/subagent/engineSubagentResume.d.ts +2 -279
- package/dist/subagent/engineSubagentResume.js +2 -129
- package/dist/subagent/engineSubagentSteer.d.ts +0 -26
- package/dist/subagent/engineSubagentSteer.js +0 -63
- package/dist/subagent/engineSubagentTail.d.ts +0 -38
- package/dist/subagent/engineSubagentTail.js +2 -110
- package/dist/subagent/engineTaskHandleWire.d.ts +6 -67
- package/dist/subagent/engineTaskHandleWire.js +0 -126
- package/dist/subagent/subagentOwnerAbsence.d.ts +0 -2
- package/dist/subagent/subagentOwnerAbsence.js +0 -25
- package/dist/subagentContentStore.d.ts +3 -260
- package/dist/subagentContentStore.js +7 -540
- package/dist/systemReminderTag.d.ts +0 -49
- package/dist/systemReminderTag.js +0 -61
- package/dist/toolResult.d.ts +1 -211
- package/dist/toolResult.js +1 -358
- package/dist/toolRoster.d.ts +0 -140
- package/dist/toolRoster.js +0 -66
- package/dist/typePins.d.ts +0 -46
- package/dist/types/engineState.d.ts +0 -71
- package/dist/types/engineState.js +0 -16
- package/dist/ultracodeWireCaps.d.ts +0 -75
- package/dist/ultracodeWireCaps.js +0 -92
- package/dist/unrefTimer.d.ts +0 -27
- package/dist/webSearchBackendCapability.d.ts +0 -72
- package/dist/webSearchBackendCapability.js +0 -79
- package/dist/webSearchWireCaps.d.ts +0 -37
- package/dist/webSearchWireCaps.js +0 -34
- package/dist/websearch/searchProviderPresets.d.ts +0 -81
- package/dist/websearch/searchProviderPresets.js +0 -27
- package/dist/wireErrorTriage.d.ts +4 -160
- package/dist/wireErrorTriage.js +0 -171
- package/dist/wireRefusalCopy.d.ts +0 -28
- package/dist/wireRefusalCopy.js +0 -28
- package/dist/workflow.d.ts +0 -40
- package/dist/workflow.js +0 -52
- package/dist/workflowClient.d.ts +0 -122
- package/dist/workflowClient.js +8 -360
- package/dist/workflowMonitor.d.ts +2 -72
- package/dist/workflowMonitor.js +0 -26
- package/dist/writeProtectionCapability.d.ts +0 -112
- package/dist/writeProtectionCapability.js +0 -109
- package/docs/INTEGRATION-CLIENTS.md +30 -1
- package/package.json +1 -1
|
@@ -1,127 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* frameRouter — HITL gate 桥**内环**的帧路由(REF-CC-032 / SPLIT-12 第二刀,2026-08-02)。
|
|
3
|
-
*
|
|
4
|
-
* 一帧进、一个 `FrameAction` 出:路由本身不 yield、不读流、不决断,只把「这一帧该怎么处置」表达成
|
|
5
|
-
* 数据。驱动(`askGateWire.bridgeAskUserQuestionGates`)照 action 吐帧 / 结束 / park,外环决断在
|
|
6
|
-
* `parkResolver.ts`。这样内外环对台账的写全部经 `GateLedger` 的动词,不再各自直写同一批容器。
|
|
7
|
-
*
|
|
8
|
-
* 🔴 本文件同时是两把刀的**共享词汇层**:`AskGateWireDeps` / `isAskTool` / 两个 CC 逐字常量 /
|
|
9
|
-
* park 形状谓词都落在这里 —— 它是「内环路由」与「外环决断」都够得着的最低模块(`parkResolver.ts`
|
|
10
|
-
* import 本文件,反向没有边,不成环)。`askGateWire.ts` 原样 re-export 其中的公开面,对外零变化。
|
|
11
|
-
*
|
|
12
|
-
* 🔴 tool_end 的**有序**臂(拆分硬约束):原文 5 条分支的顺序是承重的 ——
|
|
13
|
-
* 分类器 deny(结构性机器签名,比「fs 写报错」更特定)必须先于 fs 的 HOLD/REJECT 分支判。
|
|
14
|
-
* 注册表化之后顺序不再由代码位置显式表达,所以 `TOOL_END_ARM_ORDER` 把顺序写成**数据**,
|
|
15
|
-
* 模块加载期一条断言把两者钉死:重排 `TOOL_END_ARMS` 而不同批改 `TOOL_END_ARM_ORDER` ⇒ 当场抛。
|
|
16
|
-
*/
|
|
17
1
|
import type { AgentEvent } from '@sema-agent/sdk';
|
|
18
2
|
import type { HitlClientLike } from './hitlBridge.js';
|
|
19
3
|
import { type RespondToolApprovalFn, type ToolApprovalFrame, type ToolApprovalFrameLaneOpts, type ToolApprovalFrameOutcome } from './toolApprovalWire.js';
|
|
20
4
|
import type { GateLedger } from './gateLedger.js';
|
|
21
|
-
/**
|
|
22
|
-
* CC `utils/messages.ts` 的 `REJECT_MESSAGE` **逐字**(B7 搬迁差分 2)。deny 后重放 tool_end 的
|
|
23
|
-
* render 面 stamp 用 —— vendored `renderToolUseRejectedMessage` 渲 `User rejected <op> to <path>`。
|
|
24
|
-
* 🔴 pure 门 B7 段:包内冻结字面量(无条件)+ 壳树全树扫描「每一处声明都逐字节相同」(壳树缺席=跳过)。
|
|
25
|
-
*/
|
|
26
5
|
export declare const HITL_REJECT_MESSAGE = "The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.";
|
|
27
|
-
/**
|
|
28
|
-
* CC `utils/messages.ts` 的 `INTERRUPT_MESSAGE_FOR_TOOL_USE` **逐字**(件 B,#323 症状②,2026-08-25)。
|
|
29
|
-
*
|
|
30
|
-
* 🔴 CC 语料直证的两条事实(壳侧勘察,cli `src/utils/messages.ts:216-217` 逐字节同):
|
|
31
|
-
* ① `"Operation aborted"` 在 CC 只在 transport 层 throw,**从不上屏** —— 它是我们这条引擎链
|
|
32
|
-
* 特有的产物,渲成红 `Error: Operation aborted` 是 CC 里根本不存在的形;
|
|
33
|
-
* ② CC 的**唯一**中断呈现形就是本串:壳的 `UserToolErrorMessage` 对
|
|
34
|
-
* `content.includes(INTERRUPT_MESSAGE_FOR_TOOL_USE)` 渲 dim `Interrupted`(CC 2.1.223 逐字判据)。
|
|
35
|
-
* ⇒ 用户中断批的 tool_result 文案在**呈现向**归一到本串,三端就天然拿到 CC 的 Interrupted 形,
|
|
36
|
-
* 不必各自再抄一份「Operation aborted 也算中断」的手工判据(那正是漂移温床)。
|
|
37
|
-
* 🔴 **呈现向,不是模型面**:本包这条链是转录/渲染链;喂回模型的那一份由引擎自己的 wire 承载,
|
|
38
|
-
* 这里一个字节都不碰它。
|
|
39
|
-
*/
|
|
40
6
|
export declare const HITL_INTERRUPT_MESSAGE_FOR_TOOL_USE = "[Request interrupted by user for tool use]";
|
|
41
|
-
/**
|
|
42
|
-
* core 对**被 gate park 的那个 call**(gate 主角)铸的 tool_end 载体(逐字;desktop session-host
|
|
43
|
-
* 真引擎实测同款)。HOLD 谓词锚它做**精确等值** —— 普通工具错的输出是各自的错误文案,永不进 HOLD。
|
|
44
|
-
*
|
|
45
|
-
* 🔴 **勘误(件⑤,2026-08-22,[4970] 真机取证)**:此处原话是「core 对被 gate/**连坐** abort 的
|
|
46
|
-
* call **恒**铸这一串」——对连坐的旁观者**不成立**。core 5.52.0 dist 直证两个短路点两种文案:
|
|
47
|
-
* gate 主角走 abort 早退 = 本串;**执行前被连坐**的旁观者 = `"operation aborted before execution"`
|
|
48
|
-
* (小写 + 后缀)。所以本串只是判据的**兜底臂**(旧 core 唯一的信号),主锚是机读码
|
|
49
|
-
* `gate.parked`——见 {@link isEngineAbortToolEnd}。
|
|
50
|
-
*/
|
|
51
7
|
export declare const ENGINE_ABORT_TOOL_RESULT = "Operation aborted";
|
|
52
|
-
/**
|
|
53
|
-
* tool_end.output 的文本归一(P0 案B,2026-08-03,server 6.0.0 wire 实测):sync leg 的毒化帧
|
|
54
|
-
* `output` 不再是裸 string,而是 content-block 数组 `[{"type":"text","text":"Operation aborted"}]`
|
|
55
|
-
* (8790 裸引擎 POST /v1/tasks/stream 逐帧记录字节形)。abort 标记的**等值锚**必须先归一再比,
|
|
56
|
-
* 否则 6.0.0 下 hold-poison 臂全盲:毒化帧当场上屏 + generic-close 记 ended ⇒ decide 后重放的
|
|
57
|
-
* 真收口帧被 isEnded 早退去重 —— 「按 Yes 屏幕永远停在 Error: Operation aborted」整案复发。
|
|
58
|
-
* 只归一**判定**,帧本身一个字节不改;等值语义不放宽([2084]①-b 收窄仍然成立,负控见 gate ⑩)。
|
|
59
|
-
* 🆕 [C93] 公面导出(0.17.1):web/desktop 被点名「两端务必接」的同款归一各自手抄=漂移温床,
|
|
60
|
-
* 导出做单一真源;签名不变,加导出=additive。
|
|
61
|
-
*/
|
|
62
8
|
export declare function toolEndOutputText(output: unknown): string | undefined;
|
|
63
|
-
/** 本桥消费的 wire 面(@sema-agent/sdk AgentClient 的结构切片,mock 可注入)。 */
|
|
64
|
-
/** L-80:非进展 reattach 的一次用户面告知(命名形,typeshape B4 棘轮:导出签名不带内联匿名对象)。 */
|
|
65
9
|
export interface ParkReattachNotice {
|
|
66
|
-
/** 该臂同因连续第几次。 */
|
|
67
10
|
attempt: number;
|
|
68
|
-
/** 该臂上限(到了就诚实收场)。 */
|
|
69
11
|
max: number;
|
|
70
|
-
/** 真因 token(已解决码 / 传输错类词)。 */
|
|
71
12
|
reason: string;
|
|
72
13
|
}
|
|
73
14
|
export interface AskGateWireDeps {
|
|
74
|
-
/** approvals.list/decide + assistant(HitlBridge 的 client 切片)。 */
|
|
75
15
|
client: HitlClientLike;
|
|
76
|
-
/** GET /v1/runs/:id/events — decide 后的续流 attach(lastEventId 续传)。 */
|
|
77
16
|
runsEvents: (taskId: string, opts?: {
|
|
78
17
|
signal?: AbortSignal;
|
|
79
18
|
lastEventId?: string;
|
|
80
19
|
}) => AsyncGenerator<AgentEvent>;
|
|
81
|
-
/** POST /v1/tool-approvals/:id/respond(server 1.191 同步帧腿,[830]①)。缺省=不消费
|
|
82
|
-
* tool_approval 帧(帧被吞、引擎按自身 fail-closed TTL 自决)——mock/旧引擎路径零影响。 */
|
|
83
20
|
respondToolApproval?: RespondToolApprovalFn;
|
|
84
|
-
/** L-80(2026-09-03,[6215]):**非进展** reattach 的用户面告知口 —— 每一轮「引擎重放了同一张 park /
|
|
85
|
-
* decide 出站瞬断耗尽」而壳只能再附着一次时调一次(`attempt`=该臂同因连续第几次,`max`=该臂上限,
|
|
86
|
-
* `reason`=真因 token)。缺席 = 只留 debug 行(修前形:24 轮空转用户零告知)。进展轮**不**调。 */
|
|
87
21
|
onParkReattach?: (e: ParkReattachNotice) => void;
|
|
88
|
-
/** #229 respond-note 供给链(0.29.0 发包扫描门修,2026-08-12):帧腿车道参数(能力位读数),
|
|
89
|
-
* 宿主从自己的 caps 缓存供给。缺席 = note 门 fail-closed 到「不发」侧(决断照常,现状字节
|
|
90
|
-
* 不变)—— 此前包内唯一生产调用点(routeFrame 的 tool_approval 臂)无此位,note 恒不发。
|
|
91
|
-
* ⚠️ **本位早已不只管 note**(0.43.0 订正,异源对抗复审五轮 [medium]:上句的「note 门」措辞
|
|
92
|
-
* 是 0.29.0 的历史射程,再留着会让宿主以为不接这个字段只损失一条备注)。`ToolApprovalFrameLaneOpts`
|
|
93
|
-
* 今天携带**四位**,缺席各有各的后果:`approvalDecisionNoteCapable`(备注不发)·
|
|
94
|
-
* `respondFreeFormRulesCapable`(**编辑臂**整条不发)· `respondBatchRuleOffersCapable`
|
|
95
|
-
* (**批臂**整条不发)· `windowIsCurrent`(窗三键不过境 ⇒ 卡上无倒计时)。后两位缺席时,人在卡上
|
|
96
|
-
* 按下的「不再询问」会被整条丢弃(决断照送 + 一条 `surfaceRuleArmNotSent` 通知)—— 逐位语义见
|
|
97
|
-
* 各自的 JSDoc 与 `docs/INTEGRATION-CLIENTS.md` §5b。 */
|
|
98
22
|
approvalLane?: ToolApprovalFrameLaneOpts;
|
|
99
|
-
/**
|
|
100
|
-
* 0.74.1(CC-68)—— 流内帧腿的**结局回交**:每次 `tool_approval` 帧经卡口决断后调一次(帧 + {@link ToolApprovalFrameOutcome}),
|
|
101
|
-
* 宿主据此直接判「这一发落没落定」(孤儿认领回收不必再靠间接判据)。缺席零变化;抛错 / reject 被吞。
|
|
102
|
-
*/
|
|
103
23
|
onToolApprovalOutcome?: (frame: ToolApprovalFrame, outcome: ToolApprovalFrameOutcome) => void | Promise<void>;
|
|
104
24
|
}
|
|
105
|
-
/** 两族 gate:AskUserQuestion 走问答 overlay(原路);其余(fs 写三件 / Bash / 一等
|
|
106
|
-
* `kind==='tool_approval'`)走 CC 三选卡。 */
|
|
107
25
|
export type GateKind = 'ask' | 'fs';
|
|
108
|
-
/** park 请求:内环遇 gate 时带出去给外环决断。 */
|
|
109
26
|
export interface GatePark {
|
|
110
27
|
gate: GateKind;
|
|
111
|
-
/** sync leg 的 `done{suspended}` 终帧 —— fail-soft 回退时原样吐回去(durable leg 的 park 无此帧)。 */
|
|
112
28
|
pendingDone?: AgentEvent | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* 这张 park 的**待批 call 身份**(server ≥7.41.0,[4913]/[4914] 请托① 到货件)。
|
|
115
|
-
* 供给见 {@link parkGatedCallId};消费者今天只有一个:`parkResolver` 决断成功臂的
|
|
116
|
-
* `dropHeldForDecidedPark` —— 它此前只能拿 `findPendingForTask` 那个**卡面渲染宽口**当身份,
|
|
117
|
-
* 同族多行排队时会摘错 call 的扣留帧([4933] 立案的存量)。
|
|
118
|
-
* 🔴 缺席是**常态**(旧引擎 / tool-less park / 键畸形),消费方必须自带无身份也能走的臂。
|
|
119
|
-
* 🔴 刻意**不**喂给 `#324` 的连坐判别子:那条判据的换锚是独立一件事(S3/S33 的「已知局限锁」
|
|
120
|
-
* 断言到时会翻红 = 点亮信号),两件事混在一起改就分不清谁引入了假阳。
|
|
121
|
-
*/
|
|
122
29
|
gatedCallId?: string | undefined;
|
|
123
30
|
}
|
|
124
|
-
/** 帧路由的产物:驱动只认这四种,自己不再判帧型。 */
|
|
125
31
|
export type FrameAction = {
|
|
126
32
|
kind: 'yield';
|
|
127
33
|
events: readonly AgentEvent[];
|
|
@@ -136,8 +42,6 @@ export type FrameAction = {
|
|
|
136
42
|
kind: 'end';
|
|
137
43
|
events: readonly AgentEvent[];
|
|
138
44
|
};
|
|
139
|
-
/** 跨刀共享的可变标量(`realTaskId`):sync leg 从 `done{suspended}` 捕获、外环 attach 时读。
|
|
140
|
-
* 显式 ref 传参而不是让两把刀各存一份 —— 两份会在 durable 腿上分叉。 */
|
|
141
45
|
export interface TaskIdRef {
|
|
142
46
|
current: string | undefined;
|
|
143
47
|
}
|
|
@@ -147,50 +51,12 @@ export interface FrameRouterCtx {
|
|
|
147
51
|
taskId: TaskIdRef;
|
|
148
52
|
signal?: AbortSignal | undefined;
|
|
149
53
|
}
|
|
150
|
-
/** 上者的**窄口**(`findPendingForTask` 的 gate 过滤谓词签名)—— 出境的那一版不吃 `unknown`:
|
|
151
|
-
* 边界层的 unknown 在本模块里窄化完再跨模块(typeshape 门 B2 的纪律)。 */
|
|
152
54
|
export declare function isAskTool(toolName: string | undefined): boolean;
|
|
153
|
-
/** 这一帧是不是「host lane 的模型推进」= 扣留帧的放行信号。 */
|
|
154
55
|
export declare function isHostProgressFrame(ev: AgentEvent): boolean;
|
|
155
|
-
/** {@link flushHeldWithInterruptRewrite} 的出口证据(三腿,全是结构事实;缺席即不改写)。 */
|
|
156
56
|
export interface HeldFlushInterruptEvidence {
|
|
157
|
-
/** 本出口手上的终帧(有就读它的 cancel 码);中途出口/无终帧路径传 `undefined`。 */
|
|
158
57
|
terminal?: AgentEvent | undefined;
|
|
159
|
-
/** 宿主的 turn 中断信号。 */
|
|
160
58
|
signal?: AbortSignal | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* **这张 park 是被用户中断掉的**(`GateOutcome.kind === 'aborted'`)—— 唯一写者 =
|
|
163
|
-
* `parkResolver` 的 fail-soft 出口。该 outcome 在包内的语义就是逐字的「turn 被中断(Esc/Ctrl+C)」
|
|
164
|
-
* (见 `toolApprovalWire` 同臂:它顺带用一次 TOOL 级 deny `reason:'Interrupted by user'` 把
|
|
165
|
-
* 挂着的门结算掉),所以它是**关于这张 park 本身**的一手中断证据,不是推断。
|
|
166
|
-
*/
|
|
167
59
|
gateAbortedByUser?: boolean | undefined;
|
|
168
60
|
}
|
|
169
|
-
/**
|
|
170
|
-
* `led.flushHeld()` 的**唯一**排水出口包装:用户中断批把毒化帧的 `output` 归一成 CC 的中断形
|
|
171
|
-
* ({@link HITL_INTERRUPT_MESSAGE_FOR_TOOL_USE}),其余一切原样。
|
|
172
|
-
*
|
|
173
|
-
* ── 判词(两模,别合并;方向一律 fail-safe:证据不足就走原路)──────────────────────────────
|
|
174
|
-
* · **模 A —— 纯用户中断批**(证据 = cancel 终帧码 / 宿主 `signal.aborted`):要求 **本批零 park
|
|
175
|
-
* 登记**(`hasBatchPark() === false`),且帧上 `errorCode !== "gate.parked"`。两道门都是同一件事
|
|
176
|
-
* 的两个面 ——「这一批背后没有任何门」才谈得上纯中断;有门而我们只看见 abort 帧 = 判不出,不改。
|
|
177
|
-
* · **模 B —— 门被用户中断**(证据 = {@link HeldFlushInterruptEvidence.gateAbortedByUser}):
|
|
178
|
-
* park 在场是**前提**而不是障碍,所以模 A 的两道门在这一模下**都让位** —— 包括
|
|
179
|
-
* `gate.parked` 那一票。理由:该码回答的是「这次调用为什么中止 =被门 park 了」,回答不了
|
|
180
|
-
* 「这一批为什么收场 = 用户按了 Esc」,两者正交;拿它做否决会把这一格里**最该显形的那张
|
|
181
|
-
* 主角卡**留成红 `Error: Operation aborted`(真机复现:审批卡挂着按 Esc,主角与连坐帧同文案)。
|
|
182
|
-
* 🔴 **gate deny 语义零变**:deny 走的是 `decided` 分支(→ 续流重放 → `denied-call`/`deny-stamp-next`
|
|
183
|
-
* 两臂 stamp CC REJECT 文案),那两臂排在 hold-poison **之前**、帧根本不进扣留表,本包装够不着。
|
|
184
|
-
* fail-soft 的其余原因(no_pending / 传输失败 / hop 用尽)三腿全不命中 ⇒ 诚实红照旧。
|
|
185
|
-
*
|
|
186
|
-
* 🔴 **只改 `output` 一个键**:`isError` / `errorCode` / `toolCallId` / `toolName` / `gate` /
|
|
187
|
-
* `delivered` / `gatedCallId` / `structured` 以及 `flushHeld` 自己盖的
|
|
188
|
-
* `_sema_collateral_abort` 机读位全部原样过境(展开赋值只覆盖 `output`)—— 端侧的连坐折叠锚的是
|
|
189
|
-
* 机读位不是文案,所以折叠语义不受影响,只是被折那一行的正文换成了 CC 中断形。
|
|
190
|
-
*/
|
|
191
61
|
export declare function flushHeldWithInterruptRewrite(led: GateLedger, evidence: HeldFlushInterruptEvidence): Generator<AgentEvent>;
|
|
192
|
-
/**
|
|
193
|
-
* 一帧 → 一个处置。手柄的**先后**与原文逐条同序:tool_approval 帧 → tool_start → tool_end →
|
|
194
|
-
* suspended → done → failed → 透传。
|
|
195
|
-
*/
|
|
196
62
|
export declare function routeFrame(ev: AgentEvent, ctx: FrameRouterCtx): Promise<FrameAction>;
|