@ycodium-ai/plugin-api 0.2.3671 → 0.2.3710
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 +101 -5
- package/dist/dataPorts.gen.d.ts +1366 -756
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/executorModelOptions.d.ts +10 -0
- package/dist/executorModelOptions.d.ts.map +1 -1
- package/dist/executorModelOptions.js +14 -4
- package/dist/executorModelOptions.js.map +1 -1
- package/dist/index.d.ts +52 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -3
- package/dist/index.js.map +1 -1
- package/dist/pluginContextCommands.d.ts +58 -7
- 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: 53,
|
|
60
60
|
activate: (ctx) => {
|
|
61
61
|
ctx.log.info("hello");
|
|
62
62
|
|
|
@@ -285,12 +285,108 @@ 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 53, 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 53. 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 53 is refused until Ycodium itself is updated, with no update button.
|
|
294
|
+
|
|
295
|
+
API 53 moves the board's general rules into the host: the host delivers mentions, replies and completion notices,
|
|
296
|
+
and a plugin adds its own rules through two interfaces instead of dispatching by itself.
|
|
297
|
+
|
|
298
|
+
- The `work.dispatch` guard is now a dispatch gate. Its input gains `reason` (`item`, `comment` or `group`), the
|
|
299
|
+
`threadId` the host picked for the member (`null` when it would open a new one), and `commentId` / `recordId` for
|
|
300
|
+
comments and group messages; `workItemId` is `null` for a group message. `allowed: false` now means "not now"
|
|
301
|
+
(the host asks again on the next trigger or the minute sweep), no longer "my plugin dispatches this". Without a
|
|
302
|
+
plugin the host dispatches as usual. Plugins that read the old input must handle the new fields. An
|
|
303
|
+
`{ allowed: true }` answer may carry `threadId`: the host then delivers and wakes in that session (same project, not
|
|
304
|
+
archived or deleted, otherwise it holds) instead of the one it picked, with the same de-duplication, supplements and
|
|
305
|
+
hand-over record. Plugins pointing the member to different sessions hold the wake.
|
|
306
|
+
- New `ctx.operations.supplement({ operations: ["work.dispatch"], add })`: before the host wakes a member for an
|
|
307
|
+
item, `add(input: PluginWakeSupplementInput)` returns text appended to the host's wake message (`null` adds
|
|
308
|
+
nothing). A throw or a 5 second timeout holds the wake until the next trigger.
|
|
309
|
+
- Raw events gain `work.item-dispatched` (the host handed an item to a member's session; needs `work.read`).
|
|
310
|
+
`communication.record-sent` and record views carry an optional `workItem` when the record is a board delivery.
|
|
311
|
+
- History gains the verbs `paused`, `resumed`, `trial-passed`, `trial-failed` and `trial-skipped`, the target
|
|
312
|
+
kind `member`, and the change fields `member` and `note`. A history page skips entries and changes the reader
|
|
313
|
+
does not know, so later additions no longer fail the page.
|
|
314
|
+
- Arrays that tolerate newer elements are typed with their element instead of `unknown` on the encoded side: the UI
|
|
315
|
+
reads `work.history.list`, `threads.history`, `plugins.installed.list` and the machine settings reads of editors,
|
|
316
|
+
providers and keybindings.
|
|
317
|
+
|
|
318
|
+
API 52 brings the board's second batch, and narrows a member's `identity` to a person (see the member model below).
|
|
319
|
+
The board part is additive:
|
|
320
|
+
|
|
321
|
+
- Work items carry `priority` (`urgent`, `high`, `medium`, `low`, `none`) and `labelIds` on create, update and every
|
|
322
|
+
read; summaries carry `archivedAt`. `ctx.work.items.list` filters by `priorities`, `labelIds` and `archived`
|
|
323
|
+
(`exclude` by default, `include`, `only`) and orders by `priority`.
|
|
324
|
+
- `ctx.work.items.archive` / `unarchive` (declare `work.item.archive` / `work.item.unarchive`) take a completed or
|
|
325
|
+
cancelled item off the board and bring it back.
|
|
326
|
+
- `ctx.work.labels.list` / `create` / `update` / `remove` / `restore` manage a project's labels (declare
|
|
327
|
+
`work.label.create` / `update` / `remove` / `restore`).
|
|
328
|
+
- `ctx.work.states.create` / `update` / `remove` / `restore` manage custom states (declare `work.state.*`). Removing a
|
|
329
|
+
state that items still use needs `replacementStateId`, a state in the same group; the default state and the last
|
|
330
|
+
state of a group cannot be removed. `ctx.work.states.list` takes `includeRemoved`; state views carry `removedAt`.
|
|
331
|
+
- `ctx.work.comments.list` (by item) and `ctx.work.history.list` take an optional `order`: `newest` reads the latest
|
|
332
|
+
first and the cursor pages back (the cursor is bound to the order).
|
|
333
|
+
- History changes gain the `priority` and `labels` fields. Raw events gain `work.item-archived`,
|
|
334
|
+
`work.item-unarchived`, `work.label-created` / `updated` / `removed` / `restored` and `work.state-created` /
|
|
335
|
+
`updated` / `removed` / `restored` (need `work.read`).
|
|
336
|
+
|
|
337
|
+
API 52 also unifies the member model (same unreleased window). `MemberIdentity` narrows to a person; the remote
|
|
338
|
+
agent identity is gone:
|
|
339
|
+
|
|
340
|
+
- A member's `identity` is only ever a person (`kind: "human"`). An agent member always has an `agent` segment, and
|
|
341
|
+
`agent.environmentId` is the only answer to "which machine": a member on another machine names that machine there.
|
|
342
|
+
Members recorded against a remote agent before this read back with `identity: null` and `agent: null` until a person
|
|
343
|
+
picks a machine for them.
|
|
344
|
+
- New port `ctx.projects.machines.list` lists the other machines that joined a project: `environmentId`, `name`,
|
|
345
|
+
`online`, `lastSeenAt`, and the providers each one reported (instance, display name, default model; pass
|
|
346
|
+
`includeModels: true` to also get each provider's models, which are left out by default). Join
|
|
347
|
+
codes, removing a machine, joining and leaving (`ctx.projects.machines.joinCode.create`, `remove`, `join`, `leave`)
|
|
348
|
+
are for people only; a plugin can use them only inside an operator invocation.
|
|
349
|
+
- `work.remoteAgentPending.get` takes an optional `memberId` (that member's work and messages plus those sent to the
|
|
350
|
+
machine itself). Remote pending items and wakes carry an optional `memberId`, and the remote participant in communication records
|
|
351
|
+
(`kind: "remote-agent"`) carries an optional `memberId` naming the member on that machine.
|
|
352
|
+
|
|
353
|
+
API 52 also adds machine browser viewport and page zoom, site data clearing, developer tools, the context menu and clipboard, downloads, and cookie import:
|
|
354
|
+
|
|
355
|
+
- Human page input (`threads.browser.input`) also accepts `setViewport` and `setZoom`. Page state also carries
|
|
356
|
+
optional `viewportSetting` and `zoomFactor`.
|
|
357
|
+
- Human page input also accepts `clearCookies` and `clearCache` (clear that profile's cookies or HTTP cache;
|
|
358
|
+
people and agents share the profile). The machine capabilities in `machineSettings.config.get` gain optional
|
|
359
|
+
`browserZoomOperations`, `browserSiteDataOperations`, and `browserDevtoolsOperations` (`openDevTools`).
|
|
360
|
+
- Humans also get `threads.browser.context` (selection, link, and image for the local clipboard) and an optional
|
|
361
|
+
`editingCommand` of `Cut`, `Copy`, or `SelectAll` on key input.
|
|
362
|
+
- Humans also get `threads.browser.downloadUrl`, a signed URL, valid for five minutes, for a finished file from a
|
|
363
|
+
machine page. The file stays on that machine; the URL stops working when the page closes or agent access to
|
|
364
|
+
its profile is turned off. The new port `threads.browser.downloadCancel` cancels a running download or clears
|
|
365
|
+
a finished one and deletes its file on the machine. Plugins declare `thread.browser.download.cancel` and are
|
|
366
|
+
refused with `agent-access-denied` when the page's profile has agent access turned off. Download entries in
|
|
367
|
+
the page state gain an optional `stalled` flag for a running download with no progress for a while.
|
|
368
|
+
- Humans, agents, and plugins that declare `machineSettings.browser.cookies.import` can call
|
|
369
|
+
`machineSettings.browser.cookies.firefoxProfiles`, `machineSettings.browser.cookies.chromiumProfiles`
|
|
370
|
+
and `machineSettings.browser.cookies.import` (counts only, with no cookie names, values, or domains;
|
|
371
|
+
Firefox is read on that machine by an opaque id; `chromiumProfiles` lists Chrome, Edge, Brave and other
|
|
372
|
+
Chromium-family profiles on that machine by browser key, profile directory name, and display name, and an
|
|
373
|
+
import source of kind `chromium` takes that browser and directory name and decrypts the cookies on that
|
|
374
|
+
machine with its system key store; a rejection reason `unsupported` means they cannot be decrypted there;
|
|
375
|
+
agents and plugins are refused when that profile's agent access is off, and turning it off stops an import in progress; the profile must exist, otherwise `profile-not-found`).
|
|
376
|
+
- Session snapshots gain an optional `favicon` (PNG data URL, origin, and capture time). `browser.reportStatus`
|
|
377
|
+
may omit `favicon`, send `null`, or send an icon: omission keeps the current icon and `null` clears it.
|
|
378
|
+
- Page state's optional `downloads` lists each download of the page with `id`, `fileName`, `state`, `receivedBytes`, `fetchable`, and optional `totalBytes`, `stalled` and `leftover`; there is no count limit. `leftover` marks a download of a page that has closed whose file could not be deleted on the machine yet: every page on that profile lists it, and `threads.browser.downloadCancel` with its `id` retries the deletion. `threads.browser.downloadCancel` is refused with `cancel-unconfirmed` when the browser does not confirm stopping the download, and with `cleanup-failed` when the file could not be deleted on the machine; the download stays listed and calling again retries. Machine settings reads and writes gain optional `machineBrowserDefaultViewport`, `machineBrowserDefaultZoomFactor`, and `machineBrowserDefaultAppearance` (the starting values of new machine pages). `BrowserAutomationOperation` gains `setZoom`, `clearCookies`, `clearCache`, and `openDevTools`. A favicon's `capturedAt` is an integer in milliseconds.
|
|
379
|
+
|
|
380
|
+
The machine browser additions in API 52 are additive.
|
|
381
|
+
|
|
382
|
+
API 52 also adds one rule for which model option is the reasoning effort (same unreleased window):
|
|
383
|
+
`isReasoningEffortOptionId(id)` and `findReasoningEffortDescriptor(descriptors)` (from `@ycodium-ai/plugin-api` and
|
|
384
|
+
`/executor`). `effort`, `reasoningEffort`, `reasoning` and `variant` count; `fastMode`, `agent` and `serviceTier` get
|
|
385
|
+
their own titles but are not the reasoning effort. Executors that read the actual model only after
|
|
386
|
+
`turn.started` (a CLI's init message, or the reply to an in-session model switch) report it with a
|
|
387
|
+
`thread.metadata.updated` event for that turn, whose payload may now carry `model` and `modelSource`
|
|
388
|
+
(`reported` or `echo`; absent means `echo`). The host records it with the same rule as `turn.started`'s `model`:
|
|
389
|
+
within one selection an `echo` is upgraded to `reported`, a `reported` is never overwritten. Additive.
|
|
294
390
|
|
|
295
391
|
API 51 adds team state on the board and board dispatch, and the host side of model choice:
|
|
296
392
|
|
|
@@ -891,7 +987,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
891
987
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
892
988
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
893
989
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
894
|
-
the minimum version is
|
|
990
|
+
the minimum version is 53.
|
|
895
991
|
|
|
896
992
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
897
993
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|