@ycodium-ai/plugin-api 0.2.3506 → 0.2.3510
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 +35 -5
- package/dist/conversation-queue.d.ts +10 -0
- package/dist/conversation-queue.d.ts.map +1 -1
- package/dist/dataPorts.gen.d.ts +294 -151
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/pluginContextCommands.d.ts +9 -1
- package/dist/pluginContextCommands.d.ts.map +1 -1
- 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: 43,
|
|
60
60
|
activate: (ctx) => {
|
|
61
61
|
ctx.log.info("hello");
|
|
62
62
|
|
|
@@ -285,12 +285,40 @@ sessions continue using the streaming process interface.
|
|
|
285
285
|
|
|
286
286
|
## THERE WILL BE COMPATIBILITY-BREAKING CHANGES
|
|
287
287
|
|
|
288
|
-
The definition's `apiVersion` is a closed window: the host loads
|
|
288
|
+
The definition's `apiVersion` is a closed window: the host loads 43, and refuses every other
|
|
289
289
|
value. Declare the version your plugin targets as a literal; do not read the host's
|
|
290
|
-
`PLUGIN_API_VERSION` to make the declaration automatically match. The current API is
|
|
290
|
+
`PLUGIN_API_VERSION` to make the declaration automatically match. The current API is 43. Plugins
|
|
291
291
|
targeting an older API are refused before activation; the message names the version the plugin
|
|
292
292
|
declared and the one this Ycodium loads, and the plugin card offers an update. A plugin that
|
|
293
|
-
declares a version newer than
|
|
293
|
+
declares a version newer than 43 is refused until Ycodium itself is updated, with no update button.
|
|
294
|
+
|
|
295
|
+
API 43 adds work lines to the work base. A line is a named group of members with an optional lead and
|
|
296
|
+
the work items placed on it; it may hang on one conversation (`threadId`; a conversation belongs to at
|
|
297
|
+
most one line, archived lines included).
|
|
298
|
+
|
|
299
|
+
- `ctx.work.lines` has `list`, `get`, `create`, `update`, `archive` and `restore`; `asPerson` carries
|
|
300
|
+
the four writes. Declare `work.line.create`, `work.line.update`, `work.line.archive` and
|
|
301
|
+
`work.line.restore` in `commands.dispatch`. Members change in batches through
|
|
302
|
+
`WorkLinesUpdateInput.addMemberIds` and `removeMemberIds`; `WorkLine.memberIds` is the whole group.
|
|
303
|
+
- Optional item fields: `WorkItemsCreateInput.workLineId`, `WorkItemsUpdateInput.workLineId` (`null`
|
|
304
|
+
leaves the line) and `WorkItemsListInput.workLineIds` (`"none"` matches items on no line). Items
|
|
305
|
+
read back `workLineId`, and work history gains the `work-line` kind and a `workLine` field change.
|
|
306
|
+
- The `work.start` guard input gains required `workLineId` and `workLineIdAfter` (the line before and
|
|
307
|
+
after the commit; `null` is no line), so a guard can judge the executor by line.
|
|
308
|
+
- `MachineSettingsConfigGetOutput.environment.capabilities.workLines` says the machine supports lines;
|
|
309
|
+
older machines leave it out.
|
|
310
|
+
|
|
311
|
+
API 43 also lets a turn wait for a free provider process instead of failing. When a machine already runs as
|
|
312
|
+
many processes of one agent as its card allows, the next turn is queued (`blocked` with `provider-capacity`
|
|
313
|
+
underneath) and starts by itself when a slot frees; the host may stop a long-idle session to make room.
|
|
314
|
+
All additions are optional fields:
|
|
315
|
+
|
|
316
|
+
- `ProvidersListOutput` items carry `concurrency` (`live`, `max`) for instances that keep a process ledger;
|
|
317
|
+
`MachineSettingsProvidersGetOutput` providers carry `maxProcesses`.
|
|
318
|
+
- `ThreadsExecutionSummaryOutput.queue` entries carry `waitingForCapacity: true` for a turn queued for a
|
|
319
|
+
slot; its `continuation` is `queued`, not `blocked`, because the turn moves on by itself.
|
|
320
|
+
- `ConversationQueueEntry.waitingForCapacity` and `ConversationQueueState.waitingForCapacity`
|
|
321
|
+
(`agentName`, `maxProcesses` or `null`) let a conversation UI say "waiting" instead of showing an error.
|
|
294
322
|
|
|
295
323
|
API 42 removes what starting a thread no longer needs now that a thread always works in the folder
|
|
296
324
|
itself. All three are breaking:
|
|
@@ -615,6 +643,8 @@ dispatch no longer accepts it. Scope is your own or imported threads, or project
|
|
|
615
643
|
Read a thread's execution with `ctx.threads.execution.summary({ threadId, limit? })`: latest turn id and state,
|
|
616
644
|
up to 20 unfinished intent ids with status, delivery certainty and queue position, a truncation flag,
|
|
617
645
|
queue pause and pending interaction counts, and current continuation (`active`, `queued`, `blocked`, `paused`, `idle`).
|
|
646
|
+
A turn waiting for a free provider process slot carries `waitingForCapacity: true` and reports `queued`, not `blocked`:
|
|
647
|
+
it advances by itself once a slot frees.
|
|
618
648
|
No message bodies or full intent snapshots are returned. Missing, deleted or archived threads reject.
|
|
619
649
|
|
|
620
650
|
Control threads with `ctx.threads.turns.interrupt({ threadId, turnId?, requestId? })`,
|
|
@@ -668,7 +698,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
668
698
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
669
699
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
670
700
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
671
|
-
the minimum version is
|
|
701
|
+
the minimum version is 43.
|
|
672
702
|
|
|
673
703
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
674
704
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|
|
@@ -53,6 +53,8 @@ export interface ConversationQueueEntry {
|
|
|
53
53
|
readonly nativeModeName?: string | undefined;
|
|
54
54
|
} | undefined;
|
|
55
55
|
readonly failure?: string | undefined;
|
|
56
|
+
/** 这条在排队等 agent 的进程名额(实例开满了),不是出错也不需要处理;可以取消。 */
|
|
57
|
+
readonly waitingForCapacity?: boolean | undefined;
|
|
56
58
|
/** cancel = 可取消;abandon = 可放弃;null = 两者都不给。 */
|
|
57
59
|
readonly action: "cancel" | "abandon" | null;
|
|
58
60
|
}
|
|
@@ -69,6 +71,14 @@ export interface ConversationQueueState {
|
|
|
69
71
|
readonly reconciling: boolean;
|
|
70
72
|
readonly deliveryUncertain: boolean;
|
|
71
73
|
readonly blockedReason: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* 队首在排队等进程名额:这台机器上这个 agent 同时跑的会话已经到上限,前面有人做完就轮到它。
|
|
76
|
+
* 不算 `blocked`;`maxProcesses` 是上限(不知道时为 null)。没有排队等名额的就是 null 或缺席。
|
|
77
|
+
*/
|
|
78
|
+
readonly waitingForCapacity?: {
|
|
79
|
+
readonly agentName: string;
|
|
80
|
+
readonly maxProcesses: number | null;
|
|
81
|
+
} | null | undefined;
|
|
72
82
|
}
|
|
73
83
|
export interface ConversationQueueActions {
|
|
74
84
|
onEdit(entry: ConversationQueueEntry, message: ConversationQueuedMessageEdit): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-queue.d.ts","sourceRoot":"","sources":["../src/conversation-queue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CAC9C;AAED,gDAAgD;AAChD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,8DAA8D;IAC9D,Q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