@ycodium-ai/plugin-api 0.2.3018 → 0.2.3020

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: 8,
59
+ apiVersion: 9,
60
60
  activate: (ctx) => {
61
61
  ctx.log.info("hello");
62
62
 
@@ -230,12 +230,26 @@ shows up there without anyone registering it.
230
230
 
231
231
  ## THERE WILL BE COMPATIBILITY-BREAKING CHANGES
232
232
 
233
- The definition's `apiVersion` is a closed window: the host loads 8, and refuses every other
233
+ The definition's `apiVersion` is a closed window: the host loads 9, and refuses every other
234
234
  value. Declare the version your plugin targets as a literal; do not read the host's
235
- `PLUGIN_API_VERSION` to make the declaration automatically match. The current API is 8. Plugins
235
+ `PLUGIN_API_VERSION` to make the declaration automatically match. The current API is 9. Plugins
236
236
  targeting an older API are refused before activation; the message names the version the plugin
237
237
  declared and the one this Ycodium loads, and the plugin card offers an update. A plugin that
238
- declares a version newer than 8 is refused until Ycodium itself is updated, with no update button.
238
+ declares a version newer than 9 is refused until Ycodium itself is updated, with no update button.
239
+
240
+ API 9 changed how a plugin reads a thread: `ctx.projections.getThread` is gone, and so are the
241
+ types `PluginThread` and `PluginActivity`. Read one thread through the data ports: `ctx.threads.get`
242
+ returns the shell (status, title, model, and session state; archived threads are included),
243
+ `ctx.threads.messages.list` returns messages newest first, paginated, with the body readable in
244
+ segments and attachments as metadata only, `ctx.threads.activities.list` returns activities
245
+ (`kinds` is required, paginated, and a large payload is a stub), and `ctx.threads.history` returns
246
+ the whole detail, which was already there. `threadOrNull(ctx.threads, threadId, options?)` returns
247
+ `null` when there is no such thread, and an archived thread is `null` by default until you pass
248
+ `{ archived: "include" }`; `isThreadNotFound(error)` is also new. The new constants are
249
+ `TOOL_LIFECYCLE_ACTIVITY_KINDS`, `THREAD_MESSAGES_LIST_LIMIT`, and `THREAD_ACTIVITIES_LIST_LIMIT`.
250
+ `ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
251
+ in the thread has its own inbox. A plugin written for 8 (`apiVersion: 8`) is refused on a 9 host,
252
+ the same as every earlier bump: the minimum version is 9 itself.
239
253
 
240
254
  API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
241
255
  (from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their