@ycodium-ai/plugin-api 0.2.3168 → 0.2.3192
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 +7 -5
- package/dist/capabilityPorts.d.ts +2 -6
- package/dist/capabilityPorts.d.ts.map +1 -1
- package/dist/capabilityPorts.js +0 -5
- package/dist/capabilityPorts.js.map +1 -1
- package/dist/conversationComposerApi.d.ts +1 -1
- package/dist/dataPorts.gen.d.ts +497 -103
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/executorCapabilities.d.ts +0 -1
- package/dist/executorCapabilities.d.ts.map +1 -1
- package/dist/executorProcesses.d.ts +1 -1
- package/dist/executorProcesses.d.ts.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/process-socket.d.ts +3 -0
- package/dist/process-socket.d.ts.map +1 -1
- package/dist/ui.d.ts +3 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/uiSessionProjections.d.ts +14 -0
- package/dist/uiSessionProjections.d.ts.map +1 -0
- package/dist/uiSessionProjections.js +2 -0
- package/dist/uiSessionProjections.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
|
56
56
|
|
|
57
57
|
export default definePlugin({
|
|
58
58
|
id: "my-plugin",
|
|
59
|
-
apiVersion:
|
|
59
|
+
apiVersion: 17,
|
|
60
60
|
activate: (ctx) => {
|
|
61
61
|
ctx.log.info("hello");
|
|
62
62
|
|
|
@@ -239,12 +239,14 @@ shows up there without anyone registering it.
|
|
|
239
239
|
|
|
240
240
|
## THERE WILL BE COMPATIBILITY-BREAKING CHANGES
|
|
241
241
|
|
|
242
|
-
The definition's `apiVersion` is a closed window: the host loads
|
|
242
|
+
The definition's `apiVersion` is a closed window: the host loads 17, and refuses every other
|
|
243
243
|
value. Declare the version your plugin targets as a literal; do not read the host's
|
|
244
|
-
`PLUGIN_API_VERSION` to make the declaration automatically match. The current API is
|
|
244
|
+
`PLUGIN_API_VERSION` to make the declaration automatically match. The current API is 17. Plugins
|
|
245
245
|
targeting an older API are refused before activation; the message names the version the plugin
|
|
246
246
|
declared and the one this Ycodium loads, and the plugin card offers an update. A plugin that
|
|
247
|
-
declares a version newer than
|
|
247
|
+
declares a version newer than 17 is refused until Ycodium itself is updated, with no update button.
|
|
248
|
+
|
|
249
|
+
API 17 removes `capabilities.exclusiveSessionWriter` from executor cards (the host had stopped reading it) and the `PLUGIN_SESSION_PROJECTION_COMMAND` constant. Plugin UIs read session projections through `bridge.sessionProjections.useProjection(name, threadId, options?)`; the bridge supplies the plugin id, and a null thread id means no subscription. `ctx.process.spawn` accepts an optional `jobPolicy: "strict" | "none"` (Windows only, default `strict`).
|
|
248
250
|
|
|
249
251
|
API 16 removes three more hand-written members in favour of generated data ports. `ctx.proxies.list` is gone: call `ctx.machineSettings.proxies.list({})`. `ctx.providers.listInstances`, `ctx.providers.getRouting` and `ctx.providers.resolveSelection` are gone: call `ctx.providers.instances.list`, `ctx.providers.routing.get` and `ctx.providers.selection.resolve`.
|
|
250
252
|
|
|
@@ -359,7 +361,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
359
361
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
360
362
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
361
363
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
362
|
-
the minimum version is
|
|
364
|
+
the minimum version is 17.
|
|
363
365
|
|
|
364
366
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
365
367
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|
|
@@ -13,11 +13,6 @@ import type { PluginDisposer } from "./index.ts";
|
|
|
13
13
|
export declare const MAX_PLUGIN_TOOL_PRESENTATION_BYTES: number;
|
|
14
14
|
/** 单份会话投影上限。不是编排事件。 */
|
|
15
15
|
export declare const MAX_PLUGIN_SESSION_PROJECTION_BYTES: number;
|
|
16
|
-
/**
|
|
17
|
-
* 宿主挂在插件命令表上的流名字。客户端用现有 `plugins.subscribe` 订,
|
|
18
|
-
* payload 是 `{ name, threadId }`,每条值是 `{ present, value }`。
|
|
19
|
-
*/
|
|
20
|
-
export declare const PLUGIN_SESSION_PROJECTION_COMMAND = "ycodium.sessionProjection";
|
|
21
16
|
/** 单文件写入上限。本权限不含删除。 */
|
|
22
17
|
export declare const MAX_PLUGIN_WORKSPACE_WRITE_BYTES: number;
|
|
23
18
|
/**
|
|
@@ -103,7 +98,8 @@ export interface PluginSessionProjectionName {
|
|
|
103
98
|
/**
|
|
104
99
|
* 需要 `sessionProjection`。`register` 返回现有 disposer。
|
|
105
100
|
* 写入走 `ctx.plugins.sessionProjections.set`,只保存非权威展示快照。
|
|
106
|
-
*
|
|
101
|
+
* 一元读走 `ctx.plugins.sessionProjections.get({ name, threadId })`,只读本插件,与客户端信封首帧同形。
|
|
102
|
+
* 插件 UI 用 `bridge.sessionProjections.useProjection(name, threadId)` 订阅,身份由宿主补入。
|
|
107
103
|
*/
|
|
108
104
|
export interface PluginSessionProjections {
|
|
109
105
|
register(input: PluginSessionProjectionName): PluginDisposer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilityPorts.d.ts","sourceRoot":"","sources":["../src/capabilityPorts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,2CAA2C;AAC3C,eAAO,MAAM,kCAAkC,QAAc,CAAC;AAE9D,uBAAuB;AACvB,eAAO,MAAM,mCAAmC,QAAc,CAAC;AAE/D
|
|
1
|
+
{"version":3,"file":"capabilityPorts.d.ts","sourceRoot":"","sources":["../src/capabilityPorts.ts"],"names":[],"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,GAAG,cAAc,CAAC;CAC9D;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,6BAA6B,GAAG,cAAc,CAAC;CAChE;AAED,0DAA0D;AAC1D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;CAC3C"}
|
package/dist/capabilityPorts.js
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
export const MAX_PLUGIN_TOOL_PRESENTATION_BYTES = 1024 * 1024;
|
|
3
3
|
/** 单份会话投影上限。不是编排事件。 */
|
|
4
4
|
export const MAX_PLUGIN_SESSION_PROJECTION_BYTES = 1024 * 1024;
|
|
5
|
-
/**
|
|
6
|
-
* 宿主挂在插件命令表上的流名字。客户端用现有 `plugins.subscribe` 订,
|
|
7
|
-
* payload 是 `{ name, threadId }`,每条值是 `{ present, value }`。
|
|
8
|
-
*/
|
|
9
|
-
export const PLUGIN_SESSION_PROJECTION_COMMAND = "ycodium.sessionProjection";
|
|
10
5
|
/** 单文件写入上限。本权限不含删除。 */
|
|
11
6
|
export const MAX_PLUGIN_WORKSPACE_WRITE_BYTES = 20 * 1024 * 1024;
|
|
12
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilityPorts.js","sourceRoot":"","sources":["../src/capabilityPorts.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AAC,KAAK,CAAC,CAAC;QACnC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC1C,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,GAAG,kCAAkC,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAe,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -181,7 +181,7 @@ export interface ConversationComposerApi {
|
|
|
181
181
|
}): ConversationComposerPathSearchState;
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
184
|
-
* 宿主按项目目录查斜杠命令与技能(`
|
|
184
|
+
* 宿主按项目目录查斜杠命令与技能(`providers.workspaceInventory.get`,宿主自己缓存与失效)。
|
|
185
185
|
* 输入区的 `/` 与 `$` 菜单读它,而不是 provider 快照里整台机器的那份:项目自带的命令与技能
|
|
186
186
|
* 只有在那个目录里才查得到。
|
|
187
187
|
*/
|