@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
package/dist/imagesWireCaps.js
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ⇄ B2 批搬迁(2026-07-27,多端改造设计稿 §3 B2):cli src/sema/imagesWireCaps.ts 逐字搬入(零依赖)。
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* src/sema/imagesWireCaps.ts — PURE projection of a CC user message's IMAGE content blocks → engine ImageInput[]
|
|
6
|
-
* (CC paste-image / drag-image parity). seamQuery imports it.
|
|
7
|
-
*
|
|
8
|
-
* The signature "壳渲染后端空" hole: REPL.tsx:3444 builds Anthropic image blocks
|
|
9
|
-
* { type:'image', source:{ type:'base64', media_type, data } } (or { type:'url', url })
|
|
10
|
-
* into the user message's `content` block array, but seamQuery.objectiveFromMessage kept ONLY `type==='text'`
|
|
11
|
-
* blocks — so pasted images RENDERED but never reached the live engine. core/service already consume
|
|
12
|
-
* `body.images` (main.ts:1296 → core `TaskSpec.images?: ImageInput[]`, types.ts:416 + brain toUserBlocks); this
|
|
13
|
-
* is purely the missing shell-side projection. config-class (model-content the caller chose for their OWN turn).
|
|
14
|
-
*
|
|
15
|
-
* core ImageInput = `{ data: base64, mimeType } | { url }`. We map the Anthropic base64 source
|
|
16
|
-
* (`source.media_type`/`source.data`) → `{ data, mimeType }`, and a url source → `{ url }`.
|
|
17
|
-
*/
|
|
18
|
-
/** Map one Anthropic image block's `source` → ImageInput, or null if malformed/unsupported. */
|
|
19
1
|
function sourceToImageInput(source) {
|
|
20
2
|
if (typeof source !== 'object' || source === null)
|
|
21
3
|
return null;
|
|
@@ -28,10 +10,6 @@ function sourceToImageInput(source) {
|
|
|
28
10
|
}
|
|
29
11
|
return null;
|
|
30
12
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Extract the IMAGE blocks of a CC user message → ImageInput[]. Reads `message.content` (string | block[]) the
|
|
33
|
-
* same way objectiveFromMessage reads its text; a bare-string content has no images ⇒ []. Malformed blocks drop.
|
|
34
|
-
*/
|
|
35
13
|
export function imagesFromMessage(msg) {
|
|
36
14
|
const m = msg;
|
|
37
15
|
const content = m?.message?.content ?? m?.content;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,137 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @sema-agent/client-core — 客户端会话运行时(sema wire → CC 会话词汇表 + 端无关会话逻辑)。
|
|
3
|
-
* 定位公理:[1832](CC 皮肤形状全收本包、wire 保持中性;TUI/web/桌面共用同一个包)。
|
|
4
|
-
* seam 设计对签:[1651]/[1652]/[1653];依赖方向:sdk(wire)+agent-types(词汇表)→ 本包,永不反向。
|
|
5
|
-
* 沿革:@sema-agent/wire-cc-adapter 0.1.0 = seam 类型 + id 确定性派生 + 首批踩坑纯函数;
|
|
6
|
-
* 0.1.2(#52a)= adapt() 管线首批(纯投影臂全落 + 壳态耦合臂投影成 ChromeEvent + 差分守卫);
|
|
7
|
-
* 0.2.0 = 迁入 sema-client-core 独立仓并改名(旧 npm 名 deprecate 指本包);
|
|
8
|
-
* 0.10.0 = **B8 批**(搬迁总线**末批**,设计稿 §8-5「print lane 收编」):
|
|
9
|
-
* ① **请求拼装合一收官**:B4 建的 `buildTaskRequest(input, lane)` 从此是 print lane
|
|
10
|
-
* (`seamQueryEngine.ask`)的**唯一**构造口 —— 壳里那份「`-p` 自己另拼一份」的字面量废除;
|
|
11
|
-
* 车道差异全在 `REQUEST_FIELD_MATRIX`(print 独有 finalVerification/limits/interactiveTools、
|
|
12
|
-
* TUI 独有 ultracode 等,逐条带理由与 `gap` 判断)。新增可执行判据 `unregisteredRequestKeys`
|
|
13
|
-
* —— **真上 wire 的那份**请求也要过表,再漏一个键就当场红(表以前只管得住构造器自己)。
|
|
14
|
-
* ② **`task_notification` 字段集合一**(`request/printNotification.ts`):print 出口帧与交互面
|
|
15
|
-
* 共用 `normalizeTaskNotification` 这**一把闸**(空 task_id 丢帧 / summary 兜底 / status 回落),
|
|
16
|
-
* 并补上**残局归因**(stoppedBy / resumable / partial / exitCode / diagnostics / result /
|
|
17
|
-
* lines / recentSteps / editedFiles / task_type / source / seq / injected)—— 修前这些位在
|
|
18
|
-
* `-p` 出口整段丢失,而 `-p` 恰恰是唯一没有人当场看着的车道。🔴 车道差异只剩 `status` 的
|
|
19
|
-
* killed⇒stopped 一条(CC 187 print 出口形,表里留注);去重键不出第二个名字,print 侧那份
|
|
20
|
-
* 手写算法废除,直接用 `taskNotificationDedupKeyFromWire`。
|
|
21
|
-
* ③ **留壳**(§8-5 明写,本批一行没动):`PrintStreamProjector`(stream-json 帧序/SSE 重铸)与
|
|
22
|
-
* 全部 stderr 分诊文案 —— 渲染面与人话面属端。
|
|
23
|
-
* 0.9.0 = **B7 批**(设计稿 §3 B7「完成事件单一权威 + HITL」):
|
|
24
|
-
* ① **HITL 族四件**(新目录 `hitl/`):`hitlBridge`(整搬,🔴 **D-1 两元组 verbatim 回显**
|
|
25
|
-
* 与「409 绝不自动重试」两段**逐字节**搬,pure 门 B7 段用冻结字面量 + 壳树双向对拍 +
|
|
26
|
-
* 毒化行为口径三重钉)· `toolApprovalWire`(**拆**:判定/编排进包,三选卡本体经
|
|
27
|
-
* `ApprovalCardPort` 留端)· `askGateWire`(整搬;footer 通知与 Recent Denials 记账经
|
|
28
|
-
* `HitlHostSurface` 留端)· `planReviewWire`(整搬,**第七份 `wireConfig()` 收编闭合**)。
|
|
29
|
-
* ② **完成事件族 T2/T3**:`taskNotificationDedupKeyFromWire`(裸 wire 载荷键形)+
|
|
30
|
-
* `parseTranscriptNotificationSeeds` / `seedTaskNotificationDedupFromTranscript`
|
|
31
|
-
* (#63 resume 回植的 XML 反解)搬入 `notifications.ts`。**P1-3 未到货 ⇒ 只搬不删**,
|
|
32
|
-
* 四道去重原样;退役条件登记进 `compensations.ts`(T1/T2/T3/T25/T53 五条)。
|
|
33
|
-
* ③ **`approvals.stream()` 换轮询**(census G20):`hitl/approvalsFeed.ts` —— SDK 原生推送优先、
|
|
34
|
-
* 断流/无端点**回落轮询**的韧性臂保留;两条腿都收敛到「非 heartbeat 事件 ⇒ 重取权威
|
|
35
|
-
* `list()`」(SDK 自述 payload 是 FORWARD-DRAFT,绝不信未确认的 delta 形)。
|
|
36
|
-
* 🆕 队列口新增**可选**动词 `enqueueMetaPrompt`(plan_review 结局回植;既有宿主不破)。
|
|
37
|
-
* 0.8.0 = **B6 批**(设计稿 §3 B6,分两轮落):
|
|
38
|
-
* ——【前半,fleet/子代身份族】fleetClient 沿 §2.5 拆两半(帧体归库、连接归端):
|
|
39
|
-
* `fleet/fleetProjection` + `fleet/fleetLedger` · 子代 wire 族六件(`subagent/*`)·
|
|
40
|
-
* `engineSessionParam`(走新 `SessionPort`)· `engineWireTarget`(七份手抄 `wireConfig()` 收编
|
|
41
|
-
* 前六份,第七份 `planReviewWire` 属 B7)· G13 taskStop 409 五形 typed · Path B 记号时序修。
|
|
42
|
-
* ——【后半,余项收官】① `detachWire` **拆**搬(判定 + cancel-arm 台账进包,信号路径的裸 fetch
|
|
43
|
-
* 发射留宿主 —— 宪法例外 census C1-4;宿主取件口 `detachCancelArm()`)· `workflowClient` 整搬
|
|
44
|
-
* (投影器 + live 源)· `workflowMonitor` 契约(六个类型 + WPe,此前住在 TUI 渲染件里);
|
|
45
|
-
* ② **P4 残件三**:`hooksWireCaps`(SettingsPort 的第一个真消费者;port 缺席 = 整体 fail-closed)·
|
|
46
|
-
* `liveInitToolFace`(凭证换 §8-2 的 `resolveWireAuth`,三条动态 import 转静态)·
|
|
47
|
-
* **model 数据表**(`model/providerPresets.{ts,json}` + `modelFamilies.json` —— `modelBudgetRule`
|
|
48
|
-
* 封顶① 的 `perModelCap` 的唯一来源;单一真源三锚见 model/providerPresets.ts 头注);
|
|
49
|
-
* ③ **P5**:T32/T34/T47/T48/T49(整条进包)与 T35/T36/T44(拆)逐条核实并配断言,新出
|
|
50
|
-
* `compensations.ts` 登记表(自检口 `compensationSplitViolations()` 恒应为空)+ **P1-2 归属回落
|
|
51
|
-
* 定案**(FIFO 回落**不删** = tolerate-absent 保护臂;typed 双键在场恒赢已成对反钉;退役条件
|
|
52
|
-
* 钉在达标线 ≥ server 1.290)。
|
|
53
|
-
* ⚠️ B6 落码事实更正:P5 那八条的**落码全在 B4**,B6 做的是核实 + 登记 + 定案,不是二次搬迁。
|
|
54
|
-
* 0.7.0 = **B5 批**(设计稿 §3 B5):① **配对台账折回**([1857] —— 0.6.0 把 `notifiedRuns`/
|
|
55
|
-
* `cardEnqueuedRuns` 放适配器实例,与清账/记账的另一半不共享前提 = 双卡/UI 零显示/模型二收,
|
|
56
|
-
* 本批整体折回 notifications.ts 的 module 台账);② **B/D/E 层搬入**(`toolResult.ts`:
|
|
57
|
-
* structuredToToolUseResult 14 case + wireOutputToBody 3 臂 + E 层 4 臂),`adapt()` 从此
|
|
58
|
-
* 自己铸 `tool_result` 卡与两处开卡兜底;③ **structured 白名单吃现货**([1840]§一 30 项 ——
|
|
59
|
-
* 在场则 T11/T14 正则退位、T24 的 B 层惰性退位,缺席保回落,退位由**调用计数器**钉死);
|
|
60
|
-
* ④ **T7 诚实缺席**(§8-4:不搬 mock 合成器,改 `_sema_degraded:'wire_carried_no_output'`)与
|
|
61
|
-
* **T20 diff hunks 进包**(`diff/patch.ts`,本包**第一个** runtime dep `diff`)。
|
|
62
|
-
* 🆕 两个 chrome 臂:`bgshell_register`(#117a 判定在库、执行留宿主)· `task_ledger_sync{source:'structured'}`。
|
|
63
|
-
* 0.6.0 = **B4 批**(设计稿 §3 B4):A 层帧分派**收官**(第 14 臂 `task_progress` + 行绑定/
|
|
64
|
-
* inline stats/alias/#6 常驻台账/SubagentStart/workflow lane 三级门 + `settlePanelTasks` 三处 sweep
|
|
65
|
-
* 全接线)· P0-2 tool label 侧信道补漏(0.5.0 真缺口)· **请求面合一**(`request/taskRequest.ts`:
|
|
66
|
-
* 三个构造器的字段集与合并语义收成一份,车道差异做成 `REQUEST_FIELD_MATRIX` 数据表)·
|
|
67
|
-
* §8-2 构造点收编(`resolveWireAuth`)· §8-1 verb 门面接口定型(`ClientSliceLike` + `CLIENT_VERBS`,
|
|
68
|
-
* **编译期**双向闭合门)· `CHROME_ARMS` 覆盖率出口 · 包级宿主装配 `installHost()`(settings/fs/
|
|
69
|
-
* queue/timers 四口 + `hostPortMisses()` 自检)· `scratchpadWireCaps` 搬入(FsPort 端到端证明)。
|
|
70
|
-
* 0.5.0 = **B3 批**(设计稿 §3 B3):`AdapterContext` 扩容(log/probe/signal/setTimer/clearTimer/
|
|
71
|
-
* coalesceIntervalMs,**只加可选位 = minor 不 BREAKING**)· 适配内核搬入(`adapter/types` 运行时
|
|
72
|
-
* 半场 + `adapter/downstream` 三件 + `adapter/runStream`)· runStream **两条外向边切除**
|
|
73
|
-
* (lastTurnUsageStore / planReviewWire ⇒ `last_turn_usage` / `plan_review_park` 两个 chrome 臂)·
|
|
74
|
-
* T38 三清第三清 + T40 IDLE-FLUSH + T57 第五处断闸 + T58 iterator cleanup + T59 abort + T60 收尾腿。
|
|
75
|
-
* 🆕 第三道守卫 `scripts/run-client-core-portability-test.mjs`(内核闭包 1571 文件 → **6 文件**)。
|
|
76
|
-
* 0.4.0 = **B2 批**(设计稿 §3 B2):通知族三文件合并进 notifications.ts(engineTaskNotification 全文 +
|
|
77
|
-
* taskNotificationErrorSupplement 全文 + hookNoticeStore 判定半场)· 17 个 `*WireCaps` + engineWireSdk +
|
|
78
|
-
* sseIdleTriage + classifierVerdictWire 判定半场 + controlRouter + 模型面纯逻辑 4 件 + 新写 hostEnv;
|
|
79
|
-
* 宿主耦合的 6 件(hooksWireCaps/scratchpadWireCaps/liveInitToolFace/engineSessionParam/
|
|
80
|
-
* modelContextResolver/agentModelResolver)**本批不搬**,原因逐条见交接报告。
|
|
81
|
-
* 0.3.0 = **B1 批**(多端改造设计稿 §3 批次表第二批):纯函数/台账 11 文件 + 1 纯类型文件搬入
|
|
82
|
-
* (壳侧 shim 替换随后批)。B1 只搬现行为、零收编、零行为改动;唯一的形状订正是 workflow.ts
|
|
83
|
-
* 补齐 `agent_runs[].errorCode` 类型位(0.2.0 抄件漏项)。
|
|
84
|
-
*
|
|
85
|
-
* 🔴 **单实例纪律**(B1 起本包不再只有纯函数):下列模块持 module 级可变状态,写方与读方必须解析到
|
|
86
|
-
* **同一个包实例** —— 壳侧本地旧副本与 npm 包同时进 bundle = 状态分裂(台账写进一份、读另一份,
|
|
87
|
-
* 症状是「台账恒空」的静默失效,不报错)。清单见各文件头 🔴 段:
|
|
88
|
-
* workflow.ts(workflowAgentTaskIds)· subagentContentStore.ts · engineAgentPanelStore.ts ·
|
|
89
|
-
* fleetAgentPanelProjection.ts · liveQuestionStore.ts · engineInlineTaskStats.ts ·
|
|
90
|
-
* engineCapsCache.ts · engineToolLabelStore.ts
|
|
91
|
-
* —— B2 新增:notifications.ts(11 个通知台账 + 队列 port + 两个 probe 槽)·
|
|
92
|
-
* agentsWireCaps.ts(prepare 缓存/投影闭包/一次性告警集)· liveModelCatalog.ts(目录 + refresher)·
|
|
93
|
-
* sessionModelLatch.ts(三个 latch)· ultracodeWireCaps.ts(sticky preset)。
|
|
94
|
-
* —— B4 新增:scratchpadWireCaps.ts(`ensured` 建目录闩)· host.ts(宿主口装配 + miss 计数);
|
|
95
|
-
* 适配器**实例级**(非 module 级)新增 `firedSubagentStartHookTaskIds`——cli 那份是 module 级,
|
|
96
|
-
* 本包放实例级是**有意的**(多 session 宿主上 module 形会让两个会话互吞 SubagentStart,见 DIVERGENCE-6)。
|
|
97
|
-
* —— B3 新增:adapter/runStream.ts(`inFlightTurns` 计数,读口 `isRunStreamActive()`;
|
|
98
|
-
* 两份实例 = 引擎滚动升级门恒读 false ⇒ **turn 中途热换引擎**,正是它当初要防的事)。
|
|
99
|
-
* —— B6 新增(前半):fleet/fleetLedger.ts(`liveBgViews`;两份 ⇒ 引擎温切门恒读空 ⇒ respawn
|
|
100
|
-
* 静默杀掉在飞 bg 子代)· subagent/engineDelegatedPrompt.ts(`transcriptIdByTask`;两份 ⇒
|
|
101
|
-
* Prompt 段恒留白而两边代码看着都对)· engineWireTarget.ts(`installed`)。
|
|
102
|
-
* —— B6 新增(后半,按「两份实例会怎样」从重到轻排):
|
|
103
|
-
* · **hooksWireCaps.ts**(`wireSessionStopHookPrompt` + `wireSessionStopHookCcSemantics`)——
|
|
104
|
-
* 写方 = `/goal` 命令层,读方 = 每 turn 的请求构造期 `hooksForWire()`。两份 ⇒ 目标设了、
|
|
105
|
-
* 投不出去,**而两边代码看着都对**(与 fleetLedger 同一种静默失效)。
|
|
106
|
-
* · **detachWire.ts**(`cancelArm`)—— 写方 = `-p` 发头那一刻,读方三个:`isDetachArmed`
|
|
107
|
-
* (400 分诊的第一道门)、`detachedTaskId`(分诊文案)、`detachCancelArm`(**宿主发射腿的
|
|
108
|
-
* 取件口**)。两份 ⇒ 头发了但 hint 判不出 + Ctrl+C 取消不掉,两个静默失效各一半。
|
|
109
|
-
* · liveInitToolFace.ts(`cached`)—— 两份只是多探一次 `/v1/capabilities/scenarios/:name`,
|
|
110
|
-
* **不是**静默失效;仍登记,免得下次读表的人以为它没状态。
|
|
111
|
-
* · model/providerPresets.ts(`presetIndexCache`)—— 由不可变 JSON 派生的纯 memo,两份只费内存。
|
|
112
|
-
* —— B7 新增(两条都是**装在一份、读另一份 = 面直接不工作**,比台账分裂更响):
|
|
113
|
-
* · **hitl/toolApprovalWire.ts**(`cardPort` + `cardPortMisses`)—— 写方 = 宿主启动装配
|
|
114
|
-
* `installApprovalCardPort()`,读方 = 两条决断腿。两份 ⇒ `hasApprovalCardPort()` 恒 false ⇒
|
|
115
|
-
* **每一张写权限 gate 都走 fail-closed deny(卡根本不弹)**,而宿主那边"我装了啊"。
|
|
116
|
-
* · **hitl/askGateWire.ts**(`hostSurface` + `hostSurfaceMisses`)—— 写方 = 宿主装配,
|
|
117
|
-
* 读方 = cancel-deny warn 与分类器 deny 记账。两份 ⇒ 那一行 warn 与 Recent Denials 全丢。
|
|
118
|
-
* 🔴 **宿主装配**——B4 起总入口是 `installHost({log,probe,queue,timers,settings,fs,session})`
|
|
119
|
-
* (`installNotificationQueuePort()` 仍是队列的真源出口,`installHost({queue})` 直通它,两者不分裂);
|
|
120
|
-
* 自检口 `hostPortMisses()` 恒应为空对象,非空 = 有口漏装、对应的面已在静默失效。
|
|
121
|
-
* —— B2 起的既有说明:`installNotificationQueuePort()` ——
|
|
122
|
-
* 不装 = task-notification 投递静默丢失(`notificationQueuePortMisses()` 恒应为 0)。
|
|
123
|
-
* —— B3 新增(可选口,缺席 = 对应 UI 面在该宿主上是哑的,不是报错):`ctx.emitChrome`
|
|
124
|
-
* (runStream 的两条切边:statusline 真 usage / plan-review 审批卡)· `ctx.setTimer`
|
|
125
|
-
* (T40 IDLE-FLUSH,不给 = 长工具参数生成期已生成内容仍押到下一帧才上屏)· `ctx.signal`
|
|
126
|
-
* (Esc 中断)· `ctx.log` / `ctx.probe`(诊断面)。
|
|
127
|
-
* —— B6 的两个**计 miss** 口(缺席不是「少个装饰」):`session`(缺 ⇒ durable 子代读面对
|
|
128
|
-
* session-bound run 一律 404 fail-closed)· `settings`(缺 ⇒ `hooksForWire()` 整体 fail-closed
|
|
129
|
-
* 返回 undefined —— 信任门是**安全门**,库不会「读不到策略就照投」)。
|
|
130
|
-
*
|
|
131
|
-
* 🔴 **补偿层账本**(B6 引入):`MIGRATED_COMPENSATIONS` + `compensationSplitViolations()` ——
|
|
132
|
-
* 哪条壳侧补偿拆成了「判定归库 / 执行留宿主」、对面挂在哪个 chrome 臂、上游到货后何时退休,
|
|
133
|
-
* 全做成数据。它**不是** `ADAPTER_DIVERGENCES`(那张表说的是 adapt 与 cli 行为**不同**的地方)。
|
|
134
|
-
*/
|
|
135
1
|
export * from './seam.js';
|
|
136
2
|
export * from './workflow.js';
|
|
137
3
|
export * from './notifications.js';
|