@ycodium-ai/plugin-api 0.2.3671 → 0.2.3681

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 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: 51,
59
+ apiVersion: 52,
60
60
  activate: (ctx) => {
61
61
  ctx.log.info("hello");
62
62
 
@@ -285,12 +285,47 @@ 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 51, and refuses every other
288
+ The definition's `apiVersion` is a closed window: the host loads 52, 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 51. Plugins
290
+ `PLUGIN_API_VERSION` to make the declaration automatically match. The current API is 52. 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 51 is refused until Ycodium itself is updated, with no update button.
293
+ declares a version newer than 52 is refused until Ycodium itself is updated, with no update button.
294
+
295
+ API 52 brings the board's second batch, and narrows a member's `identity` to a person (see the member model below).
296
+ The board part is additive:
297
+
298
+ - Work items carry `priority` (`urgent`, `high`, `medium`, `low`, `none`) and `labelIds` on create, update and every
299
+ read; summaries carry `archivedAt`. `ctx.work.items.list` filters by `priorities`, `labelIds` and `archived`
300
+ (`exclude` by default, `include`, `only`) and orders by `priority`.
301
+ - `ctx.work.items.archive` / `unarchive` (declare `work.item.archive` / `work.item.unarchive`) take a completed or
302
+ cancelled item off the board and bring it back.
303
+ - `ctx.work.labels.list` / `create` / `update` / `remove` / `restore` manage a project's labels (declare
304
+ `work.label.create` / `update` / `remove` / `restore`).
305
+ - `ctx.work.states.create` / `update` / `remove` / `restore` manage custom states (declare `work.state.*`). Removing a
306
+ state that items still use needs `replacementStateId`, a state in the same group; the default state and the last
307
+ state of a group cannot be removed. `ctx.work.states.list` takes `includeRemoved`; state views carry `removedAt`.
308
+ - `ctx.work.comments.list` (by item) and `ctx.work.history.list` take an optional `order`: `newest` reads the latest
309
+ first and the cursor pages back (the cursor is bound to the order).
310
+ - History changes gain the `priority` and `labels` fields. Raw events gain `work.item-archived`,
311
+ `work.item-unarchived`, `work.label-created` / `updated` / `removed` / `restored` and `work.state-created` /
312
+ `updated` / `removed` / `restored` (need `work.read`).
313
+
314
+ API 52 also unifies the member model (same unreleased window). `MemberIdentity` narrows to a person; the remote
315
+ agent identity is gone:
316
+
317
+ - A member's `identity` is only ever a person (`kind: "human"`). An agent member always has an `agent` segment, and
318
+ `agent.environmentId` is the only answer to "which machine": a member on another machine names that machine there.
319
+ Members recorded against a remote agent before this read back with `identity: null` and `agent: null` until a person
320
+ picks a machine for them.
321
+ - New port `ctx.projects.machines.list` lists the other machines that joined a project: `environmentId`, `name`,
322
+ `online`, `lastSeenAt`, and the providers each one reported (instance, display name, default model; pass
323
+ `includeModels: true` to also get each provider's models, which are left out by default). Join
324
+ codes, removing a machine, joining and leaving (`ctx.projects.machines.joinCode.create`, `remove`, `join`, `leave`)
325
+ are for people only; a plugin can use them only inside an operator invocation.
326
+ - `work.remoteAgentPending.get` takes an optional `memberId` (that member's work and messages plus those sent to the
327
+ machine itself). Remote pending items and wakes carry an optional `memberId`, and the remote participant in communication records
328
+ (`kind: "remote-agent"`) carries an optional `memberId` naming the member on that machine.
294
329
 
295
330
  API 51 adds team state on the board and board dispatch, and the host side of model choice:
296
331
 
@@ -891,7 +926,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
891
926
  `ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
892
927
  `ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
893
928
  in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
894
- the minimum version is 51.
929
+ the minimum version is 52.
895
930
 
896
931
  API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
897
932
  (from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their