@ycodium-ai/plugin-api 0.2.3000 → 0.2.3008
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/README.md +11 -4
- package/dist/communication.d.ts +1 -1
- package/dist/dataPorts.gen.d.ts +277 -125
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/executor.d.ts +15 -767
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js +5 -129
- package/dist/executor.js.map +1 -1
- package/dist/executorCard.d.ts +279 -0
- package/dist/executorCard.d.ts.map +1 -0
- package/dist/executorCard.js +48 -0
- package/dist/executorCard.js.map +1 -0
- package/dist/executorEvents.d.ts +170 -0
- package/dist/executorEvents.d.ts.map +1 -0
- package/dist/executorEvents.js +8 -0
- package/dist/executorEvents.js.map +1 -0
- package/dist/executorSession.d.ts +301 -0
- package/dist/executorSession.d.ts.map +1 -0
- package/dist/executorSession.js +3 -0
- package/dist/executorSession.js.map +1 -0
- package/dist/executorSpawn.d.ts +48 -0
- package/dist/executorSpawn.d.ts.map +1 -0
- package/dist/executorSpawn.js +87 -0
- package/dist/executorSpawn.js.map +1 -0
- package/dist/index.d.ts +17 -614
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/pluginContextCommands.d.ts +152 -0
- package/dist/pluginContextCommands.d.ts.map +1 -0
- package/dist/pluginContextCommands.js +2 -0
- package/dist/pluginContextCommands.js.map +1 -0
- package/dist/pluginContextProviders.d.ts +203 -0
- package/dist/pluginContextProviders.d.ts.map +1 -0
- package/dist/pluginContextProviders.js +2 -0
- package/dist/pluginContextProviders.js.map +1 -0
- package/dist/pluginContextThreads.d.ts +206 -0
- package/dist/pluginContextThreads.d.ts.map +1 -0
- package/dist/pluginContextThreads.js +2 -0
- package/dist/pluginContextThreads.js.map +1 -0
- package/dist/pluginContextWorkspace.d.ts +76 -0
- package/dist/pluginContextWorkspace.d.ts.map +1 -0
- package/dist/pluginContextWorkspace.js +2 -0
- package/dist/pluginContextWorkspace.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,14 +10,14 @@ import type * as CapabilityPorts from "./capabilityPorts.ts";
|
|
|
10
10
|
import type { PluginToolkit } from "./plugin-tools.ts";
|
|
11
11
|
export * from "./capabilityPorts.ts";
|
|
12
12
|
export type * from "./plugin-tools.ts";
|
|
13
|
-
import type { ExecutorContribution
|
|
14
|
-
import type { PluginDataPorts,
|
|
13
|
+
import type { ExecutorContribution } from "./executor.ts";
|
|
14
|
+
import type { PluginDataPorts, ThreadsListOutput } from "./dataPorts.gen.ts";
|
|
15
15
|
import type { PluginUserInput } from "./pending-requests.ts";
|
|
16
16
|
export * from "./dataPorts.gen.ts";
|
|
17
17
|
/** 会话目录的一行(`ctx.threads.list` 返回页的 `items`):只有壳,没有消息正文。 */
|
|
18
18
|
export type PluginThreadShell = ThreadsListOutput["items"][number];
|
|
19
19
|
import type { PluginProcess, PluginSocket, PluginPorts, PluginNetwork } from "./process-socket.ts";
|
|
20
|
-
import type { PluginSettingsCard
|
|
20
|
+
import type { PluginSettingsCard } from "./settings-actions.ts";
|
|
21
21
|
export type * from "./settings-actions.ts";
|
|
22
22
|
export { mergeLaunchEnv } from "./executor.ts";
|
|
23
23
|
export * from "./executorModelOptions.ts";
|
|
@@ -46,619 +46,22 @@ export * from "./settings-card-shape.ts";
|
|
|
46
46
|
export { parseRetryAfterMs } from "./usage.ts";
|
|
47
47
|
export type { ExecutorQuotaBalance, ExecutorQuotaReading, ExecutorQuotaResetResult, ExecutorQuotaUnavailableReason, ExecutorQuotaWindow, ExecutorTokenRecord, ExecutorTokenTotals, ExecutorTokenUsageReading, ExecutorUsage, ExecutorUsageText, } from "./usage.ts";
|
|
48
48
|
export type { ExecutorCard, ExecutorContribution, ExecutorFormControl, ExecutorFormField, ExecutorFormFieldAnnotation, ExecutorHost, ExecutorInstance, ExecutorSessionCandidate, ExecutorSessionRecord, } from "./executor.ts";
|
|
49
|
-
|
|
49
|
+
import type { PluginCommands, PluginDisposer, PluginNotifications, PluginOperations, PluginSettings } from "./pluginContextCommands.ts";
|
|
50
|
+
import type { PluginEnvironment, PluginProviders } from "./pluginContextProviders.ts";
|
|
51
|
+
import type { PluginProxies, PluginWorkspace } from "./pluginContextWorkspace.ts";
|
|
52
|
+
import type { PluginAttachments, PluginThread, PluginThreadExecution, PluginThreadMessage } from "./pluginContextThreads.ts";
|
|
53
|
+
export type { PluginDisposer, PluginSettings, PluginCommandReceipt, PluginCommandDispatchResult, PluginNotifications, PluginOperationName, PluginOperationCheckInput, PluginOperations, PluginCommands, } from "./pluginContextCommands.ts";
|
|
54
|
+
export type { PluginEnvironment, PluginProviderModel, PluginProviderInstance, PluginProviderSessionBinding, PluginProviderResumeCursorInput, PluginProviderSessions, PluginProviderNativeSessions, PluginProviders, PluginModelSelection, } from "./pluginContextProviders.ts";
|
|
55
|
+
export type { PluginWorkspace, PluginProxy, PluginRequiredProxySelection, PluginProxySelection, PluginProxies, PluginProject, } from "./pluginContextWorkspace.ts";
|
|
56
|
+
export type { PluginActivity, PluginAttachmentInput, PluginAttachment, PluginAttachments, PluginThreadMessage, PluginThreadSession, PluginThreadOrigin, PluginThreadForkPoint, PluginTurnIntent, PluginThreadExecution, PluginThread, } from "./pluginContextThreads.ts";
|
|
57
|
+
export declare const PLUGIN_API_VERSION = 7;
|
|
50
58
|
/**
|
|
51
|
-
* 宿主装载的最旧 apiVersion。低于它太旧;高于 PLUGIN_API_VERSION 则是宿主太旧。
|
|
52
|
-
* `
|
|
53
|
-
*
|
|
59
|
+
* 宿主装载的最旧 apiVersion。低于它太旧;高于 PLUGIN_API_VERSION 则是宿主太旧。7 换了
|
|
60
|
+
* `communication.records.get` / `.list` 的形状(按号读交的是视图,正文可以是 null;列表按项目与范围取、
|
|
61
|
+
* 交的是摘要与游标),照旧形状写的插件读到的东西对不上,所以最低版本就是 7 本身。
|
|
54
62
|
*/
|
|
55
|
-
export declare const PLUGIN_API_MIN_VERSION =
|
|
56
|
-
export type PluginApiVersion =
|
|
57
|
-
/**
|
|
58
|
-
* 注册类调用统一返回它;不调用也行,插件 Scope 关闭时宿主会替你撤销。
|
|
59
|
-
*
|
|
60
|
-
* 插件已经 dispose 之后再注册任何贡献(activate 之后异步注册的常见情形):宿主只记
|
|
61
|
-
* 一条 warning,返回一个 **no-op disposer**,那条贡献不会进已经死掉的记录,也不抛错。
|
|
62
|
-
*/
|
|
63
|
-
export type PluginDisposer = () => void;
|
|
64
|
-
export interface PluginSettings<Config> {
|
|
65
|
-
/** 读本插件在 home patch 层的那份 config(`password` 已解成明文);home 层没写过就回退到 `ctx.config`,不是空对象。 */
|
|
66
|
-
readonly read: () => Promise<Config>;
|
|
67
|
-
/** 整体替换本插件那条 config,之后照 `onChange` 就地换或重启这一个插件;已存的密码引用不被覆盖,存新密码用 options.secrets。 */
|
|
68
|
-
readonly write: (config: Config, options?: PluginSettingsWriteOptions) => Promise<void>;
|
|
69
|
-
/**
|
|
70
|
-
* 配置变了(存卡片、`write`)时宿主不重启插件,把新 config(密码已解)交给 handler,`ctx.config` 也换成新值。
|
|
71
|
-
* 没注册 handler 的插件照旧重启;handler 抛错或 reject,宿主退回重启这一个插件。返回值取消注册。
|
|
72
|
-
*/
|
|
73
|
-
readonly onChange: (handler: (config: Config) => void | Promise<void>) => () => void;
|
|
74
|
-
}
|
|
75
|
-
export type PluginCommandReceipt = {
|
|
76
|
-
readonly status: "absent";
|
|
77
|
-
} | {
|
|
78
|
-
readonly status: "accepted";
|
|
79
|
-
readonly sequence: number;
|
|
80
|
-
} | {
|
|
81
|
-
readonly status: "rejected";
|
|
82
|
-
readonly error: string | null;
|
|
83
|
-
};
|
|
84
|
-
export interface PluginCommandDispatchResult {
|
|
85
|
-
/** accepted 只表示命令持久受理;provider 投递确认须查 turn intent。 */
|
|
86
|
-
readonly status: "accepted" | "noop";
|
|
87
|
-
readonly sequence: number;
|
|
88
|
-
readonly replayed: boolean;
|
|
89
|
-
readonly result?: unknown;
|
|
90
|
-
}
|
|
91
|
-
export interface PluginNotifications {
|
|
92
|
-
/** 来源须有执行归属,只能通知同项目的来源会话或其祖先;正文走通信记录,唤醒走持久队列。 */
|
|
93
|
-
readonly send: (input: {
|
|
94
|
-
readonly threadId: string;
|
|
95
|
-
readonly sourceThreadId: string;
|
|
96
|
-
readonly summary: string;
|
|
97
|
-
/** 同一通知跨重启重试必须复用 generation;返回不表示 provider 已收到。 */
|
|
98
|
-
readonly generation?: string | undefined;
|
|
99
|
-
}) => Promise<PluginCommandDispatchResult & {
|
|
100
|
-
readonly recordId: string;
|
|
101
|
-
}>;
|
|
102
|
-
}
|
|
103
|
-
/** 宿主会问插件的操作。只增不删:老插件登记过的名字永远还认。 */
|
|
104
|
-
export type PluginOperationName = "server.upgrade" | "project.archive";
|
|
105
|
-
/**
|
|
106
|
-
* 交给 check 的入参,按操作名分派。`server.upgrade` 带发起升级的会话;
|
|
107
|
-
* `project.archive` 带即将归档的项目,拿掉这个项目在这台机器上的文件夹时问的也是它。
|
|
108
|
-
*/
|
|
109
|
-
export type PluginOperationCheckInput<O extends PluginOperationName = PluginOperationName> = O extends "server.upgrade" ? {
|
|
110
|
-
readonly operation: "server.upgrade";
|
|
111
|
-
readonly threadId: string;
|
|
112
|
-
} : O extends "project.archive" ? {
|
|
113
|
-
readonly operation: "project.archive";
|
|
114
|
-
readonly projectId: string;
|
|
115
|
-
/**
|
|
116
|
-
* 宿主已提交的事件序号。领域状态由事件异步推进的插件,先追到它再回答,
|
|
117
|
-
* 才看得见归档前一瞬刚发生的事(同 `commands.guard` 的 throughSequence)。
|
|
118
|
-
*/
|
|
119
|
-
readonly throughSequence?: number | undefined;
|
|
120
|
-
} : never;
|
|
121
|
-
export interface PluginOperations {
|
|
122
|
-
/**
|
|
123
|
-
* 给一类宿主操作加规则,规则随插件停用撤销。
|
|
124
|
-
*
|
|
125
|
-
* - `server.upgrade` 只约束本插件创建的会话及其委派后代。
|
|
126
|
-
* - `project.archive` 在归档这台机器上的某个项目、或拿掉它的文件夹之前,问所有已加载的
|
|
127
|
-
* 插件,不按会话归属限定。check 只能读、不能派发命令;5 秒不答、抛错都按拒绝处理。
|
|
128
|
-
* 拒绝原句会点名你的插件,所以 detail 是写给用户看的:说清楚什么还没做完;宿主会折叠
|
|
129
|
-
* 其中的空白并截到 300 字符。
|
|
130
|
-
*
|
|
131
|
-
* 具名声明规则对象时用 `PluginOperationCheckInput<"server.upgrade">` 标 check 的入参。
|
|
132
|
-
* 不要写 `Parameters<PluginOperations["guard"]>[0]`:泛型 O 取不到具体操作,入参会
|
|
133
|
-
* 变成全部操作的联合,你的 check 赋不进去。直接内联 `guard({...})`、不标入参类型也可以。
|
|
134
|
-
*/
|
|
135
|
-
readonly guard: <O extends PluginOperationName>(guard: {
|
|
136
|
-
readonly operations: readonly O[];
|
|
137
|
-
readonly check: (input: PluginOperationCheckInput<O>) => Promise<{
|
|
138
|
-
readonly allowed: true;
|
|
139
|
-
} | {
|
|
140
|
-
readonly allowed: false;
|
|
141
|
-
readonly detail: string;
|
|
142
|
-
}>;
|
|
143
|
-
}) => PluginDisposer;
|
|
144
|
-
}
|
|
145
|
-
export interface PluginCommands {
|
|
146
|
-
/**
|
|
147
|
-
* 为本插件创建的会话检查起轮准入,覆盖聊天、工具和后台入口。
|
|
148
|
-
* 检查期间只能读取状态,不能再派发命令;停用时自动撤销。
|
|
149
|
-
*/
|
|
150
|
-
readonly guard: (guard: {
|
|
151
|
-
readonly name: string;
|
|
152
|
-
readonly check: (input: {
|
|
153
|
-
readonly threadId: string;
|
|
154
|
-
readonly messageId: string;
|
|
155
|
-
/** 有值时,这一轮是已持久通信记录的投递物。 */
|
|
156
|
-
readonly recordId?: string | undefined;
|
|
157
|
-
readonly throughSequence: number;
|
|
158
|
-
}) => Promise<{
|
|
159
|
-
readonly allowed: true;
|
|
160
|
-
} | {
|
|
161
|
-
readonly allowed: false;
|
|
162
|
-
readonly detail: string;
|
|
163
|
-
}>;
|
|
164
|
-
}) => PluginDisposer;
|
|
165
|
-
/**
|
|
166
|
-
* 派发一条编排 command。形状不合法会 reject。
|
|
167
|
-
*
|
|
168
|
-
* **两道门**(路线图 #62):
|
|
169
|
-
*
|
|
170
|
-
* 1. **要声明。** manifest 的 `commands.dispatch` 权限逐条列出你要派的命令类型,
|
|
171
|
-
* 没声明或不在名单里当场 reject(reason `undeclared` / `not-declared`)。
|
|
172
|
-
* 能选的命令是宿主定的一张封闭名单——`project.delete`、`thread.delete`、
|
|
173
|
-
* `thread.message.assistant.complete` 这类不在里面,写进 manifest 解码就断。
|
|
174
|
-
* 2. **默认只碰自己开的会话。** 带 `threadId` 的那几条(`thread.turn.start` / `thread.turn.interrupt` /
|
|
175
|
-
* `thread.approval.respond` / `thread.user-input.respond` / `thread.turn-intent.run` /
|
|
176
|
-
* `thread.turn-intent.cancel` / `thread.turn-queue.resume` / `thread.external-messages.append`)只许落在你用
|
|
177
|
-
* `thread.create` 或 `thread.import` 开出来的会话上,别的 reject(reason `foreign-thread`)。
|
|
178
|
-
* 声明了 `threads.user` 时,除 `thread.external-messages.append` 外,可落到本机某个 project 上的用户会话
|
|
179
|
-
* (起轮/审批/提问/插话等);仍不转交执行归属。**插件挂载所在的那条会话也不算自己的**:
|
|
180
|
-
* 那是人跟 agent 对话的地方,能在那儿替人按批准等于自己给自己开绿灯。
|
|
181
|
-
*
|
|
182
|
-
* 署名只由服务器盖章:命令里自带的 `author`(`thread.turn.start`)与 `createdBy`
|
|
183
|
-
* (`thread.create`)会被宿主剥掉,会话与消息记成没有作者,插件没有可冒用的身份。
|
|
184
|
-
*
|
|
185
|
-
* `thread.turn.start` 里的 `intentAction`(服务器内部的「入队即插话」入口)只有
|
|
186
|
-
* `source: "automatic"` 的会被放行,其余被剥掉;用户式的插话与打断走
|
|
187
|
-
* `thread.turn-intent.run`。
|
|
188
|
-
*
|
|
189
|
-
* `thread.create` 的执行归属由宿主持久保存,按安装条目与插件身份认:重新挂载或数据搬了位置后仍可控制原会话,重放也认回原收据。
|
|
190
|
-
* 同项目的 continuation 沿来源链继承归属,显式新归属优先;普通委派或分叉不继承。`thread.import` 的临时执行权限不跨挂载;已有历史跟读授权
|
|
191
|
-
* 不会因重启或重放导入回执而变成执行权限。停用后的旧实例不可继续派发命令。`result` 是命令类型定的业务结果(如新建对象的号),同号重放同一份,多数命令没有。
|
|
192
|
-
*/
|
|
193
|
-
readonly dispatch: (command: unknown) => Promise<PluginCommandDispatchResult>;
|
|
194
|
-
/** 仅查询已声明的命令;落在既有会话上的命令(起轮、分叉等)要带 threadId 并要求线程执行归属,开会话、导入与其余命令按安装身份映射 commandId、可省略 threadId,只查得到自己派的。 */
|
|
195
|
-
readonly getReceipt: (input: {
|
|
196
|
-
readonly commandId: string;
|
|
197
|
-
readonly commandType: string;
|
|
198
|
-
readonly threadId?: string;
|
|
199
|
-
}) => Promise<PluginCommandReceipt>;
|
|
200
|
-
}
|
|
201
|
-
/** 这台 environment 的身份。用户看到的名字是「机器」。 */
|
|
202
|
-
export interface PluginEnvironment {
|
|
203
|
-
/** 服务器持久化的 environment id,不是主机名:两台机器可以同名。 */
|
|
204
|
-
readonly id: string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* provider 实例当前报出来的一个模型。挑模型只要这三个字段,快照里其余的
|
|
208
|
-
* (能力位、上下文窗口、隐藏标记)是界面的事。
|
|
209
|
-
*/
|
|
210
|
-
export interface PluginProviderModel {
|
|
211
|
-
/** 发起 turn 时写进 modelSelection 的那个值。 */
|
|
212
|
-
readonly slug: string;
|
|
213
|
-
readonly name: string;
|
|
214
|
-
/** 该实例的默认模型。一个实例最多一个。 */
|
|
215
|
-
readonly isDefault: boolean;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* 一个 provider 实例的高层视图。宿主替插件解析各 driver 的 home 布局,
|
|
219
|
-
* 插件不抄这些细节。字段只增不改。
|
|
220
|
-
*/
|
|
221
|
-
export interface PluginProviderInstance {
|
|
222
|
-
readonly instanceId: string;
|
|
223
|
-
/** `claudeAgent`、`codex`、`cursor`…… 宿主的 driver 名。 */
|
|
224
|
-
readonly driver: string;
|
|
225
|
-
readonly displayName: string | null;
|
|
226
|
-
readonly enabled: boolean;
|
|
227
|
-
/** 只有解析得出 home 布局的 driver 有值(当前是 claude / codex),其余是 null。 */
|
|
228
|
-
readonly homePath: string | null;
|
|
229
|
-
/** provider CLI 自己的会话转录目录;解析不出来是 null。 */
|
|
230
|
-
readonly transcriptDir: string | null;
|
|
231
|
-
/**
|
|
232
|
-
* provider CLI 读自己配置文件的那个目录:claude 的 `settings.json`、codex 的
|
|
233
|
-
* `config.toml` 都在这里。解析不出来是 null。
|
|
234
|
-
*
|
|
235
|
-
* 判断「这个实例连的到底是不是官方服务」要读这些文件,路径只有宿主算得准
|
|
236
|
-
* (`CLAUDE_CONFIG_DIR` 的优先级、codex 的 auth overlay 布局)。读它本身仍然要
|
|
237
|
-
* `fs.read` 声明覆盖到这个目录。
|
|
238
|
-
*/
|
|
239
|
-
readonly configDirPath: string | null;
|
|
240
|
-
/**
|
|
241
|
-
* 用户为这个实例配了哪些环境变量:只有名字(排序),**不给值**,也不含宿主进程环境。
|
|
242
|
-
*
|
|
243
|
-
* 实例变量里常是 API key,插件拿不到它的值。要判断「用户为这个 provider 配了密钥吗」
|
|
244
|
-
* 看名字在不在这里就够了。
|
|
245
|
-
*/
|
|
246
|
-
readonly environmentKeys: ReadonlyArray<string>;
|
|
247
|
-
/**
|
|
248
|
-
* 这个实例的 **driver 专属设置**,只含名片 `configSchema` 声明过的标量字段(字符串、数字、
|
|
249
|
-
* 布尔),去掉设置表单里画成密码框(`x-ycodium-form.control: "password"`)的字段;未声明的键、
|
|
250
|
-
* 对象与数组字段一律不给——里面可能夹着凭据。
|
|
251
|
-
*
|
|
252
|
-
* **形状随 driver 变,恕不另行通知。** 上面那些字段是宿主挑出来、并且承诺稳定的;
|
|
253
|
-
* 这一份不是承诺,是逃生口——它存在的理由是**不必为每个新需求往上面那张表里再加一个
|
|
254
|
-
* 字段**。读之前必须自己收窄类型;键不存在、类型不对、driver 换了写法,都要能不炸地
|
|
255
|
-
* 退回默认行为。
|
|
256
|
-
*
|
|
257
|
-
* 实例根本没配 driver 设置时是空对象,不是 undefined —— 少一层判空。
|
|
258
|
-
*/
|
|
259
|
-
readonly driverConfig: Readonly<Record<string, unknown>>;
|
|
260
|
-
/**
|
|
261
|
-
* 实例配置里的启动参数原文;没有就是空串。
|
|
262
|
-
*
|
|
263
|
-
* 与 `apiEndpoint` 一样,是 Usage 搬迁时从 `driverConfig` 里挑出来单开的字段。留着是
|
|
264
|
-
* 因为拿掉会弄坏既有插件,不是因为它们比别的键更重要。**新需求走 `driverConfig`**,
|
|
265
|
-
* 别再往这张表上加 driver 专属字段。
|
|
266
|
-
*/
|
|
267
|
-
readonly launchArgs: string;
|
|
268
|
-
/** 实例配置里的自定义 API endpoint(cursor 的 `-e`);没配是 null。见 `launchArgs`。 */
|
|
269
|
-
readonly apiEndpoint: string | null;
|
|
270
|
-
/**
|
|
271
|
-
* 这个实例当前可选的模型,来自与客户端共用的 provider 模型目录,包含已恢复的缓存。
|
|
272
|
-
*
|
|
273
|
-
* **缺席不等于没有模型**:它表示这个实例在注册表里还没加载出来(driver 没注册、
|
|
274
|
-
* 配置解不动、快照还没建好)。要给一条新 thread 挑模型的插件必须把缺席当作
|
|
275
|
-
* 「这个实例现在起不了 turn」处理,而不是退到某个猜的 slug。
|
|
276
|
-
*/
|
|
277
|
-
readonly models?: readonly PluginProviderModel[] | undefined;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* provider 会话目录里的一条绑定:哪条 thread 挂在哪个 provider 实例上,以及
|
|
281
|
-
* 重开原生会话要用的游标。
|
|
282
|
-
*/
|
|
283
|
-
export interface PluginProviderSessionBinding {
|
|
284
|
-
readonly threadId: string;
|
|
285
|
-
/** 绑定写下的 driver kind(`claudeAgent`、`codex`……),不是实例 id。 */
|
|
286
|
-
readonly driver: string;
|
|
287
|
-
/** 绑定所属的 provider 实例;老库里的行可能没有,缺就是 null。 */
|
|
288
|
-
readonly instanceId: string | null;
|
|
289
|
-
/**
|
|
290
|
-
* 各 driver 自己的形状(claude 是 `{ resume }`,codex 是 `{ threadId }`),宿主
|
|
291
|
-
* 不替插件解析 —— 原生会话 id 藏在哪个字段是 driver 的事。没有游标是 null。
|
|
292
|
-
*/
|
|
293
|
-
readonly resumeCursor: unknown;
|
|
294
|
-
/** 绑定记下的会话运行状态;读不出来是 null。 */
|
|
295
|
-
readonly status: string | null;
|
|
296
|
-
/** 这条绑定最后一次被写的时间(ISO)。 */
|
|
297
|
-
readonly lastSeenAt: string;
|
|
298
|
-
}
|
|
299
|
-
export interface PluginProviderResumeCursorInput {
|
|
300
|
-
readonly instanceId: string;
|
|
301
|
-
readonly threadId: string;
|
|
302
|
-
/** 写进绑定的游标原文,形状由 driver 定。 */
|
|
303
|
-
readonly cursor: unknown;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* provider 会话绑定。`list` 只读;`setResumeCursor` 是插件面上**唯一的写口**,
|
|
307
|
-
* 边界刻意收得很窄:
|
|
308
|
-
*
|
|
309
|
-
* - 只能写 `resumeCursor` 一个字段。driver kind 由宿主按 `instanceId` 解析,
|
|
310
|
-
* 状态、runtimeMode、runtimePayload 都归编排,插件碰不到。
|
|
311
|
-
* - 目标 thread 必须存在;`instanceId` 必须是这台机器上配着的 provider 实例。
|
|
312
|
-
* - thread 已经绑在**另一个**实例上时拒绝 —— 把别人的会话改道过来是数据损坏,
|
|
313
|
-
* 不是配置。要换实例走编排命令,不走这里。
|
|
314
|
-
*
|
|
315
|
-
* 拒绝时宿主留一条带 pluginId 的 warning。
|
|
316
|
-
*/
|
|
317
|
-
export interface PluginProviderSessions {
|
|
318
|
-
readonly list: () => Promise<readonly PluginProviderSessionBinding[]>;
|
|
319
|
-
readonly setResumeCursor: (input: PluginProviderResumeCursorInput) => Promise<void>;
|
|
320
|
-
/**
|
|
321
|
-
* 停掉一条 thread 的 provider 会话进程。第二个写口,边界同样收得很窄:
|
|
322
|
-
*
|
|
323
|
-
* - 只停,不启、不重启、不发消息。重开是下一条用户消息的事,由编排决定。
|
|
324
|
-
* - thread 必须存在,且此刻确实挂着一个**活着**的会话(`running` / `starting`)。
|
|
325
|
-
* 空闲、已停、压根没建过会话的一律拒绝——"停一个没在跑的东西"是插件算错了状态,
|
|
326
|
-
* 静默成功会把那个错误一直藏着。
|
|
327
|
-
* - 会话正在跑一个 turn 时照停:这正是它存在的理由(原生记录被别处写了,常驻进程
|
|
328
|
-
* 拿的是过期的上下文)。
|
|
329
|
-
*
|
|
330
|
-
* 拿不到"这条 thread 是不是本插件建的"这个事实(`ThreadOrigin` 不区分导入),所以
|
|
331
|
-
* 归属判不了;能查证的三条上面写全了。拒绝时宿主留一条带 pluginId 的 warning。
|
|
332
|
-
*/
|
|
333
|
-
readonly stop: (threadId: string) => Promise<void>;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* 一只手的原生会话入口:终端里跑过、留在磁盘上的那些会话。
|
|
337
|
-
*
|
|
338
|
-
* 形状就是执行器契约里的 `ExecutorSessionCandidate` / `ExecutorSessionRecord`——
|
|
339
|
-
* 宿主只把插件给的值原样递过来,不翻译、不另造同义字段。
|
|
340
|
-
*
|
|
341
|
-
* `scan` 只报手看得见的事实:`availability` 一律是 `"importable"`,「已经有 thread
|
|
342
|
-
* 绑着它了」是宿主的账,调用方自己按 `sessions.list()` 盖上去。
|
|
343
|
-
*/
|
|
344
|
-
export interface PluginProviderNativeSessions {
|
|
345
|
-
readonly scan: (input: {
|
|
346
|
-
readonly projectId: string;
|
|
347
|
-
readonly directory?: string;
|
|
348
|
-
readonly signal?: AbortSignal;
|
|
349
|
-
}) => Promise<{
|
|
350
|
-
readonly candidates: ReadonlyArray<ExecutorSessionCandidate>;
|
|
351
|
-
}>;
|
|
352
|
-
readonly read: (input: {
|
|
353
|
-
readonly nativeSessionId: string;
|
|
354
|
-
readonly cwd: string;
|
|
355
|
-
readonly signal?: AbortSignal;
|
|
356
|
-
}) => Promise<ExecutorSessionRecord>;
|
|
357
|
-
}
|
|
358
|
-
export interface PluginProviders {
|
|
359
|
-
readonly listInstances: () => Promise<readonly PluginProviderInstance[]>;
|
|
360
|
-
readonly getRouting: () => Promise<{
|
|
361
|
-
readonly allowlistOnly: boolean;
|
|
362
|
-
readonly roles: Readonly<Record<string, {
|
|
363
|
-
readonly instanceId: string;
|
|
364
|
-
readonly model: string;
|
|
365
|
-
}>>;
|
|
366
|
-
}>;
|
|
367
|
-
/** 按当前路由与可用实例解析选择;读取失败或目标不可用时拒绝。 */
|
|
368
|
-
readonly resolveSelection: (input: {
|
|
369
|
-
readonly base: PluginModelSelection | null;
|
|
370
|
-
readonly instanceId?: string;
|
|
371
|
-
readonly model?: string;
|
|
372
|
-
readonly options?: PluginModelSelection["options"];
|
|
373
|
-
readonly routingKey?: string;
|
|
374
|
-
}) => Promise<{
|
|
375
|
-
readonly modelSelection: PluginModelSelection;
|
|
376
|
-
}>;
|
|
377
|
-
readonly sessions: PluginProviderSessions;
|
|
378
|
-
/**
|
|
379
|
-
* 这个实例那只手自己会扫原生会话时给出入口;不会扫(宿主内置的 driver,或手没
|
|
380
|
-
* 实现 `sessions`)返回 null,调用方回落到自己那份扫描。
|
|
381
|
-
*
|
|
382
|
-
* 未知 instanceId **拒绝**,不悄悄返回 null:那会把「实例 id 写错了」伪装成
|
|
383
|
-
* 「这只手不会扫」,回落之后照样出结果,没人发现走的一直是自己那份。
|
|
384
|
-
*/
|
|
385
|
-
readonly nativeSessions: (instanceId: string) => Promise<PluginProviderNativeSessions | null>;
|
|
386
|
-
}
|
|
387
|
-
export interface PluginWorkspace {
|
|
388
|
-
/** 为本插件创建的独立工作树会话运行项目已配置的 setup 脚本,沿用宿主终端。 */
|
|
389
|
-
readonly setupThread: (threadId: string) => Promise<{
|
|
390
|
-
readonly status: "no-script";
|
|
391
|
-
} | {
|
|
392
|
-
readonly status: "started";
|
|
393
|
-
readonly scriptId: string;
|
|
394
|
-
readonly scriptName: string;
|
|
395
|
-
readonly terminalId: string;
|
|
396
|
-
readonly cwd: string;
|
|
397
|
-
}>;
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* 这台机器上配着的一个代理。**不含密码**:宿主自己往连接上加 `Proxy-Authorization`,
|
|
401
|
-
* 插件不需要、也拿不到那份凭据。
|
|
402
|
-
*/
|
|
403
|
-
export interface PluginProxy {
|
|
404
|
-
readonly id: string;
|
|
405
|
-
readonly displayName?: string | undefined;
|
|
406
|
-
readonly protocol: "http" | "https";
|
|
407
|
-
readonly host: string;
|
|
408
|
-
readonly port: number;
|
|
409
|
-
/** 不经这个代理直连的地址,逗号分隔。本机地址是硬约束,不在这里出现。 */
|
|
410
|
-
readonly bypass?: string | undefined;
|
|
411
|
-
/** 这一个就是机器的全局默认。整张表都没有 true 时,默认即直连。 */
|
|
412
|
-
readonly isDefault: boolean;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* 选哪个代理。与设置里每条功能的代理选择同义:
|
|
416
|
-
*
|
|
417
|
-
* - **省略 / `undefined`** —— 跟这台机器的全局默认走。
|
|
418
|
-
* - **`null`** —— 不加 Ycodium 配的代理。注意它只停 Ycodium 这一份:机器环境里的
|
|
419
|
-
* `HTTP_PROXY` / `HTTPS_PROXY` 照旧生效,宿主不去剥它们。
|
|
420
|
-
* - **代理 id** —— 用那一个。指向一个不存在的 id **静默退化成直连**。
|
|
421
|
-
* - **`{ required: id }`** —— 必须用那一个。代理不存在、设置读不出来、连不上
|
|
422
|
-
* 都 **reject**,不改走直连。订阅凭据这种不能从本机打出去的请求用这一档。
|
|
423
|
-
*
|
|
424
|
-
* 三态里悬空 id 仍静默直连,与 `ctx.http` 同一条规则:手改配置文件不该把长连接搞挂。
|
|
425
|
-
* 要确认某个 id 现在还在,先 `list()`。
|
|
426
|
-
*/
|
|
427
|
-
export type PluginRequiredProxySelection = {
|
|
428
|
-
readonly required: string;
|
|
429
|
-
};
|
|
430
|
-
export type PluginProxySelection = string | null | PluginRequiredProxySelection;
|
|
431
|
-
/**
|
|
432
|
-
* 按代理出网。列出这台机器配了什么,然后挑一个出网 —— IM 桥那种「每个实例各配
|
|
433
|
-
* 各的代理」的功能靠它,不必给每个实例塞一份自己的 HTTP 客户端。
|
|
434
|
-
*/
|
|
435
|
-
export interface PluginProxies {
|
|
436
|
-
/** 这台机器配着的代理,按 id 升序。一个都没配就是空数组,不是错误。 */
|
|
437
|
-
readonly list: () => Promise<readonly PluginProxy[]>;
|
|
438
|
-
/**
|
|
439
|
-
* 按三态选择出网的 fetch。选择在**调用时**解析(跟着当前设置走),拿到的 fetch
|
|
440
|
-
* 之后一直走那个代理 —— 所以设置改了要重新调一次,别把返回值缓存一辈子。
|
|
441
|
-
*
|
|
442
|
-
* `ctx.http` 等价于建插件时调过一次 `fetch()`(省略参数那一档):一样的解析规则、
|
|
443
|
-
* 一样的连接池,只是解析发生在宿主建能力面的时刻。想让改过的代理设置立刻生效而
|
|
444
|
-
* 不重启,就用这条重新要一个。
|
|
445
|
-
*/
|
|
446
|
-
readonly fetch: (proxy?: PluginProxySelection | undefined) => Promise<typeof globalThis.fetch>;
|
|
447
|
-
}
|
|
448
|
-
/** 投影出来的一条线程活动。payload 保持 unknown,由插件按 kind 收窄。 */
|
|
449
|
-
export interface PluginActivity {
|
|
450
|
-
readonly activityId: string;
|
|
451
|
-
readonly threadId: string;
|
|
452
|
-
readonly turnId: string | null;
|
|
453
|
-
readonly kind: string;
|
|
454
|
-
readonly tone?: string | undefined;
|
|
455
|
-
readonly summary: string;
|
|
456
|
-
readonly payload: unknown;
|
|
457
|
-
readonly createdAt: string;
|
|
458
|
-
}
|
|
459
|
-
/** 在某个 provider 实例上选定的一个模型。发起 turn 的命令载荷用的就是这个形状。 */
|
|
460
|
-
export interface PluginModelSelection {
|
|
461
|
-
readonly instanceId: string;
|
|
462
|
-
readonly model: string;
|
|
463
|
-
readonly options?: readonly {
|
|
464
|
-
readonly id: string;
|
|
465
|
-
readonly value: string | boolean;
|
|
466
|
-
}[];
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* 一个 project:`ctx.projects.get` 的结果、`ctx.projects.list` 的一行,形状由公共契约生成。项目号是 `id`;
|
|
470
|
-
* 仓库身份在 `repositoryIdentity`(工作区不是 git 仓库、没有可用 remote、或远端地址认不准时是 null),
|
|
471
|
-
* 其中 `canonicalKey` 是跨机器可比的 `host/owner/repo`,`provider` 认不出托管方时缺席,远端在 `locator` 里
|
|
472
|
-
* (地址已去掉凭据,只供显示与取主机名)。`archivedAt` 缺席或 null 都表示未归档。
|
|
473
|
-
*/
|
|
474
|
-
export type PluginProject = ProjectsGetOutput;
|
|
475
|
-
/** thread 里的一条消息。附件、逐条模型选择这类界面用的字段不透出。 */
|
|
476
|
-
/**
|
|
477
|
-
* 一份要落成会话附件的字节。
|
|
478
|
-
*
|
|
479
|
-
* 大小上限沿用宿主对聊天附件的那一份(按 mime 分档,图片与文件不同),超了就 reject
|
|
480
|
-
* —— 插件不该有一条比人从网页上传更宽的路。
|
|
481
|
-
*/
|
|
482
|
-
export interface PluginAttachmentInput {
|
|
483
|
-
/** 附件挂在哪条会话下。落盘目录按它分,删会话时一起回收。 */
|
|
484
|
-
readonly threadId: string;
|
|
485
|
-
readonly name: string;
|
|
486
|
-
readonly mimeType: string;
|
|
487
|
-
readonly bytes: Uint8Array;
|
|
488
|
-
}
|
|
489
|
-
/** 落好盘的附件。原样塞进 `thread.turn.start` 的 `message.attachments` 即可。 */
|
|
490
|
-
export interface PluginAttachment {
|
|
491
|
-
/** mime 是 `image/*` 就是 `image`,其余都是 `file`。 */
|
|
492
|
-
readonly type: "image" | "file";
|
|
493
|
-
readonly id: string;
|
|
494
|
-
readonly name: string;
|
|
495
|
-
readonly mimeType: string;
|
|
496
|
-
readonly sizeBytes: number;
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* 把字节落成会话附件。插件面上唯一的字节写口。
|
|
500
|
-
*
|
|
501
|
-
* 为什么需要它:`ctx.commands.dispatch` 收的是**已经规范化**的命令,附件那一格只认
|
|
502
|
-
* 落好盘的记录(`{id, name, mimeType, sizeBytes}`),不认 data URL —— 网页客户端那条
|
|
503
|
-
* 路由宿主的规范化器代劳,插件得自己先落一次。
|
|
504
|
-
*/
|
|
505
|
-
export interface PluginAttachments {
|
|
506
|
-
readonly store: (input: PluginAttachmentInput) => Promise<PluginAttachment>;
|
|
507
|
-
/**
|
|
508
|
-
* 按 id 读回字节。附件不在这台机器上就 reject,不回空字节 —— 「没有」与「是空的」
|
|
509
|
-
* 是两回事。
|
|
510
|
-
*
|
|
511
|
-
* 不需要声明:这些 id 本来就写在 `getThread` / `getThreadMessage` 读得到的消息上,
|
|
512
|
-
* 这条只是把「看得见记录」补成「读得到内容」。
|
|
513
|
-
*/
|
|
514
|
-
readonly read: (attachmentId: string) => Promise<Uint8Array>;
|
|
515
|
-
}
|
|
516
|
-
export interface PluginThreadMessage {
|
|
517
|
-
readonly messageId: string;
|
|
518
|
-
readonly role: string;
|
|
519
|
-
readonly text: string;
|
|
520
|
-
readonly turnId: string | null;
|
|
521
|
-
readonly createdAt: string;
|
|
522
|
-
readonly modelSelection?: PluginModelSelection | undefined;
|
|
523
|
-
readonly source?: {
|
|
524
|
-
readonly kind: "native-session";
|
|
525
|
-
readonly provider: "claude" | "codex";
|
|
526
|
-
readonly sessionId: string;
|
|
527
|
-
readonly messageId: string;
|
|
528
|
-
readonly turnId?: string | undefined;
|
|
529
|
-
readonly order: number;
|
|
530
|
-
} | undefined;
|
|
531
|
-
/** 这条消息带的附件;要字节走 `ctx.attachments.read(id)`。 */
|
|
532
|
-
readonly attachments: readonly PluginAttachment[];
|
|
533
|
-
}
|
|
534
|
-
/** thread 当前的 provider 会话状态。没建过会话是 null。 */
|
|
535
|
-
export interface PluginThreadSession {
|
|
536
|
-
/** `idle` / `starting` / `running` / `stopped`…… 宿主的会话状态名。 */
|
|
537
|
-
readonly status: string;
|
|
538
|
-
readonly providerInstanceId: string | null;
|
|
539
|
-
/** 正在跑的 turn;空闲是 null。 */
|
|
540
|
-
readonly activeTurnId: string | null;
|
|
541
|
-
readonly lastError?: string | null | undefined;
|
|
542
|
-
readonly updatedAt?: string | undefined;
|
|
543
|
-
readonly endReason?: "server-restart" | undefined;
|
|
544
|
-
}
|
|
545
|
-
export interface PluginThreadOrigin {
|
|
546
|
-
readonly parentThreadId: string;
|
|
547
|
-
readonly delegationDepth: number;
|
|
548
|
-
readonly requestedBy: "agent" | "continuation";
|
|
549
|
-
readonly notificationPolicy?: "wake" | "activity-only" | undefined;
|
|
550
|
-
}
|
|
551
|
-
export interface PluginThreadForkPoint {
|
|
552
|
-
readonly sourceThreadId: string;
|
|
553
|
-
readonly sourceMessageId: string;
|
|
554
|
-
}
|
|
555
|
-
export interface PluginTurnIntent {
|
|
556
|
-
readonly intentId: string;
|
|
557
|
-
readonly threadId: string;
|
|
558
|
-
readonly sequence: number;
|
|
559
|
-
readonly commandId: string;
|
|
560
|
-
readonly messageId: string;
|
|
561
|
-
readonly revision: number;
|
|
562
|
-
readonly turn: {
|
|
563
|
-
readonly turnId: string | null;
|
|
564
|
-
readonly userMessageId: string;
|
|
565
|
-
readonly state: "pending" | "running" | "interrupted" | "completed" | "error";
|
|
566
|
-
readonly requestedAt: string;
|
|
567
|
-
readonly startedAt: string | null;
|
|
568
|
-
readonly completedAt: string | null;
|
|
569
|
-
readonly waitSpans: readonly {
|
|
570
|
-
readonly kind: "approval" | "userInput";
|
|
571
|
-
readonly requestId: string;
|
|
572
|
-
readonly startedAt: string;
|
|
573
|
-
readonly completedAt: string | null;
|
|
574
|
-
}[];
|
|
575
|
-
} | null;
|
|
576
|
-
readonly status: "queued" | "preparing" | "dispatching" | "running" | "completed" | "interrupted" | "failed" | "reconciling" | "blocked" | "cancelled" | "abandoned";
|
|
577
|
-
readonly deliveryCertainty: "not-dispatched" | "confirmed" | "unknown";
|
|
578
|
-
readonly attempt: {
|
|
579
|
-
readonly attemptId: string;
|
|
580
|
-
readonly workerEpoch: number;
|
|
581
|
-
readonly sourceBindingId: string | null;
|
|
582
|
-
readonly targetBindingId: string | null;
|
|
583
|
-
readonly stage: "preparing" | "dispatching" | "running" | "reconciling";
|
|
584
|
-
readonly deliveryCertainty: "not-dispatched" | "confirmed" | "unknown";
|
|
585
|
-
readonly nativeLocator: {
|
|
586
|
-
readonly sessionId?: string | undefined;
|
|
587
|
-
readonly turnId?: string | undefined;
|
|
588
|
-
readonly generationId?: string | undefined;
|
|
589
|
-
} | null;
|
|
590
|
-
readonly createdAt: string;
|
|
591
|
-
readonly updatedAt: string;
|
|
592
|
-
} | null;
|
|
593
|
-
readonly blockedReason: string | null;
|
|
594
|
-
readonly replacementIntentId: string | null;
|
|
595
|
-
readonly createdAt: string;
|
|
596
|
-
readonly updatedAt: string;
|
|
597
|
-
}
|
|
598
|
-
/** 不加载消息历史;持久状态在同一数据库快照内读取,进程存活另取当前 provider 句柄。 */
|
|
599
|
-
export interface PluginThreadExecution {
|
|
600
|
-
readonly threadId: string;
|
|
601
|
-
readonly projectId: string;
|
|
602
|
-
readonly title: string;
|
|
603
|
-
readonly modelSelection: PluginModelSelection;
|
|
604
|
-
readonly runtimeMode: "approval-required" | "auto-accept-edits" | "auto" | "full-access";
|
|
605
|
-
readonly interactionMode: "default" | "plan";
|
|
606
|
-
readonly branch: string | null;
|
|
607
|
-
readonly worktreePath: string | null;
|
|
608
|
-
readonly origin: PluginThreadOrigin | null;
|
|
609
|
-
readonly forkedFrom: PluginThreadForkPoint | null;
|
|
610
|
-
readonly archivedAt: string | null;
|
|
611
|
-
readonly createdAt: string;
|
|
612
|
-
readonly updatedAt: string;
|
|
613
|
-
readonly session: (PluginThreadSession & {
|
|
614
|
-
readonly lastError: string | null;
|
|
615
|
-
readonly updatedAt: string;
|
|
616
|
-
}) | null;
|
|
617
|
-
readonly latestTurn: {
|
|
618
|
-
readonly turnId: string;
|
|
619
|
-
readonly state: "running" | "interrupted" | "completed" | "error";
|
|
620
|
-
readonly requestedAt: string;
|
|
621
|
-
readonly startedAt: string | null;
|
|
622
|
-
readonly completedAt: string | null;
|
|
623
|
-
readonly userMessageId?: string | undefined;
|
|
624
|
-
readonly assistantMessageId: string | null;
|
|
625
|
-
readonly waitSpans?: readonly {
|
|
626
|
-
readonly kind: "approval" | "userInput";
|
|
627
|
-
readonly requestId: string;
|
|
628
|
-
readonly startedAt: string;
|
|
629
|
-
readonly completedAt: string | null;
|
|
630
|
-
}[] | undefined;
|
|
631
|
-
} | null;
|
|
632
|
-
readonly turnIntents: readonly PluginTurnIntent[];
|
|
633
|
-
readonly queuePaused: boolean;
|
|
634
|
-
readonly providerProcessLive: boolean;
|
|
635
|
-
readonly hasPendingApprovals: boolean;
|
|
636
|
-
readonly hasPendingUserInput: boolean;
|
|
637
|
-
readonly pendingApprovalCount: number;
|
|
638
|
-
readonly pendingUserInputCount: number;
|
|
639
|
-
/** 持久 turn-start-requested 事实总数,含普通客户端入口;与导入用户消息数不同。 */
|
|
640
|
-
readonly turnStartCount: number;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* 一条 thread 的只读视图:消息列表加会话状态。
|
|
644
|
-
*
|
|
645
|
-
* 默认不带活动、checkpoint、提案计划;原生历史对齐可显式请求有界活动窗口。
|
|
646
|
-
*/
|
|
647
|
-
export interface PluginThread {
|
|
648
|
-
readonly threadId: string;
|
|
649
|
-
readonly projectId: string;
|
|
650
|
-
readonly title: string;
|
|
651
|
-
readonly modelSelection: PluginModelSelection;
|
|
652
|
-
readonly origin?: PluginThreadOrigin | null | undefined;
|
|
653
|
-
readonly forkedFrom?: PluginThreadForkPoint | null | undefined;
|
|
654
|
-
/** 归档过的 thread 有值;活着的是 null。 */
|
|
655
|
-
readonly archivedAt: string | null;
|
|
656
|
-
readonly messages: readonly PluginThreadMessage[];
|
|
657
|
-
/** 仅显式请求时带回当前有界窗口的活动,供原生历史对齐;不含检查点或提案。 */
|
|
658
|
-
readonly activities?: readonly PluginActivity[] | undefined;
|
|
659
|
-
readonly session: PluginThreadSession | null;
|
|
660
|
-
readonly updatedAt: string;
|
|
661
|
-
}
|
|
63
|
+
export declare const PLUGIN_API_MIN_VERSION = 7;
|
|
64
|
+
export type PluginApiVersion = 7;
|
|
662
65
|
/**
|
|
663
66
|
* 只读投影查询。写投影是编排的事,插件碰不到。
|
|
664
67
|
*
|