@sema-agent/client-core 0.93.1 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +554 -0
- package/README.md +89 -55
- package/dist/adapt/arms.js +13 -11
- package/dist/adapt/panelTasks.js +4 -10
- package/dist/adapt/toolCards.js +2 -2
- package/dist/adapt/wireShapes.js +3 -8
- package/dist/adapter/activeRunSelfHeal.d.ts +8 -3
- package/dist/adapter/activeRunSelfHeal.js +20 -12
- package/dist/adapter/downstream/eventToSdkMessage.js +24 -17
- package/dist/adapter/downstream/terminalToSdkResult.js +13 -6
- package/dist/adapter/runStream.js +2 -1
- package/dist/adapter/types.d.ts +7 -0
- package/dist/adapter/types.js +15 -0
- package/dist/agentSession/backgroundView.js +5 -1
- package/dist/agentSession/engineAgentRegistryRead.js +2 -1
- package/dist/agentSession/engineSessionBackgroundStop.js +5 -3
- package/dist/agentsWireCaps.d.ts +17 -0
- package/dist/agentsWireCaps.js +111 -1
- package/dist/approvalDecidedByCapability.d.ts +0 -1
- package/dist/approvalDecidedByCapability.js +2 -7
- package/dist/approvalReachWire.d.ts +18 -0
- package/dist/approvalReachWire.js +58 -0
- package/dist/approvalsStreamLiveCapability.d.ts +0 -1
- package/dist/approvalsStreamLiveCapability.js +15 -14
- package/dist/atMostOnce.d.ts +8 -0
- package/dist/atMostOnce.js +36 -0
- package/dist/attachmentSeatCapability.d.ts +0 -1
- package/dist/attachmentSeatCapability.js +0 -3
- package/dist/attachmentsWireCaps.js +11 -6
- package/dist/bashExitReading.d.ts +10 -0
- package/dist/bashExitReading.js +12 -0
- package/dist/callerCwdCapability.d.ts +15 -0
- package/dist/callerCwdCapability.js +42 -0
- package/dist/centerWiringCapability.d.ts +1 -3
- package/dist/centerWiringCapability.js +18 -21
- package/dist/classifierStatus.js +4 -4
- package/dist/cloudConfigWireCaps.js +43 -21
- package/dist/compensations.js +1 -1
- package/dist/controlRouter.js +3 -10
- package/dist/coreValuePorts.d.ts +64 -1
- package/dist/coreValuePorts.js +30 -0
- package/dist/cycleOrder.d.ts +15 -0
- package/dist/cycleOrder.js +45 -0
- package/dist/decideFailureNote.js +4 -1
- package/dist/decideReceipt.d.ts +2 -1
- package/dist/decideReceipt.js +41 -13
- package/dist/declared/supportFloorDeclared.d.ts +1 -0
- package/dist/declared/supportFloorDeclared.js +5 -0
- package/dist/detachWire.d.ts +1 -4
- package/dist/detachWire.js +1 -1
- package/dist/deviceExecutorManagementCapability.d.ts +0 -1
- package/dist/deviceExecutorManagementCapability.js +36 -40
- package/dist/deviceFlowPolling.d.ts +5 -0
- package/dist/deviceFlowPolling.js +28 -0
- package/dist/deviceRebind.d.ts +88 -0
- package/dist/deviceRebind.js +242 -0
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +963 -30
- package/dist/engineAgentAbsence.d.ts +2 -2
- package/dist/engineAgentPanelStore.d.ts +8 -18
- package/dist/engineAgentPanelStore.js +19 -537
- package/dist/engineCapReader.d.ts +6 -6
- package/dist/engineCapReader.js +30 -43
- package/dist/engineCapsCache.d.ts +7 -2
- package/dist/engineCapsCache.js +64 -26
- package/dist/engineCredentialRequirement.d.ts +9 -0
- package/dist/engineCredentialRequirement.js +23 -0
- package/dist/engineEnvSourcing.d.ts +53 -0
- package/dist/engineEnvSourcing.js +81 -0
- package/dist/engineErrorCodes.d.ts +19 -4
- package/dist/engineErrorCodes.js +39 -21
- package/dist/engineIdentity.js +2 -0
- package/dist/engineNoticeCodes.d.ts +22 -2
- package/dist/engineNoticeCodes.js +73 -6
- package/dist/engineRefusedToolName.d.ts +1 -0
- package/dist/engineRefusedToolName.js +8 -0
- package/dist/engineWireSdk.js +2 -2
- package/dist/executionLaneCapability.d.ts +2 -3
- package/dist/executionLaneCapability.js +28 -28
- package/dist/fileHistoryCaptureCapability.d.ts +0 -1
- package/dist/fileHistoryCaptureCapability.js +13 -12
- package/dist/fileHistoryLegNotice.d.ts +14 -2
- package/dist/fileHistoryLegNotice.js +101 -15
- package/dist/fleet/fleetLedger.d.ts +2 -0
- package/dist/fleet/fleetLedger.js +74 -52
- package/dist/fleet/fleetProjection.d.ts +0 -3
- package/dist/fleet/fleetProjection.js +9 -16
- package/dist/fleetAgentPanelProjection.d.ts +4 -17
- package/dist/fleetAgentPanelProjection.js +7 -197
- package/dist/fleetAgentRowLike.d.ts +16 -0
- package/dist/fleetAgentRowLike.js +1 -0
- package/dist/gateOutcome.d.ts +2 -1
- package/dist/gateOutcome.js +33 -18
- package/dist/gateVocabulary.js +1 -1
- package/dist/generated/engineAskFaceTables.d.ts +3 -0
- package/dist/generated/engineAskFaceTables.js +12 -0
- package/dist/generated/engineFactTables.d.ts +4 -2
- package/dist/generated/engineFactTables.js +13 -0
- package/dist/generated/engineNoticeTables.d.ts +5 -0
- package/dist/generated/engineNoticeTables.js +7 -0
- package/dist/generated/sdkFactTables.d.ts +5 -0
- package/dist/generated/sdkFactTables.js +34 -0
- package/dist/generated/settingsSchemaFns.d.ts +10 -0
- package/dist/generated/settingsSchemaFns.js +22 -0
- package/dist/generated/settingsSchemaTables.d.ts +3 -0
- package/dist/generated/settingsSchemaTables.js +3 -0
- package/dist/headlessPermissionModeWire.d.ts +2 -2
- package/dist/headlessPermissionModeWire.js +11 -21
- package/dist/headlessReconnectWire.js +49 -20
- package/dist/hitl/allowRuleShadow.d.ts +1 -1
- package/dist/hitl/allowRuleShadow.js +49 -8
- package/dist/hitl/approvalCompleteParked.d.ts +1 -0
- package/dist/hitl/approvalCompleteParked.js +14 -0
- package/dist/hitl/approvalEndingCause.d.ts +5 -0
- package/dist/hitl/approvalEndingCause.js +61 -0
- package/dist/hitl/approvalHolds.d.ts +46 -0
- package/dist/hitl/approvalHolds.js +140 -0
- package/dist/hitl/approvalOutcomeNote.js +2 -1
- package/dist/hitl/approvalResolution.js +9 -1
- package/dist/hitl/approvalsFeed.js +23 -6
- package/dist/hitl/askGateWire.d.ts +2 -1
- package/dist/hitl/askGateWire.js +29 -1
- package/dist/hitl/automaticAnswerVerdict.d.ts +8 -2
- package/dist/hitl/automaticAnswerVerdict.js +71 -23
- package/dist/hitl/crashConverged.js +2 -0
- package/dist/hitl/decisionConflict.d.ts +3 -0
- package/dist/hitl/decisionConflict.js +43 -0
- package/dist/hitl/decisionRefusal.d.ts +23 -0
- package/dist/hitl/decisionRefusal.js +88 -0
- package/dist/hitl/frameRouter.d.ts +10 -0
- package/dist/hitl/frameRouter.js +71 -32
- package/dist/hitl/gateLedger.d.ts +8 -0
- package/dist/hitl/gateLedger.js +38 -0
- package/dist/hitl/hitlBridge.d.ts +14 -3
- package/dist/hitl/hitlBridge.js +75 -62
- package/dist/hitl/hitlHostSurface.d.ts +3 -0
- package/dist/hitl/hitlHostSurface.js +17 -15
- package/dist/hitl/livePendingAsk.d.ts +16 -6
- package/dist/hitl/livePendingAsk.js +36 -4
- package/dist/hitl/localAllowRule.js +2 -1
- package/dist/hitl/noAllowCause.d.ts +9 -0
- package/dist/hitl/noAllowCause.js +26 -0
- package/dist/hitl/parkExpiryJudgements.d.ts +19 -0
- package/dist/hitl/parkExpiryJudgements.js +46 -0
- package/dist/hitl/parkResolver.d.ts +3 -7
- package/dist/hitl/parkResolver.js +55 -28
- package/dist/hitl/parkRowBirthWait.js +2 -1
- package/dist/hitl/persistedRulesWire.d.ts +6 -1
- package/dist/hitl/persistedRulesWire.js +16 -4
- package/dist/hitl/planReviewWire.d.ts +2 -3
- package/dist/hitl/planReviewWire.js +86 -39
- package/dist/hitl/replayedApproval.d.ts +8 -0
- package/dist/hitl/replayedApproval.js +125 -10
- package/dist/hitl/resumeRunningCard.d.ts +2 -0
- package/dist/hitl/resumeRunningCard.js +15 -4
- package/dist/hitl/sessionPolicyDeliverable.d.ts +1 -1
- package/dist/hitl/sessionPolicyDeliverable.js +3 -8
- package/dist/hitl/sessionPolicyWire.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +50 -5
- package/dist/hitl/toolApprovalWire.js +368 -56
- package/dist/hooksWireCaps.js +38 -6
- package/dist/host.d.ts +5 -0
- package/dist/host.js +3 -1
- package/dist/hostCallbackGuard.d.ts +1 -0
- package/dist/hostCallbackGuard.js +25 -0
- package/dist/humanTurnRead.d.ts +15 -1
- package/dist/humanTurnRead.js +28 -2
- package/dist/index.d.ts +45 -14
- package/dist/index.js +33 -12
- package/dist/interactiveInterrupt.d.ts +8 -0
- package/dist/interactiveInterrupt.js +54 -0
- package/dist/limitsWire.d.ts +5 -1
- package/dist/limitsWire.js +51 -13
- package/dist/liveModelCatalog.d.ts +109 -0
- package/dist/liveModelCatalog.js +344 -18
- package/dist/mcpEngineLeg.d.ts +25 -0
- package/dist/mcpEngineLeg.js +71 -15
- package/dist/mcpPanel.js +2 -1
- package/dist/mcpProbeCapability.d.ts +0 -1
- package/dist/mcpProbeCapability.js +13 -12
- package/dist/mcpReconnect.d.ts +1 -3
- package/dist/mcpReconnect.js +20 -10
- package/dist/memoryComplianceCapability.d.ts +0 -1
- package/dist/memoryComplianceCapability.js +14 -13
- package/dist/memoryOriginCapability.d.ts +0 -1
- package/dist/memoryOriginCapability.js +14 -13
- package/dist/memoryVerbsWire.d.ts +1 -1
- package/dist/memoryVerbsWire.js +4 -0
- package/dist/model/liveCatalogShape.d.ts +14 -0
- package/dist/model/liveCatalogShape.js +71 -0
- package/dist/model/modelSupplyRules.d.ts +1 -0
- package/dist/model/modelSupplyRules.js +30 -9
- package/dist/model/modelsPolicy.d.ts +21 -0
- package/dist/model/modelsPolicy.js +90 -0
- package/dist/modelIdentityResolvability.d.ts +4 -2
- package/dist/modelIdentityResolvability.js +25 -5
- package/dist/modelSwitchFallback.d.ts +69 -0
- package/dist/modelSwitchFallback.js +206 -0
- package/dist/notifications.js +12 -11
- package/dist/outputStyleSeatCapability.d.ts +15 -0
- package/dist/outputStyleSeatCapability.js +42 -0
- package/dist/ownKey.d.ts +7 -0
- package/dist/ownKey.js +58 -0
- package/dist/panelReduce.d.ts +114 -0
- package/dist/panelReduce.js +1135 -0
- package/dist/panelStateHolder.d.ts +17 -0
- package/dist/panelStateHolder.js +201 -0
- package/dist/peerLaneCapability.d.ts +0 -1
- package/dist/peerLaneCapability.js +15 -14
- package/dist/permissionModesCapability.d.ts +0 -1
- package/dist/permissionModesCapability.js +5 -10
- package/dist/permissionRuleIssue.js +1 -1
- package/dist/permissionRulesWriteCapability.d.ts +0 -1
- package/dist/permissionRulesWriteCapability.js +15 -14
- package/dist/permissionsAllowGrantCapability.d.ts +2 -1
- package/dist/permissionsAllowGrantCapability.js +35 -19
- package/dist/permissionsDeclaration.d.ts +16 -1
- package/dist/permissionsDeclaration.js +142 -15
- package/dist/printToolResultFrame.js +2 -10
- package/dist/promptDelivery.js +0 -8
- package/dist/protocolSegment.d.ts +1 -0
- package/dist/protocolSegment.js +13 -1
- package/dist/request/taskRequest.d.ts +11 -3
- package/dist/request/taskRequest.js +13 -1
- package/dist/resultFrameKeys.d.ts +4 -0
- package/dist/resultFrameKeys.js +13 -0
- package/dist/resumeRefusalCopy.d.ts +18 -1
- package/dist/resumeRefusalCopy.js +132 -31
- package/dist/retryStatus.js +6 -4
- package/dist/rewindArchiveCapability.d.ts +2 -1
- package/dist/rewindArchiveCapability.js +28 -15
- package/dist/rewindEngineAction.d.ts +21 -0
- package/dist/rewindEngineAction.js +36 -0
- package/dist/rewindWireCaps.d.ts +2 -1
- package/dist/rewindWireCaps.js +1 -0
- package/dist/{hitl/rosterMountedNames.d.ts → rosterMountedNames.d.ts} +1 -1
- package/dist/runCancelContext.js +2 -1
- package/dist/runTerminal.d.ts +0 -11
- package/dist/runTerminal.js +4 -27
- package/dist/sdkRegistryTransit.d.ts +2 -1
- package/dist/sdkRegistryTransit.js +1 -0
- package/dist/sealedKeyCapability.d.ts +0 -1
- package/dist/sealedKeyCapability.js +19 -20
- package/dist/seatContract.d.ts +85 -28
- package/dist/seatContract.js +512 -148
- package/dist/sessionIdSegment.d.ts +1 -0
- package/dist/sessionIdSegment.js +11 -0
- package/dist/sessionMemoryErase.d.ts +1 -1
- package/dist/sessionMemoryErase.js +6 -1
- package/dist/sessionMemoryStatus.js +3 -2
- package/dist/sessionPolicyCapability.d.ts +0 -1
- package/dist/sessionPolicyCapability.js +14 -13
- package/dist/sessionReadRedactionCapability.d.ts +15 -0
- package/dist/sessionReadRedactionCapability.js +42 -0
- package/dist/sessionSyncFileHistoryCapability.d.ts +0 -1
- package/dist/sessionSyncFileHistoryCapability.js +13 -12
- package/dist/skillToolListsCapability.d.ts +0 -1
- package/dist/skillToolListsCapability.js +13 -12
- package/dist/skillsWireCaps.d.ts +4 -0
- package/dist/skillsWireCaps.js +66 -1
- package/dist/sqlEngineCapability.d.ts +0 -1
- package/dist/sqlEngineCapability.js +21 -21
- package/dist/steerPriorityCapability.d.ts +0 -1
- package/dist/steerPriorityCapability.js +18 -19
- package/dist/storePostureCapability.d.ts +1 -1
- package/dist/storePostureCapability.js +16 -16
- package/dist/streamDrainingLegs.d.ts +6 -0
- package/dist/streamDrainingLegs.js +23 -0
- package/dist/subagent/agentStateDetail.d.ts +1 -0
- package/dist/subagent/agentStateDetail.js +41 -0
- package/dist/subagent/engineCompactWire.d.ts +15 -0
- package/dist/subagent/engineCompactWire.js +82 -45
- package/dist/subagent/engineDelegatedPrompt.js +10 -6
- package/dist/subagent/engineSubagentOutput.d.ts +0 -1
- package/dist/subagent/engineSubagentOutput.js +5 -20
- package/dist/subagent/engineSubagentTail.d.ts +0 -1
- package/dist/subagent/engineSubagentTail.js +7 -32
- package/dist/subagentContentStore.js +3 -3
- package/dist/supportFloor.js +2 -5
- package/dist/taskRequestWords.d.ts +2 -4
- package/dist/taskRequestWords.js +3 -2
- package/dist/terminalStatuses.d.ts +30 -0
- package/dist/terminalStatuses.js +67 -0
- package/dist/toolResult.d.ts +5 -0
- package/dist/toolResult.js +88 -36
- package/dist/types/engineState.d.ts +2 -1
- package/dist/usageAnalytics.d.ts +146 -0
- package/dist/usageAnalytics.js +311 -0
- package/dist/userAttachmentEnvelope.d.ts +22 -1
- package/dist/userAttachmentEnvelope.js +90 -2
- package/dist/userInvokedSkillsCapability.d.ts +0 -1
- package/dist/userInvokedSkillsCapability.js +13 -12
- package/dist/webSearchBackendCapability.d.ts +0 -1
- package/dist/webSearchBackendCapability.js +20 -19
- package/dist/webSearchWireCaps.js +3 -11
- package/dist/wireErrorTriage.d.ts +11 -0
- package/dist/wireErrorTriage.js +35 -0
- package/dist/wireFailureShape.d.ts +10 -0
- package/dist/wireFailureShape.js +72 -5
- package/dist/wireRefusalCopy.d.ts +6 -1
- package/dist/wireRefusalCopy.js +23 -25
- package/dist/wiringInstructionsAttribution.d.ts +10 -0
- package/dist/wiringInstructionsAttribution.js +67 -0
- package/dist/workflowClient.js +19 -2
- package/dist/workflowsJournalCapability.d.ts +0 -1
- package/dist/workflowsJournalCapability.js +13 -12
- package/dist/writeProtectionCapability.d.ts +0 -1
- package/dist/writeProtectionCapability.js +26 -26
- package/docs/INTEGRATION-CLIENTS.md +1733 -52
- package/package.json +5 -5
- package/dist/askSurvivesStandingAnswer.d.ts +0 -13
- package/dist/askSurvivesStandingAnswer.js +0 -53
- package/dist/engineCapsGenerationGuard.d.ts +0 -4
- package/dist/engineCapsGenerationGuard.js +0 -19
- package/dist/hitl/askSurvivesPosture.d.ts +0 -20
- package/dist/hitl/askSurvivesPosture.js +0 -48
- package/dist/panelRunningHistory.d.ts +0 -22
- package/dist/panelRunningHistory.js +0 -82
- package/dist/registryConflict.d.ts +0 -3
- package/dist/registryConflict.js +0 -44
- /package/dist/{hitl/rosterMountedNames.js → rosterMountedNames.js} +0 -0
package/dist/seatContract.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import type { QuestionAnswer } from "./liveQuestionStore.js";
|
|
|
5
5
|
import type { ToolApprovalDelegation } from "./hitl/toolApprovalWire.js";
|
|
6
6
|
import type { ApprovalMandateWord } from "./gateVocabulary.js";
|
|
7
7
|
import type { ModelApiWord } from "./model/providerPresets.js";
|
|
8
|
+
import type { LiveModelCatalog } from "./liveModelCatalog.js";
|
|
9
|
+
import { type RewindMode } from "./rewindWireCaps.js";
|
|
8
10
|
export interface SeatValidationFailure {
|
|
9
11
|
reason: string;
|
|
10
12
|
field?: string;
|
|
@@ -29,6 +31,7 @@ export interface LocalSessionRecord {
|
|
|
29
31
|
engineSessionId?: string;
|
|
30
32
|
model?: string;
|
|
31
33
|
title?: string;
|
|
34
|
+
cwd?: string;
|
|
32
35
|
isRunning: boolean;
|
|
33
36
|
createdAt: string;
|
|
34
37
|
lastActivityAt?: string;
|
|
@@ -96,9 +99,27 @@ export interface LocalSessionEvent {
|
|
|
96
99
|
hasPreClearSession?: boolean;
|
|
97
100
|
requestId?: string;
|
|
98
101
|
outcome?: string;
|
|
102
|
+
parked?: true;
|
|
99
103
|
chrome?: SeatChromeEnvelope;
|
|
100
104
|
}
|
|
101
105
|
export declare const HITL_RESOLUTION_OUTCOMES: readonly string[];
|
|
106
|
+
export declare const SEAT_CAPABILITY_NAMES: readonly ["pickFolder", "rewind"];
|
|
107
|
+
export type SeatCapabilityName = (typeof SEAT_CAPABILITY_NAMES)[number];
|
|
108
|
+
export interface SeatCapabilitiesState {
|
|
109
|
+
pickFolder?: boolean;
|
|
110
|
+
rewind?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export type SeatCapabilityReading = {
|
|
113
|
+
readonly kind: "reported";
|
|
114
|
+
readonly available: boolean;
|
|
115
|
+
} | {
|
|
116
|
+
readonly kind: "not_reported";
|
|
117
|
+
} | {
|
|
118
|
+
readonly kind: "malformed";
|
|
119
|
+
};
|
|
120
|
+
export declare function seatCapability(state: unknown, name: SeatCapabilityName): SeatCapabilityReading;
|
|
121
|
+
export declare function watchSeatCapability(store: EipcStoreClient<SeatCapabilitiesState> | undefined, name: SeatCapabilityName, onReading: (reading: SeatCapabilityReading) => void): () => void;
|
|
122
|
+
export declare function seatCapabilityUnavailableDetail(name: SeatCapabilityName, reading: SeatCapabilityReading): string | undefined;
|
|
102
123
|
export interface StartSessionOptions {
|
|
103
124
|
model?: string;
|
|
104
125
|
title?: string;
|
|
@@ -113,6 +134,28 @@ export interface SeatTurnSettings {
|
|
|
113
134
|
ultracode?: boolean;
|
|
114
135
|
}
|
|
115
136
|
export declare const SEAT_TURN_SETTINGS_KEYS: readonly ["ultracode"];
|
|
137
|
+
export declare const SEAT_TURN_SETTINGS_ORIGINS: Readonly<{
|
|
138
|
+
ultracode: Readonly<{
|
|
139
|
+
carriedBy: "renderer";
|
|
140
|
+
}>;
|
|
141
|
+
webSearch: Readonly<{
|
|
142
|
+
hostSupplied: "联网检索的每请求配置来自宿主的设置源(可能带检索服务的凭据与私网地址);渲染端没有设置文件,也不该持有凭据";
|
|
143
|
+
}>;
|
|
144
|
+
hooks: Readonly<{
|
|
145
|
+
hostSupplied: "hooks 表来自宿主的设置文件(宿主经设置端口与 hooksForWire 投影);渲染端没有设置文件、也不执行本机 hook";
|
|
146
|
+
}>;
|
|
147
|
+
resolved: Readonly<{
|
|
148
|
+
hostSupplied: "设置解析器的生效快照(hooks / env / model / 已解析权限)由宿主跑解析器得出;渲染端没有设置源可解析";
|
|
149
|
+
}>;
|
|
150
|
+
outputStyle: Readonly<{
|
|
151
|
+
hostSupplied: "输出风格正文由宿主的兜底层随请求带(风格文件在宿主);渲染端只选名字,不持正文";
|
|
152
|
+
}>;
|
|
153
|
+
}>;
|
|
154
|
+
export interface SeatRewindIntent {
|
|
155
|
+
mode: RewindMode;
|
|
156
|
+
targetMessageUuid: string;
|
|
157
|
+
}
|
|
158
|
+
export declare const SEAT_REWIND_INTENT_KEYS: readonly ["mode", "targetMessageUuid"];
|
|
116
159
|
export interface SendMessageRequest {
|
|
117
160
|
sessionId: string;
|
|
118
161
|
text: string;
|
|
@@ -128,6 +171,7 @@ export interface SendMessageRequest {
|
|
|
128
171
|
max?: number;
|
|
129
172
|
};
|
|
130
173
|
settings?: SeatTurnSettings;
|
|
174
|
+
rewind?: SeatRewindIntent;
|
|
131
175
|
scenario?: string;
|
|
132
176
|
}
|
|
133
177
|
export interface AttachmentUploadRequest {
|
|
@@ -146,17 +190,6 @@ export interface AttachmentUploadReceipt {
|
|
|
146
190
|
sha256: string;
|
|
147
191
|
sizeBytes: number;
|
|
148
192
|
}
|
|
149
|
-
export interface SeatModelInfo {
|
|
150
|
-
id: string;
|
|
151
|
-
name?: string;
|
|
152
|
-
provider?: string;
|
|
153
|
-
contextWindow?: number;
|
|
154
|
-
maxOutputTokens?: number;
|
|
155
|
-
}
|
|
156
|
-
export interface SeatModelCatalog {
|
|
157
|
-
models: SeatModelInfo[];
|
|
158
|
-
defaultId?: string;
|
|
159
|
-
}
|
|
160
193
|
export interface SendMessageAck {
|
|
161
194
|
sessionId: string;
|
|
162
195
|
userMessageUuid: string;
|
|
@@ -225,13 +258,15 @@ export interface LocalSessionsApi {
|
|
|
225
258
|
getTranscript(sessionId: string): Promise<GetTranscriptResult>;
|
|
226
259
|
searchSessions(query: string): Promise<SessionSearchEnvelope>;
|
|
227
260
|
uploadAttachment(req: AttachmentUploadRequest): Promise<AttachmentUploadReceipt>;
|
|
228
|
-
listModels(): Promise<
|
|
261
|
+
listModels(): Promise<LiveModelCatalog>;
|
|
229
262
|
applyModelConfig(req: ApplyModelConfigRequest): Promise<ApplyModelConfigResult>;
|
|
263
|
+
pickFolder(): Promise<string | null>;
|
|
230
264
|
onEvent(cb: (ev: LocalSessionEvent) => void): () => void;
|
|
231
265
|
onToolPermissionRequest(cb: (req: ToolPermissionRequest) => void): () => void;
|
|
232
266
|
sessionsStateStore: EipcStoreClient<SessionsState>;
|
|
233
267
|
focusedSessionStateStore: EipcStoreClient<FocusedSessionState>;
|
|
234
268
|
settingsStateStore: EipcStoreClient<SettingsState>;
|
|
269
|
+
seatCapabilitiesStateStore: EipcStoreClient<SeatCapabilitiesState>;
|
|
235
270
|
}
|
|
236
271
|
export declare function isLocalSessionRecord(s: unknown): s is LocalSessionRecord;
|
|
237
272
|
export declare function isToolPermissionRequest(r: unknown): r is ToolPermissionRequest;
|
|
@@ -257,16 +292,17 @@ export interface ApplyModelConfigResult {
|
|
|
257
292
|
reason?: string;
|
|
258
293
|
requiresRestart: boolean;
|
|
259
294
|
}
|
|
260
|
-
export declare function
|
|
295
|
+
export declare function checkSendMessageRequest(v: unknown): SeatValidation;
|
|
296
|
+
export declare function isSendMessageRequest(v: unknown): v is SendMessageRequest;
|
|
261
297
|
export declare function isSendMessageAck(v: unknown): v is SendMessageAck;
|
|
262
298
|
export declare const LOCAL_SESSIONS_SPEC: EipcServiceSpec;
|
|
263
|
-
export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "onEvent", "onToolPermissionRequest"];
|
|
264
|
-
export declare const SEAT_STORE_PROPS: readonly ["sessionsStateStore", "focusedSessionStateStore", "settingsStateStore"];
|
|
299
|
+
export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "pickFolder", "onEvent", "onToolPermissionRequest"];
|
|
300
|
+
export declare const SEAT_STORE_PROPS: readonly ["sessionsStateStore", "focusedSessionStateStore", "settingsStateStore", "seatCapabilitiesStateStore"];
|
|
265
301
|
export declare const SEAT_EVENT_METHOD_NAMES: readonly ["onEvent", "onToolPermissionRequest"];
|
|
266
|
-
export declare const LOCAL_SESSION_EVENT_KEYS: readonly ["type", "sessionId", "message", "messages", "error", "errorCategory", "code", "request", "data", "sources", "permissionMode", "session", "userMessageUuid", "hasPreClearSession", "requestId", "outcome", "chrome"];
|
|
302
|
+
export declare const LOCAL_SESSION_EVENT_KEYS: readonly ["type", "sessionId", "message", "messages", "error", "errorCategory", "code", "request", "data", "sources", "permissionMode", "session", "userMessageUuid", "hasPreClearSession", "requestId", "outcome", "parked", "chrome"];
|
|
267
303
|
export declare const TOOL_PERMISSION_REQUEST_KEYS: readonly ["requestId", "sessionId", "toolName", "toolCallId", "input", "message", "toctouBinding", "createdAtMs", "governanceForced", "delegation", "mandated", "mandate", "origin", "ruleOffersAbsence", "askClass", "classes"];
|
|
268
|
-
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
269
|
-
export declare const SEND_MESSAGE_REQUEST_KEYS: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "forwardSubagentEvents", "retainSubagentSessions", "settings", "scenario"];
|
|
304
|
+
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
305
|
+
export declare const SEND_MESSAGE_REQUEST_KEYS: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "forwardSubagentEvents", "retainSubagentSessions", "settings", "scenario", "rewind"];
|
|
270
306
|
export declare const SEAT_SEND_MESSAGE_KEY_ORIGINS: {
|
|
271
307
|
readonly sessionId: {
|
|
272
308
|
readonly seatOnly: "座位会话句柄(渲染端持有的本地 id);引擎会话 id 由座位记录的 `engineSessionId` 承载 —— 与引擎请求体上的同名位**同名不同义**,绝不直传";
|
|
@@ -304,19 +340,23 @@ export declare const SEAT_SEND_MESSAGE_KEY_ORIGINS: {
|
|
|
304
340
|
readonly scenario: {
|
|
305
341
|
readonly taskRequestKey: "scenario";
|
|
306
342
|
};
|
|
343
|
+
readonly rewind: {
|
|
344
|
+
readonly projectedBy: "rewindSpecForMode";
|
|
345
|
+
readonly taskRequestKeys: readonly ["resumeAt", "resumeAtMode", "restoreFiles", "rewindFilesTo"];
|
|
346
|
+
};
|
|
307
347
|
};
|
|
308
348
|
export declare const TOOL_PERMISSION_DECISION_KEYS: readonly ["sessionId", "requestId", "decision", "answer", "updatedInput", "remember"];
|
|
309
349
|
export declare const START_SESSION_OPTION_KEYS: readonly ["model", "title", "cwd", "excludeTools"];
|
|
310
350
|
export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
311
351
|
readonly LocalSessionRecord: {
|
|
312
352
|
readonly guard: "isLocalSessionRecord";
|
|
313
|
-
readonly check: (
|
|
314
|
-
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
353
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
354
|
+
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
315
355
|
readonly unchecked: readonly [];
|
|
316
356
|
};
|
|
317
357
|
readonly ToolPermissionRequest: {
|
|
318
358
|
readonly guard: "isToolPermissionRequest";
|
|
319
|
-
readonly check: (
|
|
359
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
320
360
|
readonly validated: readonly ["requestId", "sessionId", "toolName", "toolCallId", "message", "toctouBinding", "createdAtMs"];
|
|
321
361
|
readonly unchecked: readonly [{
|
|
322
362
|
readonly key: "input";
|
|
@@ -335,7 +375,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
335
375
|
readonly why: "展示增强位(CC-203),权威窄读在卡口与过境口(闭集六词精确字节,表外不上座);座位门不设第二判官,理由同 mandated。消费端经 readApprovalMandate 读,表外值读成缺席。";
|
|
336
376
|
}, {
|
|
337
377
|
readonly key: "origin";
|
|
338
|
-
readonly why: "
|
|
378
|
+
readonly why: "喂自动车道单一判定 automaticAnswerVerdict 的出身位(CC-203),按开集读(非空串原文字节、词表不校);权威窄读在卡口与过境口 toolPermissionRequestAskBits,座位门不设第二判官(为一个位拒掉整条 request = 把安全 ask 丢给引擎 TTL deny)。坏形的两种失效方向:非串 / 空串读成缺席 ⇒ 判定少一路必问证据(放宽方向:真出身若是收词、而卡上的类集恰没带它对应的类,这一路就丢了);表外串 ⇒ 不是收词,出身这一路不起作用(类集照读,不放宽)。不经过境口自铸座位请求的宿主要自己按同一把窄读。";
|
|
339
379
|
}, {
|
|
340
380
|
readonly key: "askClass";
|
|
341
381
|
readonly why: "展示位(CC-284),权威成对窄读在卡口与过境口 toolPermissionRequestAskBits(与 classes 同在同缺、首员等于 askClass、不判成员、不重排);座位门不设第二判官,理由同 mandated(为一个展示位拒掉整条 request = 把安全 ask 丢给引擎超时拒)。坏形读成缺席 ⇒ 卡上不显示问类,不改决断;缺席不是「普通问」。不经过境口自铸座位请求的宿主要自己按同一把成对窄读。";
|
|
@@ -350,7 +390,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
350
390
|
readonly LocalSessionEvent: {
|
|
351
391
|
readonly guard: "isLocalSessionEvent";
|
|
352
392
|
readonly check: (v: unknown) => SeatValidation;
|
|
353
|
-
readonly validated: readonly ["type", "sessionId", "messages", "error", "errorCategory", "code", "request", "data", "sources", "permissionMode", "session", "userMessageUuid", "hasPreClearSession", "requestId", "outcome", "chrome"];
|
|
393
|
+
readonly validated: readonly ["type", "sessionId", "messages", "error", "errorCategory", "code", "request", "data", "sources", "permissionMode", "session", "userMessageUuid", "hasPreClearSession", "requestId", "outcome", "parked", "chrome"];
|
|
354
394
|
readonly unchecked: readonly [{
|
|
355
395
|
readonly key: "message";
|
|
356
396
|
readonly why: "transcript 面直通位(CC fQe 逐字姿态:SDKMessage 体不做 schema 校验)—— 校它 = 引擎加一种消息体的那天整条转录被门吃掉。";
|
|
@@ -362,10 +402,18 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
362
402
|
readonly validated: readonly ["id", "name", "mime", "sha256", "sizeBytes"];
|
|
363
403
|
readonly unchecked: readonly [];
|
|
364
404
|
};
|
|
365
|
-
readonly
|
|
366
|
-
readonly guard: "isSeatModelCatalog";
|
|
405
|
+
readonly LiveModelCatalog: {
|
|
367
406
|
readonly check: (v: unknown) => SeatValidation;
|
|
368
|
-
readonly validated: readonly ["models", "
|
|
407
|
+
readonly validated: readonly ["models", "default", "defaultModel"];
|
|
408
|
+
readonly unchecked: readonly [{
|
|
409
|
+
readonly key: "droppedEntries";
|
|
410
|
+
readonly why: "诊断面(哪些目录条目没被引擎收下),三态读法归 droppedModelEntriesOf(含坏形 malformed);出站门为它拒掉整份目录 = 选单为一行诊断整个消失。";
|
|
411
|
+
}];
|
|
412
|
+
};
|
|
413
|
+
readonly SendMessageRequest: {
|
|
414
|
+
readonly guard: "isSendMessageRequest";
|
|
415
|
+
readonly check: typeof checkSendMessageRequest;
|
|
416
|
+
readonly validated: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "forwardSubagentEvents", "retainSubagentSessions", "settings", "scenario", "rewind"];
|
|
369
417
|
readonly unchecked: readonly [];
|
|
370
418
|
};
|
|
371
419
|
readonly ApplyModelConfigResult: {
|
|
@@ -419,9 +467,14 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
419
467
|
readonly validated: readonly ["defaultModel", "engineVersion", "dataRoot"];
|
|
420
468
|
readonly unchecked: readonly [];
|
|
421
469
|
};
|
|
422
|
-
readonly
|
|
470
|
+
readonly SeatCapabilitiesState: {
|
|
423
471
|
readonly check: (v: unknown) => SeatValidation;
|
|
424
|
-
readonly validated: readonly ["
|
|
472
|
+
readonly validated: readonly ["pickFolder", "rewind"];
|
|
473
|
+
readonly unchecked: readonly [];
|
|
474
|
+
};
|
|
475
|
+
readonly SeatRewindIntent: {
|
|
476
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
477
|
+
readonly validated: readonly ["mode", "targetMessageUuid"];
|
|
425
478
|
readonly unchecked: readonly [];
|
|
426
479
|
};
|
|
427
480
|
readonly SessionSearchResult: {
|
|
@@ -441,6 +494,10 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
441
494
|
};
|
|
442
495
|
};
|
|
443
496
|
export declare const SEAT_VALIDATOR_COVERAGE_EXEMPT: readonly [{
|
|
497
|
+
readonly label: "PickFolderResult";
|
|
498
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
499
|
+
readonly why: "载荷是**串或 null**(选中的路径 / 用户取消,CC-469),没有键面 ⇒ `keyof` 覆盖表在它身上无从谈起。判别力由 run-seat-wave2-test.mjs ST1-1 承担:认 null 与非空串、拒空串 / 数 / undefined / 对象 / 布尔五形。";
|
|
500
|
+
}, {
|
|
444
501
|
readonly label: "BooleanAck";
|
|
445
502
|
readonly check: (v: unknown) => SeatValidation;
|
|
446
503
|
readonly why: "载荷是**裸布尔**(queue 三件 + setModel 的 CC 形回执,false = too-late/no-op),没有键面 ⇒ `keyof` 覆盖表在它身上无从谈起。判别力由 J 段承担:认 true/false、拒非布尔(对象 / 字符串 'true' / null / undefined 四形逐一投毒)。";
|