@ycodium-ai/plugin-api 0.2.3681 → 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 +66 -5
- package/dist/dataPorts.gen.d.ts +1199 -810
- 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 +42 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -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,35 @@ 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.
|
|
294
317
|
|
|
295
318
|
API 52 brings the board's second batch, and narrows a member's `identity` to a person (see the member model below).
|
|
296
319
|
The board part is additive:
|
|
@@ -327,6 +350,44 @@ agent identity is gone:
|
|
|
327
350
|
machine itself). Remote pending items and wakes carry an optional `memberId`, and the remote participant in communication records
|
|
328
351
|
(`kind: "remote-agent"`) carries an optional `memberId` naming the member on that machine.
|
|
329
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.
|
|
390
|
+
|
|
330
391
|
API 51 adds team state on the board and board dispatch, and the host side of model choice:
|
|
331
392
|
|
|
332
393
|
- Work line reads (`ctx.work.lines.list` / `get`) carry optional `pause` (`{ at, by, reason? }`, the whole line is
|
|
@@ -926,7 +987,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
926
987
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
927
988
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
928
989
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
929
|
-
the minimum version is
|
|
990
|
+
the minimum version is 53.
|
|
930
991
|
|
|
931
992
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
932
993
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|