@sema-agent/client-core 0.77.0 → 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 +23 -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 +1 -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 +10 -496
- 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 +11 -65
- package/dist/subagent/engineTaskHandleWire.js +20 -131
- 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 +62 -1
- package/package.json +1 -1
package/dist/effectiveFacts.d.ts
CHANGED
|
@@ -1,62 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* effectiveFacts.ts — 终局回执上两件「引擎生效面」事实的**窄读器**(CC-06 / B-081 包侧半场,0.71.3)。
|
|
3
|
-
*
|
|
4
|
-
* core `TaskResult.effectiveReasoning`(`brain/reasoning.d.ts` `ResolvedReasoning`)与
|
|
5
|
-
* `TaskResult.effectiveMemoryScopes`(`core/task-result.d.ts` 四臂联合)由 server 终帧键集 **verbatim 转发**
|
|
6
|
-
* (`trace/core-keyset-guard.ts` 终帧表 + `observability/run-terminal-log.ts` 两行 `"verbatim"`),但 sdk 的
|
|
7
|
-
* `AgentEvent` d.ts **没建模**这两键 ⇒ 本包按 `_sema_` 超集键投到 CC 形 `result` 上(登记见 `docs/type-superset.json`),
|
|
8
|
-
* 端渲「/effort 有效档」与「记忆面板 memoryless 面」时读它们,不必自己从裸终帧里挖。
|
|
9
|
-
*
|
|
10
|
-
* 🔴 读器纪律(与本包所有 wire 读器同律):坏形 ⇒ **整键不铸**(`undefined`),不折默认档、不折空表;
|
|
11
|
-
* 多余成员不过境(新铸形);`dropped` 只认严格 `true`(core:「Present (true) only when …」never-false)。
|
|
12
|
-
* 纯叶模块:零 import,零 Node 内建(内核闭包不涨)。
|
|
13
|
-
*/
|
|
14
|
-
/** core `ResolvedReasoning` 的窄读视图:请求档 / 生效档 / 分级 / 夹取 / wire 形 / 端点 + 整只被丢的判别位。 */
|
|
15
1
|
export interface EffectiveReasoningView {
|
|
16
|
-
/** 调用方要的档(core `ThinkingLevel`,开集串)。 */
|
|
17
2
|
requested: string;
|
|
18
|
-
/** 映射到端点真实能力后**生效**的档;与 `requested` 不同即 `clamped`。 */
|
|
19
3
|
effective: string;
|
|
20
|
-
/** 端点按分级(而非精确档)接受请求。 */
|
|
21
4
|
graded: boolean;
|
|
22
|
-
/** `effective !== requested`(请求没被精确满足)。 */
|
|
23
5
|
clamped: boolean;
|
|
24
|
-
/** 请求最终走的 wire 形(如 `anthropic-budget` / `openai-effort`)。 */
|
|
25
6
|
format: string;
|
|
26
|
-
/** 端点粗标签(如 `anthropic-messages`)。 */
|
|
27
7
|
endpoint: string;
|
|
28
|
-
/**
|
|
29
|
-
* 在场 = 请求**根本没带**推理参数(模型不声明推理能力 / 档不在契约里 / budget 路径 cap-wins 跳过)——
|
|
30
|
-
* 请求的档被**整只丢掉**,不是被夹取。缺席 = 带了(可能夹取)。
|
|
31
|
-
*/
|
|
32
8
|
dropped?: true;
|
|
33
9
|
}
|
|
34
|
-
/** core `EffectiveMemoryScopes` 四臂联合的窄读视图(端只按 `state` 分臂渲)。 */
|
|
35
10
|
export interface EffectiveMemoryScopesView {
|
|
36
|
-
/** `mounted` = 记忆挂上了;`memoryless` = 该挂没挂上(看 `reason`);`none` = 本就不挂(`no-spec` / `disabled`)。 */
|
|
37
11
|
state: 'mounted' | 'memoryless' | 'none';
|
|
38
|
-
/** `memoryless`:`mount-failed` / `no-backend`;`none`:`no-spec` / `disabled`;`mounted` 缺席。开集透传。 */
|
|
39
12
|
reason?: string;
|
|
40
|
-
/** 记忆契约代际;`none` 臂缺席。 */
|
|
41
13
|
contract?: 'v2' | 'legacy';
|
|
42
|
-
/** 生效的作用域(`mounted` 才非空);坏行逐条丢。 */
|
|
43
14
|
scopes: readonly {
|
|
44
15
|
scope: string;
|
|
45
16
|
origin: 'deployment' | 'request';
|
|
46
17
|
}[];
|
|
47
|
-
/** 写入作用域;`null` = 没有可写的。 */
|
|
48
18
|
writeScope: string | null;
|
|
49
|
-
/** `memoryless` + `mount-failed` 时可能带:已物化的残留路径(非串滤)。 */
|
|
50
19
|
materializedResidue?: readonly string[];
|
|
51
20
|
}
|
|
52
|
-
/** `TaskResult.effectiveReasoning` 的窄读:六键形对得上才铸;坏形 ⇒ `undefined`。 */
|
|
53
21
|
export declare function readEffectiveReasoning(v: unknown): EffectiveReasoningView | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* `TaskResult.effectiveMemoryScopes` 的窄读 —— **按臂**验必需成员、按臂构造允许成员(core `task-result.d.ts` 四臂):
|
|
56
|
-
* · `mounted`:`contract` 必在(v2 | legacy);`scopes` 数组(坏行逐条丢);`writeScope` 串或 null;不带 reason / residue;
|
|
57
|
-
* · `memoryless`:`reason` ∈ {mount-failed, no-backend} 必在;`scopes` 必为空数组;`writeScope` 必为 null;`contract` 可选;
|
|
58
|
-
* `materializedResidue` 只在 mount-failed 臂过境(非串滤);
|
|
59
|
-
* · `none`:`reason` ∈ {no-spec, disabled} 必在;`scopes` 空、`writeScope` null;不带 contract / residue。
|
|
60
|
-
* 结构不成立 ⇒ `undefined`(整键不铸);臂外成员不过境。
|
|
61
|
-
*/
|
|
62
22
|
export declare function readEffectiveMemoryScopes(v: unknown): EffectiveMemoryScopesView | undefined;
|
package/dist/effectiveFacts.js
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* effectiveFacts.ts — 终局回执上两件「引擎生效面」事实的**窄读器**(CC-06 / B-081 包侧半场,0.71.3)。
|
|
3
|
-
*
|
|
4
|
-
* core `TaskResult.effectiveReasoning`(`brain/reasoning.d.ts` `ResolvedReasoning`)与
|
|
5
|
-
* `TaskResult.effectiveMemoryScopes`(`core/task-result.d.ts` 四臂联合)由 server 终帧键集 **verbatim 转发**
|
|
6
|
-
* (`trace/core-keyset-guard.ts` 终帧表 + `observability/run-terminal-log.ts` 两行 `"verbatim"`),但 sdk 的
|
|
7
|
-
* `AgentEvent` d.ts **没建模**这两键 ⇒ 本包按 `_sema_` 超集键投到 CC 形 `result` 上(登记见 `docs/type-superset.json`),
|
|
8
|
-
* 端渲「/effort 有效档」与「记忆面板 memoryless 面」时读它们,不必自己从裸终帧里挖。
|
|
9
|
-
*
|
|
10
|
-
* 🔴 读器纪律(与本包所有 wire 读器同律):坏形 ⇒ **整键不铸**(`undefined`),不折默认档、不折空表;
|
|
11
|
-
* 多余成员不过境(新铸形);`dropped` 只认严格 `true`(core:「Present (true) only when …」never-false)。
|
|
12
|
-
* 纯叶模块:零 import,零 Node 内建(内核闭包不涨)。
|
|
13
|
-
*/
|
|
14
1
|
const nonEmpty = (v) => typeof v === 'string' && v.length > 0;
|
|
15
|
-
/** `TaskResult.effectiveReasoning` 的窄读:六键形对得上才铸;坏形 ⇒ `undefined`。 */
|
|
16
2
|
export function readEffectiveReasoning(v) {
|
|
17
3
|
if (typeof v !== 'object' || v === null)
|
|
18
4
|
return undefined;
|
|
@@ -33,14 +19,6 @@ export function readEffectiveReasoning(v) {
|
|
|
33
19
|
}
|
|
34
20
|
const STATES = new Set(['mounted', 'memoryless', 'none']);
|
|
35
21
|
const ORIGINS = new Set(['deployment', 'request']);
|
|
36
|
-
/**
|
|
37
|
-
* `TaskResult.effectiveMemoryScopes` 的窄读 —— **按臂**验必需成员、按臂构造允许成员(core `task-result.d.ts` 四臂):
|
|
38
|
-
* · `mounted`:`contract` 必在(v2 | legacy);`scopes` 数组(坏行逐条丢);`writeScope` 串或 null;不带 reason / residue;
|
|
39
|
-
* · `memoryless`:`reason` ∈ {mount-failed, no-backend} 必在;`scopes` 必为空数组;`writeScope` 必为 null;`contract` 可选;
|
|
40
|
-
* `materializedResidue` 只在 mount-failed 臂过境(非串滤);
|
|
41
|
-
* · `none`:`reason` ∈ {no-spec, disabled} 必在;`scopes` 空、`writeScope` null;不带 contract / residue。
|
|
42
|
-
* 结构不成立 ⇒ `undefined`(整键不铸);臂外成员不过境。
|
|
43
|
-
*/
|
|
44
22
|
export function readEffectiveMemoryScopes(v) {
|
|
45
23
|
if (typeof v !== 'object' || v === null)
|
|
46
24
|
return undefined;
|
package/dist/effortWire.d.ts
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The core ThinkingLevel = the service `reasoningEffort` accept-set (`server.ts:3576`) = the SDK
|
|
3
|
-
* `TaskRequest.reasoningEffort` union. Declared as a literal union (not bare `string`) so the projection's
|
|
4
|
-
* result narrows to exactly what `TaskRequest.reasoningEffort` accepts — a bare `string` would not be
|
|
5
|
-
* assignable to that enum (the false-green tsc hid this; see memory shell-tsc-check-broken-false-green).
|
|
6
|
-
*/
|
|
7
1
|
export type ReasoningEffort = 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
8
|
-
/**
|
|
9
|
-
* Project a picked `EffortValue` (string level | number | undefined) → the wire `reasoningEffort`, or
|
|
10
|
-
* undefined to OMIT. Returns the value verbatim iff it is a core ThinkingLevel; everything else (auto,
|
|
11
|
-
* ultracode, numeric efforts, undefined) → undefined so the engine applies its own default.
|
|
12
|
-
*/
|
|
13
2
|
export declare function effortToReasoningEffort(effort: unknown): ReasoningEffort | undefined;
|
package/dist/effortWire.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
const REASONING_EFFORT_TUPLE = ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
2
|
-
/**
|
|
3
|
-
* 🔴 [2006] B-CC-2(2026-07-29):`new Set<ReasoningEffort>([…])` 只保证「元素合法」,**从不保证
|
|
4
|
-
* 穷举** —— 往 `ReasoningEffort` 加第八档而这里不跟,编译期一声不吭,运行期那一档被
|
|
5
|
-
* `effortToReasoningEffort` 当成非法值 OMIT 掉 ⇒ 用户拨到的档位静默到不了引擎。补的就是
|
|
6
|
-
* 「类型 → 常量」那半边:两个方向的 `Exclude` 都必须塌成 `never`。
|
|
7
|
-
* `Covers`(REF-CC-145/dup-12,P3 wave1 卡C-argv)改吃共用叶 typePins.ts——四份逐字重复钉之一。
|
|
8
|
-
*/
|
|
9
2
|
const _effortPins = [true, true];
|
|
10
3
|
void _effortPins;
|
|
11
4
|
const REASONING_EFFORTS = new Set(REASONING_EFFORT_TUPLE);
|
|
12
|
-
/**
|
|
13
|
-
* Project a picked `EffortValue` (string level | number | undefined) → the wire `reasoningEffort`, or
|
|
14
|
-
* undefined to OMIT. Returns the value verbatim iff it is a core ThinkingLevel; everything else (auto,
|
|
15
|
-
* ultracode, numeric efforts, undefined) → undefined so the engine applies its own default.
|
|
16
|
-
*/
|
|
17
5
|
export function effortToReasoningEffort(effort) {
|
|
18
6
|
return typeof effort === 'string' && REASONING_EFFORTS.has(effort) ? effort : undefined;
|
|
19
7
|
}
|
|
@@ -1,246 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ⇄ B1 批搬迁(2026-07-27,多端改造设计稿 §2.4.1-B):cli src/sema/engineAgentPanelStore.ts 逐字搬入(零 import;壳侧改 re-export)。
|
|
3
|
-
* 🔴 同 subagentContentStore:buffer/listener/residentTaskIds 是单实例语义,发布侧(bridge/fleet
|
|
4
|
-
* 投影)与订阅侧(chrome-agentprogress 的面板 hook)必须同实例,否则事件发进一个副本、面板订另一个。
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* engineAgentPanelStore — dep-free side-channel store bridging ENGINE-side subagent progress
|
|
8
|
-
* (`task_progress` ticks, design/99 MF-10) to CC's CoordinatorTaskPanel (the footer live-agent panel).
|
|
9
|
-
*
|
|
10
|
-
* WHY A STORE (the retryStatusStore / liveQuestionStore pattern): the upstream bridge is a plain
|
|
11
|
-
* generator with no React/AppState access, while the panel reads `AppState.tasks` — so the bridge
|
|
12
|
-
* PUBLISHES neutral events here and a sema-owned hook inside chrome-agentprogress.tsx (already mounted
|
|
13
|
-
* under the footer) SUBSCRIBES and applies them to AppState via registerTask/updateTaskState. CC files
|
|
14
|
-
* stay verbatim; the AppState write side lives in the sema override that owns the panel.
|
|
15
|
-
*
|
|
16
|
-
* WHY THE PANEL (CC-187 parity): a local sync AgentTool renders an inline progress TRAIL from the
|
|
17
|
-
* subagent's real messages. An engine tick carries ONLY rollup numbers ({toolUses, totalTokens}) — the
|
|
18
|
-
* exact shape of CC's `AgentProgress` — and CC's own precedent for out-of-process agents (remote agent
|
|
19
|
-
* tasks) is the TASK PANEL + task-notification, not a synthetic inline trail. Faithful mapping, no
|
|
20
|
-
* fabricated subagent messages.
|
|
21
|
-
*
|
|
22
|
-
* Buffering: ticks published before the panel mounts are buffered (bounded) and replayed to the first
|
|
23
|
-
* subscriber, so early frames in a fast turn aren't lost to mount timing.
|
|
24
|
-
*/
|
|
25
1
|
export type EngineAgentPanelEvent = {
|
|
26
2
|
kind: 'tick';
|
|
27
3
|
taskId: string;
|
|
28
|
-
/** Subagent display name off the wire tick (redacted upstream); absent ⇒ keep taskId. */
|
|
29
4
|
name?: string;
|
|
30
|
-
/** The delegating Task tool_use's `description` (the card title), when the bridge could bind one. */
|
|
31
5
|
description?: string;
|
|
32
|
-
/** The delegated prompt off the bound tool_use input, when present. */
|
|
33
6
|
prompt?: string;
|
|
34
|
-
/** core 1.262.0 [558]B (service 1.154.0 wire) — the child's most recent tool intent as ONE
|
|
35
|
-
* human line ("Bash npm test"), service-redacted. The panel consumer maps it onto the row's
|
|
36
|
-
* `progress.summary` (CC's own live-activity display slot); absent ⇒ slot untouched. */
|
|
37
7
|
currentAction?: string;
|
|
38
8
|
toolUses: number;
|
|
39
9
|
totalTokens: number;
|
|
40
|
-
/**
|
|
41
|
-
* 0.75.1 —— 派生这只子代时**被调用方声明的名字**(wire `task_progress.spawnName`,engine 侧新位)。
|
|
42
|
-
* 🔴 与 `name` 是两位,别合流:`name` 是**展示名**(上游由委派卡的 description 派生),本位是 spawn 时的名字。
|
|
43
|
-
* 🔴 缺席 = **旧形**(产生者还没有这一位)⇒ 键不落,绝不拿展示名冒充。
|
|
44
|
-
*/
|
|
45
10
|
spawnName?: string;
|
|
46
|
-
/**
|
|
47
|
-
* 0.74.3 CC-70:tick 上带的委派卡 id(wire `task_progress.parentToolCallId`,在场才带)—— 身份归一的**退路键**
|
|
48
|
-
* (`transcriptId` 查不到时按它反查 fleet 尾段)。
|
|
49
|
-
*/
|
|
50
11
|
parentToolCallId?: string;
|
|
51
|
-
/**
|
|
52
|
-
* 0.74.3 CC-70(**发布方提示键**,消费端忽略):`true` = 这条 tick 绑在本 turn 一张仍开着的委派卡上(同步委派形)。
|
|
53
|
-
* 身份归一的漏斗据此决定「查不到 fleet 尾段时直发还是缓一拍」:绑卡的子代不会有 fleet 行要等。
|
|
54
|
-
*/
|
|
55
12
|
cardBound?: true;
|
|
56
|
-
/**
|
|
57
|
-
* 0.74.3 CC-70:**归一后**才有 —— 这条事件在 wire 上原来的 `taskId`(引擎 UUIDv7 = transcriptId);
|
|
58
|
-
* `taskId` 已改写成 fleet 行 id 尾段。在场 = 改写过;缺席 = 原样。
|
|
59
|
-
*/
|
|
60
13
|
wireTaskId?: string;
|
|
61
|
-
/**
|
|
62
|
-
* 0.74.3 CC-70:这条 tick 的 `taskId` 是哪一把身份 —— `'fleet-row'` = 已归一到 fleet 尾段(与 fleet-row / 通知 end /
|
|
63
|
-
* 壳本地 agentId 同键);`'wire'` = 反查不到,原样发(同步委派子代 / 老 server 行帧无 transcriptId / fleet 行还没到)。
|
|
64
|
-
* tick 恒带(它只有一个铸点 = task_progress);`end` 只在归一时带。
|
|
65
|
-
*/
|
|
66
14
|
taskIdOrigin?: 'fleet-row' | 'wire';
|
|
67
15
|
} | {
|
|
68
|
-
/**
|
|
69
|
-
* 行帧 lane 投影(2026-07-26 「后台 Agent 子代不进 Background 面板」案)。
|
|
70
|
-
*
|
|
71
|
-
* 一手取证(verify/_bgagent-panel-lane-live-pty.mjs 首跑,engine 1.277.4 真机):两个
|
|
72
|
-
* `run_in_background:true` 的 fork 子代**活跃干活整跑**,`task_progress` tick 探针 **0 条**、
|
|
73
|
-
* fleet 行帧探针 **24 条** —— 父 turn 秒收口即关 SSE,子代的 tick 根本没有通道到壳;行帧
|
|
74
|
-
* lane(常开 fleet stream)才是后台子代唯一在场的 lane。面板的 local_agent 行此前**只**由
|
|
75
|
-
* tick 注册 ⇒ 产品自印的「N background agents launched (↓ to manage)」指向一个看不到它们的
|
|
76
|
-
* 面板(还顺带让 `ctrl+x ctrl+k … stop all agents` 的渲染门在真产品里永不成立)。
|
|
77
|
-
*
|
|
78
|
-
* 为什么是独立事件形而不是复用 'tick':两条 lane 的**可选性**不同 —— tick 的 `toolUses` 是
|
|
79
|
-
* 必填数,行帧的是**可选**位(server 1.278.0 才有,老引擎没有)。复用 tick 会强迫本 lane 在
|
|
80
|
-
* 缺席时编一个 0,把前台子代由真 tick 写进去的进度数字每秒清一次。消费端对本事件的规矩:
|
|
81
|
-
* 只建/只喂**本 lane 亲手建的行**,tick 一到就永久让位(fleetOwnedRowIds 摘除)。
|
|
82
|
-
*/
|
|
83
16
|
kind: 'fleet-row';
|
|
84
17
|
taskId: string;
|
|
85
|
-
/** 行帧 agentType(fleet 行 label 列,如 'fork')→ 行的 agentType。 */
|
|
86
18
|
name?: string;
|
|
87
|
-
/** 行帧投影出的任务描述(如 'alpha-probe')→ 行的 description(面板行 label)。 */
|
|
88
19
|
description?: string;
|
|
89
|
-
/** core 1.429 → server 1.288([1831]②):子代当前工具的结构化形。`toolName` verbatim
|
|
90
|
-
* (查壳工具注册表),`target` 已上游 redact + 300 bound。缺席=旧端或子代从未跑过工具。 */
|
|
91
20
|
currentTool?: {
|
|
92
21
|
toolName: string;
|
|
93
22
|
target?: string;
|
|
94
23
|
};
|
|
95
|
-
/** 行帧累计 token。 */
|
|
96
24
|
totalTokens?: number;
|
|
97
|
-
/**
|
|
98
|
-
* server 1.278.0 起行帧也带的**累计**工具调用数(修「后台子代详情页 tool 计数恒 0」)。
|
|
99
|
-
*
|
|
100
|
-
* 🔴 三态,别写 `?? 0`:
|
|
101
|
-
* · 键在 ⇒ 真值(含真 0 = 引擎说「一个工具都没跑」);
|
|
102
|
-
* · 键不在 ⇒ 老引擎没这个位 = **不知道**,消费端如实留空/保留行上已有值,绝不写 0。
|
|
103
|
-
* 🔴 **累计不是增量**:bg sink 的 usage 是累计口径(与 `turn_end` 的每轮增量相反,后者在
|
|
104
|
-
* upstreamBridge 里要累加)——消费端直接赋值,绝不 `+=`。
|
|
105
|
-
*
|
|
106
|
-
* ⚠️ 时序差(server 主动提醒,不是接错):1.278.0 只在 **bg lane** 上线;workflow/subagent
|
|
107
|
-
* 子代走的 `task_progress`(tick lane)的 `usage.toolUses` 在 core 类型里本来就必填、数据一直
|
|
108
|
-
* 在,只是那条 lane 也没发 —— 已补齐但搭 1.278.0 之后的下一车。所以短期内「有的行有、有的
|
|
109
|
-
* 行没有」是**预期形**,两条 lane 的接线口径已按同一套三态写好。
|
|
110
|
-
*/
|
|
111
25
|
toolUses?: number;
|
|
112
|
-
/**
|
|
113
|
-
* server 1.278.0 `transcriptId`(= core 铸的子代 childSessionId)—— 转录锚,**不是** prompt。
|
|
114
|
-
* 委派 prompt 走它:壳侧凭这个 id 去转录读面取首条 user 消息(engineDelegatedPrompt.ts),
|
|
115
|
-
* 修「详情页 Prompt 段恒空」。缺席 ⇒ 维持现状(诚实留白)。
|
|
116
|
-
*/
|
|
117
26
|
transcriptId?: string;
|
|
118
|
-
/**
|
|
119
|
-
* server 1.250 起行帧带的 launch 真锚(epoch ms)。R4(clay 五报 07-31):此前投影层丢弃它,
|
|
120
|
-
* 详情页 elapsed 只能锚「壳建行时刻」(createTaskStateBase 的 Date.now())——遗留/重挂行上
|
|
121
|
-
* 渲出 1h+ 假时长。消费端拿到即覆盖行的 startTime;缺席 ⇒ 老引擎,维持现状。
|
|
122
|
-
*/
|
|
123
27
|
startedAt?: number;
|
|
124
|
-
/**
|
|
125
|
-
* 0.74.0 —— 这一行的**代际号**(引擎的 stop-cycle 计数;fleet 行帧 `cycleSeq` 与后台通知 `seq` 同域同轴:
|
|
126
|
-
* 首次派发 = 1,每次复活 +1)。消费端把它记在行上,用 {@link isStaleEngineAgentPanelEnd} 判 `end` 是不是上一周期迟到的。
|
|
127
|
-
* 🔴 缺席 = 这一行**没有代际概念**(同步委派子代 / workflow agent / 顶层 run / 老引擎),**不是第一代**。
|
|
128
|
-
*/
|
|
129
28
|
cycleSeq?: number;
|
|
130
|
-
/**
|
|
131
|
-
* 0.74.3 CC-70:行帧上的委派卡 id(sdk `FleetTaskRow.parentToolCallId`,在场才带)—— 与 tick 的同名键是同一把钥匙,
|
|
132
|
-
* 身份归一的退路(`transcriptId` 缺席时凭它把 task_progress 的 UUID 反查到本行)。
|
|
133
|
-
*/
|
|
134
29
|
parentToolCallId?: string;
|
|
135
|
-
/** 0.74.4 CC-83:先发布的键为准 —— 这个子代已按 UUID 上屏时,行帧的 `taskId` 改写成那把 UUID,原尾段进这里;缺席 = 未改写。 */
|
|
136
30
|
wireTaskId?: string;
|
|
137
31
|
taskIdOrigin?: 'wire';
|
|
138
32
|
} | {
|
|
139
33
|
kind: 'end';
|
|
140
34
|
taskId: string;
|
|
141
35
|
isError: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* 0.74.0 —— 这条终态属于**哪一个周期**。同一个 taskId 可以复活;没有周期身份时,上一周期迟到的 `end` 会把
|
|
144
|
-
* 复活后的新一轮结掉。fleet 行车道与通知车道在 wire 给了的时候带;**流内 close 臂没有这个概念,恒缺席**。
|
|
145
|
-
* 读法单源:{@link isStaleEngineAgentPanelEnd}。缺席 ⇒ 判不出 ⇒ 按现行为 settle(不因缺席丢一条真终态)。
|
|
146
|
-
*/
|
|
147
36
|
cycleSeq?: number;
|
|
148
|
-
/** 0.74.0 —— 同上,launch 锚(epoch ms);只有 fleet 行车道带得出。 */
|
|
149
37
|
startedAt?: number;
|
|
150
|
-
/** The subagent's FINAL REPORT — the delegating Task/Agent card's `tool_end.output` text (only the
|
|
151
|
-
* explicit close arm carries it; the defensive sweeps settle without one). The consumer persists it
|
|
152
|
-
* on the row (task.result) + appends it to a live-viewed transcript (拍1 查看态 seed). */
|
|
153
38
|
report?: string;
|
|
154
|
-
/** 0.74.3 CC-70:同 tick 臂 —— 归一后才有(流内 close 臂 / 终态 tick 的 `end` 带的是 UUID,改写成 fleet 尾段时记原词)。 */
|
|
155
39
|
wireTaskId?: string;
|
|
156
|
-
/** 0.74.3 CC-70:归一时带 `'fleet-row'`;0.74.4 CC-83:尾段被改写成先发布的 UUID 时带 `'wire'`(原尾段进 `wireTaskId`);其余不带。 */
|
|
157
40
|
taskIdOrigin?: 'fleet-row' | 'wire';
|
|
158
41
|
} | {
|
|
159
|
-
/** Exception-path safety net (published by seamQuery after every turn, throw or return):
|
|
160
|
-
* the consumer settles ALL rows it owns that are still running. Idempotent. */
|
|
161
42
|
kind: 'sweep';
|
|
162
43
|
};
|
|
163
|
-
/**
|
|
164
|
-
* 两条 lane 对 `toolUses` 的口径(运行期读面,给门用;上面的编译钉保证它没在撒谎)。
|
|
165
|
-
* `required-engine-always-emits` = 缺席不可达 ⇒ 兜底值合法;
|
|
166
|
-
* `optional-tolerate-absent` = 缺席即「不知道」⇒ 必须传播缺席(键不落)。
|
|
167
|
-
*/
|
|
168
44
|
export declare const PANEL_TOOLUSES_LANE_POLICY: Readonly<Record<'tick' | 'fleet-row', string>>;
|
|
169
45
|
export declare function markEnginePanelTaskResident(taskId: string): void;
|
|
170
46
|
export declare function clearEnginePanelTaskResident(taskId: string): void;
|
|
171
47
|
export declare function isEnginePanelTaskResident(taskId: string): boolean;
|
|
172
48
|
type Listener = (ev: EngineAgentPanelEvent) => void;
|
|
173
|
-
/**
|
|
174
|
-
* 0.74.5 CC-87 —— 「这一帧是不是**新周期**」的单源判据(`isStaleEngineAgentPanelEnd` 的对偶,壳侧此前各拼一份):
|
|
175
|
-
* · 两边都带 `cycleSeq` ⇒ **只**比它:不等 ⇒ 新周期;
|
|
176
|
-
* · 否则两边都带 `startedAt` ⇒ 不等 ⇒ 新周期;
|
|
177
|
-
* · 任一边判不出 ⇒ **不是**新周期(这一帧没说,不算变化 —— 方向与陈旧判据相同:缺席不制造周期)。
|
|
178
|
-
* 与缓冲合并屏障(`launchAnchorChanged`)同一条规则;消费端在 `fleet-row` 到时拿行上记的身份与帧上的身份调它。
|
|
179
|
-
*/
|
|
180
49
|
export declare function isNewEngineAgentPanelCycle(prev: EngineAgentPanelCycleIdentity | null | undefined, next: EngineAgentPanelCycleIdentity | null | undefined): boolean;
|
|
181
|
-
/** 周期身份的一格(`end` 事件上的,或消费端记在行上的当前周期)。 */
|
|
182
50
|
export interface EngineAgentPanelCycleIdentity {
|
|
183
51
|
readonly cycleSeq?: number;
|
|
184
52
|
readonly startedAt?: number;
|
|
185
53
|
}
|
|
186
|
-
/**
|
|
187
|
-
* 0.74.0 —— 这条 `end` 是不是**上一周期迟到的**(单源判据,三端共用)。`current` = 消费端记在行上的当前周期
|
|
188
|
-
* (取自最近一条 `fleet-row` 的 `cycleSeq` / `startedAt`)。
|
|
189
|
-
* · 两边都有 `cycleSeq` ⇒ **只**比它:`end` 更小 ⇒ 陈旧;
|
|
190
|
-
* · 否则两边都有 `startedAt` ⇒ `end` 更早 ⇒ 陈旧;
|
|
191
|
-
* · 任一边判不出(流内 close 臂的 `end` / 没有代际概念的行 / 老引擎 / 坏形)⇒ **不陈旧** —— 按现行为 settle。
|
|
192
|
-
* 方向是宁可照旧也不因为缺席丢掉一条真终态。
|
|
193
|
-
* 陈旧的 `end`:忽略(不 settle、不写 report、不摘所有权)。
|
|
194
|
-
*/
|
|
195
54
|
export declare function isStaleEngineAgentPanelEnd(end: EngineAgentPanelCycleIdentity | null | undefined, current: EngineAgentPanelCycleIdentity | null | undefined): boolean;
|
|
196
|
-
/** 缓一拍的节拍上限:别的 fleet-row / end / sweep 每过一条算一拍(别的 tick 不算)。 */
|
|
197
55
|
export declare const MAX_HELD_WIRE_TICK_BEATS = 16;
|
|
198
|
-
/** 身份归一的读数:`taskId` = 该用的键;`origin` = 它是哪一把。 */
|
|
199
56
|
export interface EnginePanelTaskIdentity {
|
|
200
57
|
readonly taskId: string;
|
|
201
58
|
readonly origin: 'fleet-row' | 'wire';
|
|
202
|
-
/** 钥匙上记的周期身份(登记它的那条 fleet-row 带的);`origin:'wire'` 时恒缺席。 */
|
|
203
59
|
readonly cycleSeq?: number;
|
|
204
60
|
readonly startedAt?: number;
|
|
205
61
|
}
|
|
206
|
-
/**
|
|
207
|
-
* 0.74.3 CC-70:把 wire 上的子代 id(task_progress 的 UUID)反查成 fleet 行 id 尾段;`transcriptId` 表优先,退 `parentToolCallId` 表;
|
|
208
|
-
* 都查不到 ⇒ 原样(`origin:'wire'`)。fleet 尾段本身传进来也原样(它就是目标键)。
|
|
209
|
-
*/
|
|
210
62
|
export declare function resolveEnginePanelTaskId(wireTaskId: string, parentToolCallId?: string): EnginePanelTaskIdentity;
|
|
211
|
-
/**
|
|
212
|
-
* 0.74.3 CC-70(异源复审 R3 [high]):按 wire 上的子代 id 清常驻标 —— 原键照清;归一到 fleet 尾段的那把键**只在这条终态属当代时**才清:
|
|
213
|
-
* 复活后迟到的前代终态(旧 UUID 的流内 close / 终态 tick)归一后带旧代际,清了尾段键 = 撤掉复活行的 sweep 保护 ⇒ 下一次 sweep 假结它。
|
|
214
|
-
* 判据与 `end` 的陈旧判据同一只(`isStaleEngineAgentPanelEnd`,拿钥匙上的周期对最近一条行帧的周期);判不出 ⇒ 照清(不因缺席留下永久常驻)。
|
|
215
|
-
* `cycle`(0.74.4):调用方(通知车道)带得出这条终态的周期时传进来 —— 尾段归某把 UUID 所有而通知比所有权旧 ⇒ 不清那把 UUID 的常驻标。
|
|
216
|
-
*/
|
|
217
63
|
export declare function clearEnginePanelTaskResidentByWire(wireTaskId: string, cycle?: EngineAgentPanelCycleIdentity): void;
|
|
218
|
-
/**
|
|
219
|
-
* 测试钩。逐表清单(每加一张表同批更新这里):① 转录钥匙表(UUID → 行尾段)② 父调用钥匙表(parentToolCallId → 行尾段)
|
|
220
|
-
* ③ 缓着的未绑卡 tick ④ 每行最近一次行帧的周期水位 ⑤ 「先发布的键」集合(UUID)⑥ 同上按父调用记的那一份 ⑦ 反向所有权表(行尾段 → UUID)。
|
|
221
|
-
* 🔴 不清:订阅者 / 回放缓冲、常驻标、running 历史(那一本由 `__resetPanelRunningHistoryForTests` 清)。
|
|
222
|
-
* 🔴 连续场景(同一只子代跨多步的用例)**中途别调**:清掉 ④–⑦ 之后,陈旧判据与「先发布的键为准」都会从零开始,前后两半不再是同一段历史。
|
|
223
|
-
*/
|
|
224
64
|
export declare function __resetEngineAgentPanelIdentityForTests(): void;
|
|
225
|
-
/** 宿主的唯一发布口(三条 lane 都经这里):先归一身份,再进主通道(订阅者 / 缓冲)。 */
|
|
226
65
|
export declare function publishEngineAgentPanelEvent(ev: EngineAgentPanelEvent): void;
|
|
227
|
-
/** Single consumer (the panel hook). Replays any buffered events, returns an unsubscribe. */
|
|
228
66
|
export declare function subscribeEngineAgentPanel(fn: Listener): () => void;
|
|
229
|
-
/** 缺席上报的载荷(独立订阅口;**没有** `kind` 位 —— 它不属于主通道联合)。 */
|
|
230
67
|
export interface EngineAgentPanelAbsence {
|
|
231
68
|
taskId: string;
|
|
232
|
-
/** 最后一次在投影里见到这一行的钟(epoch ms)。 */
|
|
233
69
|
lastSeenAtMs: number;
|
|
234
|
-
/** 发出这条上报时已缺席多久(ms;> `ABSENT_SETTLE_MS`)。 */
|
|
235
70
|
absentForMs: number;
|
|
236
|
-
/** 0.74.4 CC-83:`taskId` 被改写成先发布的 UUID 时,原尾段在这里;缺席 = 按尾段发。 */
|
|
237
71
|
wireTaskId?: string;
|
|
238
72
|
}
|
|
239
73
|
type AbsenceListener = (ev: EngineAgentPanelAbsence) => void;
|
|
240
|
-
/** 发布一条缺席上报(由 `projectFleetAgentRows` 的缺席路径调;消费者抛错不反噬投影)。 */
|
|
241
74
|
export declare function publishEngineAgentPanelAbsence(ev: EngineAgentPanelAbsence): void;
|
|
242
|
-
/** 单消费者(面板 hook)。订阅即回放缓冲,返回取消订阅。不订阅 = 行为与 0.72.11 的壳完全相同(行停在最后已知态)。 */
|
|
243
75
|
export declare function subscribeEngineAgentPanelAbsence(fn: AbsenceListener): () => void;
|
|
244
|
-
/** 测试钩:清缺席口的订阅与缓冲。 */
|
|
245
76
|
export declare function __resetEngineAgentPanelAbsenceForTests(): void;
|
|
246
77
|
export {};
|