@sema-agent/client-core 0.107.0 → 0.109.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 +239 -0
- package/README.md +54 -36
- package/dist/adapt/arms.js +23 -8
- package/dist/adapt/textStream.d.ts +2 -0
- package/dist/adapt/textStream.js +37 -16
- package/dist/adapter/activeRunSelfHeal.d.ts +2 -0
- package/dist/adapter/activeRunSelfHeal.js +21 -4
- package/dist/adapter/downstream/eventToSdkMessage.js +2 -1
- package/dist/agentSession/engineAgentRegistryRead.js +2 -0
- package/dist/bashExitReading.d.ts +12 -0
- package/dist/bashExitReading.js +44 -0
- package/dist/checkpointRowVerdict.d.ts +6 -1
- package/dist/checkpointRowVerdict.js +30 -2
- package/dist/cloudConfigWireCaps.d.ts +10 -0
- package/dist/cloudConfigWireCaps.js +33 -0
- package/dist/compensations.js +1 -1
- package/dist/coreValuePorts.d.ts +17 -1
- package/dist/coreValuePorts.js +5 -0
- package/dist/decideReceipt.js +2 -1
- package/dist/engineAgentAbsence.d.ts +2 -0
- package/dist/engineAgentAbsence.js +28 -0
- package/dist/engineErrorCodes.d.ts +9 -0
- package/dist/engineErrorCodes.js +9 -0
- package/dist/engineHealthFacts.d.ts +17 -0
- package/dist/engineHealthFacts.js +42 -3
- package/dist/engineNoticeCodes.d.ts +147 -1
- package/dist/engineNoticeCodes.js +694 -57
- package/dist/engineTargetSeat.js +1 -0
- package/dist/errorSupplementRoles.js +6 -1
- package/dist/eventLeg.js +1 -1
- package/dist/executionLaneWords.js +2 -1
- package/dist/fleetTaskDesc.js +3 -3
- package/dist/gateOutcome.d.ts +10 -1
- package/dist/gateOutcome.js +48 -1
- package/dist/generated/engineFactTables.d.ts +2 -0
- package/dist/generated/engineFactTables.js +11 -0
- package/dist/generated/engineNoticeTables.js +6 -0
- package/dist/generated/settingsSchemaFns.d.ts +4 -2
- package/dist/generated/settingsSchemaFns.js +9 -3
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.js +9 -18
- package/dist/generated/settingsSchemaReservedMemberName.d.ts +1 -0
- package/dist/generated/settingsSchemaReservedMemberName.js +7 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +10 -0
- package/dist/generated/settingsSchemaWireName.d.ts +1 -0
- package/dist/generated/settingsSchemaWireName.js +8 -0
- package/dist/headlessReconnectWire.js +12 -7
- package/dist/hitl/approvalAskers.d.ts +13 -0
- package/dist/hitl/approvalAskers.js +79 -0
- package/dist/hitl/approvalCardReasons.js +22 -4
- package/dist/hitl/approvalRequestFrameReading.d.ts +14 -0
- package/dist/hitl/approvalRequestFrameReading.js +79 -0
- package/dist/hitl/approvalResolution.d.ts +3 -0
- package/dist/hitl/approvalResolution.js +22 -4
- package/dist/hitl/approvalsFeed.js +4 -13
- package/dist/hitl/askParkRowRouting.js +10 -3
- package/dist/hitl/automaticAnswerVerdict.d.ts +5 -2
- package/dist/hitl/automaticAnswerVerdict.js +16 -2
- package/dist/hitl/decisionConflict.d.ts +2 -1
- package/dist/hitl/decisionConflict.js +4 -1
- package/dist/hitl/decisionRefusal.d.ts +1 -0
- package/dist/hitl/decisionRefusal.js +5 -2
- package/dist/hitl/decisionSend.js +2 -6
- package/dist/hitl/frameRouter.d.ts +3 -2
- package/dist/hitl/frameRouter.js +37 -7
- package/dist/hitl/gateLedger.d.ts +2 -0
- package/dist/hitl/gateLedger.js +3 -1
- package/dist/hitl/hitlBridge.d.ts +4 -0
- package/dist/hitl/hitlBridge.js +11 -8
- package/dist/hitl/livePendingAsk.js +17 -16
- package/dist/hitl/localAllowRule.js +2 -1
- package/dist/hitl/noAllowCause.d.ts +1 -1
- package/dist/hitl/noAllowCause.js +4 -2
- package/dist/hitl/parkExpiryJudgements.js +26 -1
- package/dist/hitl/parkOwnership.d.ts +2 -0
- package/dist/hitl/parkOwnership.js +48 -8
- package/dist/hitl/parkResolver.js +39 -30
- package/dist/hitl/parkRowBirthWait.d.ts +2 -0
- package/dist/hitl/parkRowBirthWait.js +8 -1
- package/dist/hitl/parkedUnresumable.d.ts +13 -0
- package/dist/hitl/parkedUnresumable.js +80 -0
- package/dist/hitl/permissionRuleScope.d.ts +4 -0
- package/dist/hitl/permissionRuleScope.js +31 -0
- package/dist/hitl/persistedRulesWire.d.ts +7 -1
- package/dist/hitl/persistedRulesWire.js +25 -8
- package/dist/hitl/planReviewWire.js +12 -16
- package/dist/hitl/policyDenyCause.d.ts +3 -0
- package/dist/hitl/policyDenyCause.js +16 -0
- package/dist/hitl/sessionAllowRoute.js +5 -4
- package/dist/hitl/sessionPolicyDeliverable.js +1 -1
- package/dist/hitl/standingRows.d.ts +1 -5
- package/dist/hitl/standingRows.js +15 -14
- package/dist/hitl/toolApprovalWire.d.ts +16 -4
- package/dist/hitl/toolApprovalWire.js +57 -17
- package/dist/hooksReaderGenerations.d.ts +1 -0
- package/dist/hooksReaderGenerations.js +12 -0
- package/dist/hooksWireCaps.js +12 -7
- package/dist/hostSettingsSource.js +2 -0
- package/dist/i18n/messages.en.d.ts +206 -1
- package/dist/i18n/messages.en.js +209 -4
- package/dist/i18n/messages.zh.js +214 -4
- package/dist/index.d.ts +35 -8
- package/dist/index.js +20 -5
- package/dist/liveModelCatalog.d.ts +4 -2
- package/dist/liveModelCatalog.js +164 -26
- package/dist/localEngineJudge.d.ts +75 -0
- package/dist/localEngineJudge.js +242 -0
- package/dist/localEngineOccupancy.d.ts +88 -0
- package/dist/localEngineOccupancy.js +269 -0
- package/dist/localEngineSeatReading.d.ts +29 -0
- package/dist/localEngineSeatReading.js +294 -0
- package/dist/localEngineSpawn.d.ts +113 -0
- package/dist/localEngineSpawn.js +486 -0
- package/dist/localEngineStep.d.ts +286 -0
- package/dist/localEngineStep.js +1086 -0
- package/dist/localEngineStopLadder.d.ts +29 -0
- package/dist/localEngineStopLadder.js +139 -0
- package/dist/localEngineSwapCard.d.ts +43 -0
- package/dist/localEngineSwapCard.js +205 -0
- package/dist/localEngineTiming.d.ts +8 -0
- package/dist/localEngineTiming.js +8 -0
- package/dist/mcpReconnect.js +12 -5
- package/dist/mcpWireCaps.js +2 -2
- package/dist/memoryEntriesWire.d.ts +1 -1
- package/dist/memoryEntriesWire.js +5 -0
- package/dist/model/catalogDefault.d.ts +25 -0
- package/dist/model/catalogDefault.js +44 -0
- package/dist/noticePresentation.d.ts +2 -0
- package/dist/noticePresentation.js +79 -1
- package/dist/ownKey.d.ts +10 -0
- package/dist/ownKey.js +15 -1
- package/dist/permissionWireCaps.d.ts +1 -0
- package/dist/permissionWireCaps.js +11 -0
- package/dist/pluginHooksWire.d.ts +5 -3
- package/dist/pluginHooksWire.js +116 -7
- package/dist/queuedDelivery.d.ts +1 -0
- package/dist/queuedDelivery.js +12 -0
- package/dist/resultFrameKeys.js +4 -2
- package/dist/resumeRefusalCopy.js +15 -8
- package/dist/ruleReadings.js +1 -1
- package/dist/runPermissionModeSwitch.d.ts +2 -1
- package/dist/runPermissionModeSwitch.js +16 -6
- package/dist/seam.d.ts +13 -2
- package/dist/seam.js +8 -1
- package/dist/seatContract.d.ts +103 -12
- package/dist/seatContract.js +344 -14
- package/dist/sessionBackground.js +2 -0
- package/dist/sessionEngine.d.ts +2 -1
- package/dist/sessionEngine.js +5 -0
- package/dist/settingsHooksSalvage.d.ts +5 -0
- package/dist/settingsHooksSalvage.js +54 -0
- package/dist/subagentContentStore.d.ts +12 -0
- package/dist/subagentContentStore.js +73 -12
- package/dist/supportFloor.js +2 -0
- package/dist/taskNotificationAdmission.d.ts +19 -0
- package/dist/taskNotificationAdmission.js +84 -0
- package/dist/toolResult.js +20 -6
- package/dist/webSearchWireCaps.js +9 -4
- package/dist/wireFailureShape.d.ts +20 -0
- package/dist/wireFailureShape.js +37 -6
- package/dist/wireRefusalCopy.d.ts +23 -2
- package/dist/wireRefusalCopy.js +93 -4
- package/docs/INTEGRATION-CLIENTS.md +1959 -15
- package/package.json +4 -4
package/dist/seam.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { SuspendedReopenReading } from './hitl/suspendedReopen.js';
|
|
|
8
8
|
import type { PlanReviewCardFacts } from './planReviewCardFacts.js';
|
|
9
9
|
import type { ToolKillCause } from './toolResult.js';
|
|
10
10
|
import type { HumanInputAttachmentView } from './ownKey.js';
|
|
11
|
+
import type { SubagentAliasScope } from './subagentContentStore.js';
|
|
11
12
|
import type { TaskNotificationFields } from './notifications.js';
|
|
12
13
|
export interface AbortSignalLike {
|
|
13
14
|
readonly aborted: boolean;
|
|
@@ -165,7 +166,7 @@ export type ChromeEvent = {
|
|
|
165
166
|
} | ({
|
|
166
167
|
kind: 'run_cost_reconciled';
|
|
167
168
|
laneProof: LaneProof;
|
|
168
|
-
} & RunCostReconcile) | HumanInputChromeEvent | MessageCommittedChromeEvent | EngineNoticeChromeEvent | TextSegmentEndChromeEvent | ThinkingSegmentEndChromeEvent | ToolDisclosureChromeEvent | ToolProgressChromeEvent | ToolRosterDeltaChromeEvent | ContextUsageChromeEvent | CompactionOutcomeChromeEvent | CompactionStartedChromeEvent | SubagentStartedChromeEvent | PromptAssembledChromeEvent | MemorySavedChromeEvent | WiringManifestChromeEvent | ResultTextDivergedChromeEvent | ResultReplayedChromeEvent | ToolParkedChromeEvent | ApprovalRequestChromeEvent | ApprovalRevokeChromeEvent | ApprovalCompleteChromeEvent | SessionTitledChromeEvent | {
|
|
169
|
+
} & RunCostReconcile) | HumanInputChromeEvent | MessageCommittedChromeEvent | EngineNoticeChromeEvent | TextSegmentEndChromeEvent | ThinkingSegmentEndChromeEvent | ToolDisclosureChromeEvent | ToolProgressChromeEvent | ToolRosterDeltaChromeEvent | ContextUsageChromeEvent | CompactionOutcomeChromeEvent | CompactionStartedChromeEvent | SubagentStartedChromeEvent | PromptAssembledChromeEvent | MemorySavedChromeEvent | WiringManifestChromeEvent | ResultTextDivergedChromeEvent | ResultReplayedChromeEvent | ToolParkedChromeEvent | SubagentAliasChromeEvent | ApprovalRequestChromeEvent | ApprovalRevokeChromeEvent | ApprovalCompleteChromeEvent | SessionTitledChromeEvent | {
|
|
169
170
|
kind: 'suspended_reopened';
|
|
170
171
|
laneProof: LaneProof;
|
|
171
172
|
reopen: Extract<SuspendedReopenReading, {
|
|
@@ -347,6 +348,14 @@ export interface ToolParkedChromeEvent {
|
|
|
347
348
|
toolUseId: string;
|
|
348
349
|
rowUuid?: string;
|
|
349
350
|
}
|
|
351
|
+
export interface SubagentAliasChromeEvent {
|
|
352
|
+
kind: 'subagent_alias';
|
|
353
|
+
laneProof: LaneProof;
|
|
354
|
+
parentToolCallId: string;
|
|
355
|
+
taskId: string;
|
|
356
|
+
scope: SubagentAliasScope;
|
|
357
|
+
seq?: number;
|
|
358
|
+
}
|
|
350
359
|
export interface EngineNoticeChromeEvent {
|
|
351
360
|
kind: 'engine_notice';
|
|
352
361
|
laneProof: LaneProof;
|
|
@@ -376,8 +385,10 @@ export interface HumanInputChromeEvent {
|
|
|
376
385
|
entryId?: string;
|
|
377
386
|
eventId?: string;
|
|
378
387
|
attachments?: HumanInputAttachmentView[];
|
|
388
|
+
author?: string;
|
|
389
|
+
extension?: string;
|
|
379
390
|
}
|
|
380
|
-
export type { HumanInputAttachmentView } from './ownKey.js';
|
|
391
|
+
export type { HumanInputAttachmentView, HumanInputAttachmentDeclinedByView } from './ownKey.js';
|
|
381
392
|
export interface MessageCommittedChromeEvent {
|
|
382
393
|
kind: 'message_committed';
|
|
383
394
|
laneProof: LaneProof;
|
package/dist/seam.js
CHANGED
|
@@ -140,6 +140,12 @@ const CHROME_ARM_TABLE = {
|
|
|
140
140
|
'按开始行 uuid 认行,不按 toolUseId(调用 id 只在同一条助手消息内唯一)。它的终态由执行腿的结果铸(续跑带见证时接回原行),或永远缺席(停驻被取消 / 过期)。' +
|
|
141
141
|
'连坐旁观者 / 普通错误 / 停驻卡上 Esc(包已自发中断拒绝,行照铸 Interrupted)零枚。',
|
|
142
142
|
},
|
|
143
|
+
subagent_alias: {
|
|
144
|
+
required: false,
|
|
145
|
+
duty: '可选:「委派卡 id → 子代任务 id」别名对(`parentToolCallId` / `taskId` / `scope`)—— 座位 lane 的渲染端收到就调 `noteSeatSubagentAlias(chrome)` 写自己账本里的同一半,' +
|
|
146
|
+
'子代详情的实时输出才按子代任务 id 读得到(子代内容帧只带卡 id)。🔴 座位宿主零逻辑:本臂在座位词表里,按词表转发的宿主自动转发;适配层与渲染层同进程的端(浏览器 lane)适配层已登记,什么都不用做;' +
|
|
147
|
+
'`scope: content` 只写内容归账那一半、`full` 两半都写(含续发目标),别把两者混着登;`full` 臂的 `seq`(帧自带代际号,可缺席)是续发目标「现卡」的顺序证据,交 `noteSeatSubagentAlias` 即可,别自己按到达序排;适配层每次登记都发(tick 逐条各一只),去重在登记口:同对重复收到答 ignored、无副作用;认不得的 `scope` 词整条不登记(读口答 undefined),别猜。',
|
|
148
|
+
},
|
|
143
149
|
result_text_diverged: {
|
|
144
150
|
required: false,
|
|
145
151
|
duty: '可选:终帧正文与已上屏正文**互相都不是对方前缀**时的诚实披露。🔴 处置是把这一拍的转录行**改口**' +
|
|
@@ -170,7 +176,8 @@ const CHROME_ARM_TABLE = {
|
|
|
170
176
|
},
|
|
171
177
|
approval_complete: {
|
|
172
178
|
required: true,
|
|
173
|
-
duty: '
|
|
179
|
+
duty: '结局三态只读 classifyApprovalCompleteFrame(frame)(live-expired-parked / live-expired-retract / settled;null = 认不出、别猜结局),不自拼 outcome / cause / parked 的读法;' +
|
|
180
|
+
'清卡用的 askId 经 sdk isApprovalCompleteFrameV1 窄化取,窄不下来按 askId(若有)清卡;按开卡帧的 askId 清本地卡,三态任一都清' +
|
|
174
181
|
'(与撤卡帧不冲突,两帧都可能到;清卡是这张卡的一条出口,呈卡臂登记的持有句柄照放);🔴 永不据本帧推断 run 的归宿(读 run 行 / 停驻面),' +
|
|
175
182
|
'expired 不是拒绝,带 parked 的是转进耐久队列、还在等人;账本重放的消卡帧只用于时间线渲染,卡集对账基准恒为开流 preamble(帧可能整帧丢失)',
|
|
176
183
|
},
|
package/dist/seatContract.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ import type { McpPanelView } from "./mcpPanel.js";
|
|
|
15
15
|
import type { McpToolToggleKey } from "./mcpToolToggles.js";
|
|
16
16
|
import { type ThinkingLatchEvent, type ThinkingLatchRowWord } from "./thinkingLatchWords.js";
|
|
17
17
|
import type { SessionRowPatchFields, SessionRowUnreadable } from "./sessionRowTag.js";
|
|
18
|
-
import { type SessionEngineView } from "./sessionEngine.js";
|
|
18
|
+
import { type SessionEngineKind, type SessionEngineView } from "./sessionEngine.js";
|
|
19
|
+
import type { ParkedUnresumableRow } from "./hitl/parkedUnresumable.js";
|
|
20
|
+
import { type EngineSwapCard } from "./localEngineSwapCard.js";
|
|
19
21
|
export interface SeatValidationFailure {
|
|
20
22
|
reason: string;
|
|
21
23
|
field?: string;
|
|
@@ -56,6 +58,7 @@ export interface LocalSessionRecord {
|
|
|
56
58
|
thinkingLatch?: ThinkingLatchRowWord;
|
|
57
59
|
engine?: SessionEngineView;
|
|
58
60
|
executionLane?: string;
|
|
61
|
+
parkedUnresumable?: readonly ParkedUnresumableRow[];
|
|
59
62
|
}
|
|
60
63
|
export declare const TOOL_PERMISSION_REQUEST_ID_DOMAINS: readonly ["live:", "durable:", "question:", "elicit:", "plan:"];
|
|
61
64
|
export type ToolPermissionRequestIdDomain = (typeof TOOL_PERMISSION_REQUEST_ID_DOMAINS)[number];
|
|
@@ -106,6 +109,7 @@ declare const CHROME_ARM_SEAT_ROUTE: {
|
|
|
106
109
|
readonly compaction_started: "seat";
|
|
107
110
|
readonly compaction_outcome: "seat";
|
|
108
111
|
readonly engine_notice: "seat";
|
|
112
|
+
readonly subagent_alias: "seat";
|
|
109
113
|
readonly workflow_notification_enqueue: "host";
|
|
110
114
|
readonly plan_review_park: "host";
|
|
111
115
|
readonly approval_request: "host";
|
|
@@ -201,7 +205,7 @@ export type SeatStreamReading = {
|
|
|
201
205
|
};
|
|
202
206
|
export declare function seatStreamDeltaMessage(event: SeatStreamDeltaSource, ids: SeatStreamDeltaIds): SeatStreamEventMessage | undefined;
|
|
203
207
|
export declare function readSeatStreamDelta(message: object): SeatStreamReading;
|
|
204
|
-
export declare const SEAT_CAPABILITY_NAMES: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch", "computerUseSwitch", "engineModeDefaultOnly"];
|
|
208
|
+
export declare const SEAT_CAPABILITY_NAMES: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch", "computerUseSwitch", "engineModeDefaultOnly", "seatActions"];
|
|
205
209
|
export type SeatCapabilityName = (typeof SEAT_CAPABILITY_NAMES)[number];
|
|
206
210
|
export interface SeatCapabilitiesState {
|
|
207
211
|
pickFolder?: boolean;
|
|
@@ -215,6 +219,7 @@ export interface SeatCapabilitiesState {
|
|
|
215
219
|
thinkingLatch?: boolean;
|
|
216
220
|
computerUseSwitch?: boolean;
|
|
217
221
|
engineModeDefaultOnly?: boolean;
|
|
222
|
+
seatActions?: boolean;
|
|
218
223
|
}
|
|
219
224
|
export type SeatCapabilityReading = {
|
|
220
225
|
readonly kind: "reported";
|
|
@@ -254,6 +259,7 @@ export interface StartSessionOptions {
|
|
|
254
259
|
title?: string;
|
|
255
260
|
cwd?: string;
|
|
256
261
|
excludeTools?: string[];
|
|
262
|
+
engine?: SessionEngineKind;
|
|
257
263
|
}
|
|
258
264
|
export type PermissionModeIntent = PermissionMode;
|
|
259
265
|
export declare const PERMISSION_MODE_INTENTS: readonly PermissionModeIntent[];
|
|
@@ -312,6 +318,9 @@ export declare const ATTACHMENT_UPLOAD_REQUEST_KEYS: readonly ["name", "mimeType
|
|
|
312
318
|
export interface SessionScopedRequest {
|
|
313
319
|
sessionId: string;
|
|
314
320
|
}
|
|
321
|
+
export interface SeatResourceScope {
|
|
322
|
+
sessionId: string;
|
|
323
|
+
}
|
|
315
324
|
export interface SessionRowPatchRequest extends SessionRowPatchFields {
|
|
316
325
|
sessionId: string;
|
|
317
326
|
}
|
|
@@ -399,7 +408,7 @@ export interface SeatDeviceRevokeRequest {
|
|
|
399
408
|
}
|
|
400
409
|
export declare const checkSeatDeviceRebindRequest: (v: unknown) => SeatValidation;
|
|
401
410
|
export declare const checkSeatDeviceRevokeRequest: (v: unknown) => SeatValidation;
|
|
402
|
-
export declare const ENGINE_TARGET_REFUSALS: readonly ["busy", "switching", "not_configured", "not_signed_in", "probe_failed", "org_policy", "url_refused", "login_failed", "storage_unavailable", "no_local_runtime", "input"];
|
|
411
|
+
export declare const ENGINE_TARGET_REFUSALS: readonly ["busy", "switching", "not_configured", "not_signed_in", "probe_failed", "cloud_unreachable", "org_policy", "url_refused", "login_failed", "storage_unavailable", "no_local_runtime", "input"];
|
|
403
412
|
export type EngineTargetRefusal = (typeof ENGINE_TARGET_REFUSALS)[number];
|
|
404
413
|
export declare const CLOUD_LOGIN_FAILURES: readonly ["access_denied", "expired_token", "invalid_grant", "cancelled", "transport", "refused", "no_tokens", "other"];
|
|
405
414
|
export type CloudLoginFailure = (typeof CLOUD_LOGIN_FAILURES)[number];
|
|
@@ -473,9 +482,40 @@ export type SeatLocalMcpReading = {
|
|
|
473
482
|
readAt: string;
|
|
474
483
|
restartRequired?: true;
|
|
475
484
|
};
|
|
485
|
+
export declare const LOCAL_ENGINE_DOWN_REASONS: readonly ["lock-unavailable", "spawn-failed", "spawn-refused", "stop-failed", "crash-loop", "high-water-unreadable", "principal-unknown"];
|
|
486
|
+
export type LocalEngineDownReason = (typeof LOCAL_ENGINE_DOWN_REASONS)[number];
|
|
487
|
+
export declare const LOCAL_ENGINE_WAITING_REASONS: readonly ["starting", "dormant", "draining", "unanswered", "peer"];
|
|
488
|
+
export type LocalEngineWaitingReason = (typeof LOCAL_ENGINE_WAITING_REASONS)[number];
|
|
489
|
+
export type LocalEngineSeatReading = {
|
|
490
|
+
phase: "waiting";
|
|
491
|
+
why: LocalEngineWaitingReason;
|
|
492
|
+
unverifiable?: true;
|
|
493
|
+
} | {
|
|
494
|
+
phase: "attached";
|
|
495
|
+
} | {
|
|
496
|
+
phase: "pending";
|
|
497
|
+
serving: boolean;
|
|
498
|
+
card?: EngineSwapCard;
|
|
499
|
+
} | {
|
|
500
|
+
phase: "swapping";
|
|
501
|
+
mode: "idle" | "forced";
|
|
502
|
+
} | {
|
|
503
|
+
phase: "down";
|
|
504
|
+
reason: LocalEngineDownReason;
|
|
505
|
+
} | {
|
|
506
|
+
phase: "behind";
|
|
507
|
+
running: string;
|
|
508
|
+
own: string;
|
|
509
|
+
upgrade: "available" | "unavailable";
|
|
510
|
+
};
|
|
511
|
+
export declare const ENGINE_SWAP_ANSWER_OUTCOMES: readonly ["started", "stale-card", "nothing-pending"];
|
|
512
|
+
export type EngineSwapAnswerOutcome = (typeof ENGINE_SWAP_ANSWER_OUTCOMES)[number];
|
|
513
|
+
export declare const SELF_UPGRADE_OUTCOMES: readonly ["started", "unavailable"];
|
|
514
|
+
export type SelfUpgradeOutcome = (typeof SELF_UPGRADE_OUTCOMES)[number];
|
|
476
515
|
export interface EngineTargetLocal {
|
|
477
516
|
lastBootError?: string;
|
|
478
517
|
mcp?: SeatLocalMcpReading;
|
|
518
|
+
lifecycle?: LocalEngineSeatReading;
|
|
479
519
|
}
|
|
480
520
|
export interface EngineTargetState {
|
|
481
521
|
mode: "local" | "cloud";
|
|
@@ -646,6 +686,32 @@ export type SetComputerUsePlan = {
|
|
|
646
686
|
readonly reason: Exclude<ComputerUseRefusalReason, "write-failed">;
|
|
647
687
|
};
|
|
648
688
|
export declare function planSetComputerUse(request: {} | null | undefined, lockedByEnv: boolean): SetComputerUsePlan;
|
|
689
|
+
export declare const SEAT_ACTION_NAMES: readonly ["new-project", "prefill-composer"];
|
|
690
|
+
export type SeatActionName = (typeof SEAT_ACTION_NAMES)[number];
|
|
691
|
+
export type SeatAction = {
|
|
692
|
+
readonly action: "new-project";
|
|
693
|
+
} | {
|
|
694
|
+
readonly action: "prefill-composer";
|
|
695
|
+
readonly text: string;
|
|
696
|
+
readonly cwd?: string;
|
|
697
|
+
};
|
|
698
|
+
export interface SeatActionsClaim {
|
|
699
|
+
readonly actions: readonly string[];
|
|
700
|
+
}
|
|
701
|
+
export declare const checkSeatAction: (v: unknown) => SeatValidation;
|
|
702
|
+
export type SeatActionReading = {
|
|
703
|
+
readonly kind: "action";
|
|
704
|
+
readonly action: SeatAction;
|
|
705
|
+
} | {
|
|
706
|
+
readonly kind: "unknown";
|
|
707
|
+
readonly name: string;
|
|
708
|
+
} | {
|
|
709
|
+
readonly kind: "malformed";
|
|
710
|
+
readonly reason: string;
|
|
711
|
+
};
|
|
712
|
+
export declare function readSeatAction(ev: unknown): SeatActionReading;
|
|
713
|
+
export declare const checkSeatActionsClaim: (v: unknown) => SeatValidation;
|
|
714
|
+
export declare function claimedSeatActionsOf(claim: unknown): readonly SeatActionName[];
|
|
649
715
|
export interface LocalSessionsApi {
|
|
650
716
|
start(opts?: StartSessionOptions): Promise<LocalSessionRecord>;
|
|
651
717
|
sendMessage(req: SendMessageRequest): Promise<SendMessageAck>;
|
|
@@ -659,8 +725,8 @@ export interface LocalSessionsApi {
|
|
|
659
725
|
setModel(sessionId: string, model: string): Promise<boolean>;
|
|
660
726
|
getTranscript(sessionId: string): Promise<GetTranscriptResult>;
|
|
661
727
|
searchSessions(query: string): Promise<SessionSearchEnvelope>;
|
|
662
|
-
uploadAttachment(req: AttachmentUploadRequest): Promise<AttachmentUploadReceipt>;
|
|
663
|
-
listModels(): Promise<LiveModelCatalog>;
|
|
728
|
+
uploadAttachment(req: AttachmentUploadRequest, scope?: SeatResourceScope): Promise<AttachmentUploadReceipt>;
|
|
729
|
+
listModels(scope?: SeatResourceScope): Promise<LiveModelCatalog>;
|
|
664
730
|
applyModelConfig(req: ApplyModelConfigRequest): Promise<ApplyModelConfigResult>;
|
|
665
731
|
pickFolder(): Promise<string | null>;
|
|
666
732
|
listRecentFolders(): Promise<RecentFoldersResult>;
|
|
@@ -677,6 +743,8 @@ export interface LocalSessionsApi {
|
|
|
677
743
|
connectCloudEngine(req: CloudEngineConnectRequest): Promise<CloudConnectResult>;
|
|
678
744
|
configureCloudEngine(req: CloudEngineConfigureRequest): Promise<CloudConnectResult>;
|
|
679
745
|
clearCloudEngine(): Promise<EngineTargetResult>;
|
|
746
|
+
answerEngineSwap(choice: "force" | "wait", fingerprint: string): Promise<EngineSwapAnswerOutcome>;
|
|
747
|
+
beginSelfUpgrade(): Promise<SelfUpgradeOutcome>;
|
|
680
748
|
listOnboardProviders(): Promise<OnboardProvidersResult>;
|
|
681
749
|
probeOnboardEntry(req: OnboardEntryRequest): Promise<OnboardProbeResult>;
|
|
682
750
|
applyOnboardEntry(req: OnboardApplyRequest): Promise<OnboardApplyResult>;
|
|
@@ -686,8 +754,10 @@ export interface LocalSessionsApi {
|
|
|
686
754
|
setThinkingLatch(req: SetThinkingLatchRequest): Promise<OkAck>;
|
|
687
755
|
getComputerUse(): Promise<ComputerUseState>;
|
|
688
756
|
setComputerUse(req: SetComputerUseRequest): Promise<SetComputerUseResult>;
|
|
757
|
+
claimSeatActions(req: SeatActionsClaim): Promise<OkAck>;
|
|
689
758
|
onEvent(cb: (ev: LocalSessionEvent) => void): () => void;
|
|
690
759
|
onToolPermissionRequest(cb: (req: ToolPermissionRequest) => void): () => void;
|
|
760
|
+
onSeatAction(cb: (action: SeatAction) => void): () => void;
|
|
691
761
|
sessionsStateStore: EipcStoreClient<SessionsState>;
|
|
692
762
|
focusedSessionStateStore: EipcStoreClient<FocusedSessionState>;
|
|
693
763
|
settingsStateStore: EipcStoreClient<SettingsState>;
|
|
@@ -695,6 +765,7 @@ export interface LocalSessionsApi {
|
|
|
695
765
|
engineTargetStateStore: EipcStoreClient<EngineTargetState>;
|
|
696
766
|
}
|
|
697
767
|
export declare function isLocalSessionRecord(s: unknown): s is LocalSessionRecord;
|
|
768
|
+
export declare function readSeatParkedUnresumable(record: object): readonly ParkedUnresumableRow[] | undefined;
|
|
698
769
|
export declare function isToolPermissionRequest(r: unknown): r is ToolPermissionRequest;
|
|
699
770
|
export declare function readSeatSubagentContent(event: object): SubagentContentEvent | undefined;
|
|
700
771
|
export declare function isLocalSessionEvent(v: unknown): v is LocalSessionEvent;
|
|
@@ -729,14 +800,16 @@ export declare const checkSessionRowPatchRequest: (v: unknown) => SeatValidation
|
|
|
729
800
|
export declare function isSessionRowPatchRequest(v: unknown): v is SessionRowPatchRequest;
|
|
730
801
|
export declare const checkSetThinkingLatchRequest: (v: unknown) => SeatValidation;
|
|
731
802
|
export declare function isSetThinkingLatchRequest(v: unknown): v is SetThinkingLatchRequest;
|
|
803
|
+
export declare const checkStartSessionOptions: (v: unknown) => SeatValidation;
|
|
804
|
+
export declare const checkSeatResourceScope: (v: unknown) => SeatValidation;
|
|
732
805
|
export declare function isSendMessageAck(v: unknown): v is SendMessageAck;
|
|
733
806
|
export declare const LOCAL_SESSIONS_SPEC: EipcServiceSpec;
|
|
734
|
-
export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "pickFolder", "listRecentFolders", "noteRecentFolder", "patchSession", "listDevices", "readSessionBinding", "rebindSession", "issueEnrollToken", "revokeDevice", "setEngineMode", "startCloudLogin", "cancelCloudLogin", "connectCloudEngine", "configureCloudEngine", "clearCloudEngine", "listOnboardProviders", "probeOnboardEntry", "applyOnboardEntry", "readSessionMcpPanel", "listMcpToolToggles", "setMcpToolToggle", "setThinkingLatch", "getComputerUse", "setComputerUse", "onEvent", "onToolPermissionRequest"];
|
|
807
|
+
export declare const SEAT_METHOD_NAMES: readonly ["start", "sendMessage", "interrupt", "stop", "respondToToolPermission", "cancelQueuedMessage", "reorderQueuedMessage", "promoteQueuedMessage", "setFocusedSession", "setModel", "getTranscript", "searchSessions", "uploadAttachment", "listModels", "applyModelConfig", "pickFolder", "listRecentFolders", "noteRecentFolder", "patchSession", "listDevices", "readSessionBinding", "rebindSession", "issueEnrollToken", "revokeDevice", "setEngineMode", "startCloudLogin", "cancelCloudLogin", "connectCloudEngine", "configureCloudEngine", "clearCloudEngine", "answerEngineSwap", "beginSelfUpgrade", "listOnboardProviders", "probeOnboardEntry", "applyOnboardEntry", "readSessionMcpPanel", "listMcpToolToggles", "setMcpToolToggle", "setThinkingLatch", "getComputerUse", "setComputerUse", "claimSeatActions", "onEvent", "onToolPermissionRequest", "onSeatAction"];
|
|
735
808
|
export declare const SEAT_STORE_PROPS: readonly ["sessionsStateStore", "focusedSessionStateStore", "settingsStateStore", "seatCapabilitiesStateStore", "engineTargetStateStore"];
|
|
736
|
-
export declare const SEAT_EVENT_METHOD_NAMES: readonly ["onEvent", "onToolPermissionRequest"];
|
|
809
|
+
export declare const SEAT_EVENT_METHOD_NAMES: readonly ["onEvent", "onToolPermissionRequest", "onSeatAction"];
|
|
737
810
|
export declare const LOCAL_SESSION_EVENT_KEYS: readonly ["type", "sessionId", "message", "error", "errorCategory", "code", "session", "userMessageUuid", "requestId", "outcome", "parked", "chrome", "_sema_turnFailure", "subagentContent"];
|
|
738
811
|
export declare const TOOL_PERMISSION_REQUEST_KEYS: readonly ["requestId", "sessionId", "toolName", "toolCallId", "input", "message", "toctouBinding", "createdAtMs", "governanceForced", "delegation", "mandated", "mandate", "origin", "ruleOffersAbsence", "askClass", "classes", "sessionRow"];
|
|
739
|
-
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "rowTag", "unreadable", "thinkingLatch", "engine", "executionLane"];
|
|
812
|
+
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "rowTag", "unreadable", "thinkingLatch", "engine", "executionLane", "parkedUnresumable"];
|
|
740
813
|
export declare const SEND_MESSAGE_REQUEST_KEYS: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "forwardSubagentEvents", "retainSubagentSessions", "settings", "scenario", "rewind"];
|
|
741
814
|
export declare const SEAT_SEND_MESSAGE_KEY_ORIGINS: {
|
|
742
815
|
readonly sessionId: {
|
|
@@ -781,12 +854,12 @@ export declare const SEAT_SEND_MESSAGE_KEY_ORIGINS: {
|
|
|
781
854
|
};
|
|
782
855
|
};
|
|
783
856
|
export declare const TOOL_PERMISSION_DECISION_KEYS: readonly ["sessionId", "requestId", "decision", "answer", "updatedInput", "remember"];
|
|
784
|
-
export declare const START_SESSION_OPTION_KEYS: readonly ["model", "title", "cwd", "excludeTools"];
|
|
857
|
+
export declare const START_SESSION_OPTION_KEYS: readonly ["model", "title", "cwd", "excludeTools", "engine"];
|
|
785
858
|
export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
786
859
|
readonly LocalSessionRecord: {
|
|
787
860
|
readonly guard: "isLocalSessionRecord";
|
|
788
861
|
readonly check: (v: unknown) => SeatValidation;
|
|
789
|
-
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "rowTag", "unreadable", "thinkingLatch", "engine", "executionLane"];
|
|
862
|
+
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "cwd", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked", "pinned", "rowTag", "unreadable", "thinkingLatch", "engine", "executionLane", "parkedUnresumable"];
|
|
790
863
|
readonly unchecked: readonly [];
|
|
791
864
|
};
|
|
792
865
|
readonly ToolPermissionRequest: {
|
|
@@ -855,6 +928,9 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
855
928
|
}, {
|
|
856
929
|
readonly key: "modelPlane";
|
|
857
930
|
readonly why: "诊断面(0.106.0 CC-1156;这台引擎服务的是哪张模型表 / 最近一份目录候选的结局),三态读法归 modelPlaneOf(含坏形 unreadable、表外词整位不给);出站门为它拒掉整份目录 = 选单为一行诊断整个消失。";
|
|
931
|
+
}, {
|
|
932
|
+
readonly key: "aliases";
|
|
933
|
+
readonly why: "受理面(0.108.0 CC-944;除行名之外引擎还认的模型词),读法归 modelAcceptanceOf(缺席 = 更早的服务端,照旧判;在场而坏形 ⇒ 没找到行的词读 catalog_unreadable);出站门为它拒掉整份目录 = 选单为一份受理数据整个消失。";
|
|
858
934
|
}];
|
|
859
935
|
};
|
|
860
936
|
readonly SendMessageRequest: {
|
|
@@ -875,6 +951,21 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
875
951
|
readonly validated: readonly ["sessionId", "event"];
|
|
876
952
|
readonly unchecked: readonly [];
|
|
877
953
|
};
|
|
954
|
+
readonly StartSessionOptions: {
|
|
955
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
956
|
+
readonly validated: readonly ["model", "title", "cwd", "excludeTools", "engine"];
|
|
957
|
+
readonly unchecked: readonly [];
|
|
958
|
+
};
|
|
959
|
+
readonly SeatResourceScope: {
|
|
960
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
961
|
+
readonly validated: readonly ["sessionId"];
|
|
962
|
+
readonly unchecked: readonly [];
|
|
963
|
+
};
|
|
964
|
+
readonly SeatActionsClaim: {
|
|
965
|
+
readonly check: (v: unknown) => SeatValidation;
|
|
966
|
+
readonly validated: readonly ["actions"];
|
|
967
|
+
readonly unchecked: readonly [];
|
|
968
|
+
};
|
|
878
969
|
readonly ApplyModelConfigResult: {
|
|
879
970
|
readonly check: (v: unknown) => SeatValidation;
|
|
880
971
|
readonly validated: readonly ["ok", "requiresRestart", "reason", "detail"];
|
|
@@ -928,7 +1019,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
928
1019
|
};
|
|
929
1020
|
readonly SeatCapabilitiesState: {
|
|
930
1021
|
readonly check: (v: unknown) => SeatValidation;
|
|
931
|
-
readonly validated: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch", "computerUseSwitch", "engineModeDefaultOnly"];
|
|
1022
|
+
readonly validated: readonly ["pickFolder", "rewind", "recents", "patchSession", "devices", "engineTarget", "onboard", "mcpToolToggles", "thinkingLatch", "computerUseSwitch", "engineModeDefaultOnly", "seatActions"];
|
|
932
1023
|
readonly unchecked: readonly [];
|
|
933
1024
|
};
|
|
934
1025
|
readonly RecentFoldersResult: {
|
|
@@ -968,7 +1059,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
968
1059
|
};
|
|
969
1060
|
};
|
|
970
1061
|
export declare const SEAT_VALIDATOR_COVERAGE_EXEMPT: readonly [...{
|
|
971
|
-
label: "DeviceListOutcome" | "DeviceSessionBindingOutcome" | "DeviceRebindOutcome" | "DeviceEnrollTokenOutcome" | "DeviceRevokeOutcome" | "SeatDeviceRebindRequest" | "SeatDeviceRevokeRequest" | "EngineTargetState" | "EngineTargetResult" | "CloudLoginStart" | "CloudLoginCancelAck" | "CloudConnectResult" | "CloudLoginRequest" | "CloudEngineConnectRequest" | "CloudEngineConfigureRequest" | "OnboardProvidersResult" | "OnboardProbeResult" | "OnboardApplyResult" | "OnboardEntryRequest" | "OnboardApplyRequest" | "McpToolTogglesResult" | "McpToolToggleKey" | "ComputerUseState" | "SetComputerUseResult" | "SetComputerUseRequest";
|
|
1062
|
+
label: "DeviceListOutcome" | "DeviceSessionBindingOutcome" | "DeviceRebindOutcome" | "DeviceEnrollTokenOutcome" | "DeviceRevokeOutcome" | "SeatDeviceRebindRequest" | "SeatDeviceRevokeRequest" | "EngineTargetState" | "EngineTargetResult" | "CloudLoginStart" | "CloudLoginCancelAck" | "CloudConnectResult" | "CloudLoginRequest" | "CloudEngineConnectRequest" | "CloudEngineConfigureRequest" | "OnboardProvidersResult" | "OnboardProbeResult" | "OnboardApplyResult" | "OnboardEntryRequest" | "OnboardApplyRequest" | "McpToolTogglesResult" | "McpToolToggleKey" | "ComputerUseState" | "SetComputerUseResult" | "SetComputerUseRequest" | "SeatAction" | "EngineSwapAnswerOutcome" | "SelfUpgradeOutcome";
|
|
972
1063
|
check: (v: unknown) => SeatValidation;
|
|
973
1064
|
why: string;
|
|
974
1065
|
}[], {
|