@ycodium-ai/plugin-api 0.2.3208 → 0.2.3210
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 +23 -11
- package/dist/dataPorts.gen.d.ts +547 -366
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/pluginContextWorkspace.d.ts +5 -0
- package/dist/pluginContextWorkspace.d.ts.map +1 -1
- package/dist/settings-ui.d.ts +3 -3
- package/dist/settings-ui.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: 20,
|
|
60
60
|
activate: (ctx) => {
|
|
61
61
|
ctx.log.info("hello");
|
|
62
62
|
|
|
@@ -239,12 +239,24 @@ 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 20, 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 20. 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 20 is refused until Ycodium itself is updated, with no update button.
|
|
248
|
+
|
|
249
|
+
API 20 adds `ctx.machineSettings.editors.get` and `ctx.machineSettings.providers.get`; neither
|
|
250
|
+
requires a declared permission. `ctx.threads.list` accepts optional `collection: "page" | "all"`
|
|
251
|
+
and an optional `include` array containing `"summary"` and/or `"runtime"`. Its result has optional `historyEpoch`, and each row
|
|
252
|
+
has optional `summary` and `runtime` blocks requested through `include`. The result of
|
|
253
|
+
`ctx.threads.history` also has optional `historyEpoch`; plugins must handle its absence.
|
|
254
|
+
`ProxyChoiceOption` is now exported from the main `@ycodium-ai/plugin-api` entry so server code can
|
|
255
|
+
use it; `@ycodium-ai/plugin-api/ui` still re-exports it, so existing imports keep working.
|
|
256
|
+
Manifest pages accept optional `ui.pages[].placements`, an array of `"web-pages"`, `"mobile-home"` and
|
|
257
|
+
`"mobile-pages"` decoded strictly (D389). Omitted, a page appears only in the web and mobile-settings
|
|
258
|
+
plugin page lists; an array shows it only where listed, an empty array shows it nowhere. Direct routes
|
|
259
|
+
to the page are not restricted.
|
|
248
260
|
|
|
249
261
|
API 19 adds the data port `ctx.machineSettings.keybindings.get` (the machine's key bindings and the issues found while reading them; no permission needed) and optional `ConversationHostData.useCommandFailureText`. Its hook returns a function that explains failures of dispatched commands. During preparation it returns `null`, so the plugin keeps the original error. When an older host omits the hook, the plugin also displays the original error (D386).
|
|
250
262
|
|
|
@@ -367,7 +379,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
367
379
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
368
380
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
369
381
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
370
|
-
the minimum version is
|
|
382
|
+
the minimum version is 20.
|
|
371
383
|
|
|
372
384
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
373
385
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|
|
@@ -395,12 +407,12 @@ API 5 removed four handwritten data members. Their replacements are assembled fr
|
|
|
395
407
|
capability table and typed by `PluginDataPorts`: the member path is the capability id, the input is
|
|
396
408
|
checked against the capability's public contract, and the result is the same shape a client reads.
|
|
397
409
|
|
|
398
|
-
| Removed in 5 | Use instead
|
|
399
|
-
| ------------------------------------------ |
|
|
400
|
-
| `ctx.projections.listThreads(query)` | `ctx.threads.list(input)`: returns `{ items, nextCursor, snapshotSequence }`;
|
|
401
|
-
| `ctx.projections.listPendingApprovals(id)` | `ctx.approvals.pending.list({ threadId })`: `detail`, `appName` and `options` are absent when the provider gave none; a missing thread rejects
|
|
402
|
-
| `ctx.communication.listForThreads(input)` | `ctx.communication.records.list(input)`: same fields; a `limit` outside 1–1000 is refused instead of clamped
|
|
403
|
-
| `ctx.communication.getByIds(recordIds)` | `ctx.communication.records.get({ recordIds })`: at most 100 ids per call; records carry every field a client reads
|
|
410
|
+
| Removed in 5 | Use instead |
|
|
411
|
+
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
412
|
+
| `ctx.projections.listThreads(query)` | `ctx.threads.list(input)`: returns `{ items, nextCursor, snapshotSequence, historyEpoch? }`; accepts `archived: "exclude" \| "include" \| "only"`, `collection: "page" \| "all"` (default `page`), and `include: ["summary", "runtime"]` |
|
|
413
|
+
| `ctx.projections.listPendingApprovals(id)` | `ctx.approvals.pending.list({ threadId })`: `detail`, `appName` and `options` are absent when the provider gave none; a missing thread rejects |
|
|
414
|
+
| `ctx.communication.listForThreads(input)` | `ctx.communication.records.list(input)`: same fields; a `limit` outside 1–1000 is refused instead of clamped |
|
|
415
|
+
| `ctx.communication.getByIds(recordIds)` | `ctx.communication.records.get({ recordIds })`: at most 100 ids per call; records carry every field a client reads |
|
|
404
416
|
|
|
405
417
|
`ctx.threads.history(input)` is new in 5: the thread detail a client opens a session with.
|
|
406
418
|
|