@ycodium-ai/plugin-api 0.2.3484 → 0.2.3502
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 +71 -5
- package/dist/dataPorts.gen.d.ts +1 -0
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/executor.d.ts +5 -3
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js.map +1 -1
- package/dist/executorCapabilities.d.ts +2 -0
- package/dist/executorCapabilities.d.ts.map +1 -1
- package/dist/executorSession.d.ts +8 -0
- package/dist/executorSession.d.ts.map +1 -1
- package/dist/executorSession.js.map +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/process-operation.d.ts +46 -0
- package/dist/process-operation.d.ts.map +1 -0
- package/dist/process-operation.js +233 -0
- package/dist/process-operation.js.map +1 -0
- package/dist/usage.d.ts +2 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js.map +1 -1
- package/package.json +5 -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: 41,
|
|
60
60
|
activate: (ctx) => {
|
|
61
61
|
ctx.log.info("hello");
|
|
62
62
|
|
|
@@ -260,14 +260,80 @@ npm search keywords:ycodium-plugin
|
|
|
260
260
|
Ycodium's plugin settings search the same way, so a published package with that keyword
|
|
261
261
|
shows up there without anyone registering it.
|
|
262
262
|
|
|
263
|
+
## Auxiliary executor operations
|
|
264
|
+
|
|
265
|
+
Forward the host's abort signal through every auxiliary operation, including
|
|
266
|
+
`readCliVersion(signal)` and `refreshModelCatalog({ force, signal })`.
|
|
267
|
+
The host cancels each completed or interrupted operation and waits for its work and owned processes
|
|
268
|
+
to settle; instance disposal closes the boundary to new operations.
|
|
269
|
+
|
|
270
|
+
Import `runProcessOperation` from `@ycodium-ai/plugin-api/process-operation` for a one-shot command.
|
|
271
|
+
It owns concurrent stdout/stderr consumption, bounded output, input writes, cancellation, deadlines
|
|
272
|
+
and process teardown. Nonzero exit codes remain results for the executor to interpret. Output beyond
|
|
273
|
+
the configured cap is drained and rejected, never returned as a complete answer.
|
|
274
|
+
|
|
275
|
+
Use `withProcessOperation` for SDK or protocol reads. Start children through `operation.spawn`,
|
|
276
|
+
register consumer promises with `track`, and register protocol cleanup with `defer`. The protocol
|
|
277
|
+
keeps sole ownership of its output parser. Cleanup has a separate bounded budget; a late spawn still
|
|
278
|
+
belongs to the closing operation. If `isOperationCleanupError(error)` is true, retain temporary
|
|
279
|
+
directories and preserve the error for the host rather than wrapping it as a normal generation error.
|
|
280
|
+
|
|
281
|
+
Shared servers belong to the executor instance, with balanced borrowing and release. Cancelling one
|
|
282
|
+
borrower must not kill another borrower's server. Instance disposal must stop new borrowing and clear
|
|
283
|
+
idle timers; an externally configured server is never owned by this operation. Long-lived conversation
|
|
284
|
+
sessions continue using the streaming process interface.
|
|
285
|
+
|
|
263
286
|
## THERE WILL BE COMPATIBILITY-BREAKING CHANGES
|
|
264
287
|
|
|
265
|
-
The definition's `apiVersion` is a closed window: the host loads
|
|
288
|
+
The definition's `apiVersion` is a closed window: the host loads 41, and refuses every other
|
|
266
289
|
value. Declare the version your plugin targets as a literal; do not read the host's
|
|
267
|
-
`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 41. Plugins
|
|
268
291
|
targeting an older API are refused before activation; the message names the version the plugin
|
|
269
292
|
declared and the one this Ycodium loads, and the plugin card offers an update. A plugin that
|
|
270
|
-
declares a version newer than
|
|
293
|
+
declares a version newer than 41 is refused until Ycodium itself is updated, with no update button.
|
|
294
|
+
|
|
295
|
+
API 41 adds the `process-operation` executor utility, forwards cancellation through auxiliary calls,
|
|
296
|
+
and waits for their cleanup before releasing the operation. `readCliVersion` and `refreshModelCatalog`
|
|
297
|
+
accept cancellation signals. Plugins must preserve incomplete-cleanup errors and retain temporary
|
|
298
|
+
resources until cleanup is confirmed. See [Auxiliary executor operations](#auxiliary-executor-operations).
|
|
299
|
+
|
|
300
|
+
API 40 adds what a project with several folders on one machine needs, and hands a session its other
|
|
301
|
+
folders.
|
|
302
|
+
|
|
303
|
+
- `ctx.projects.folders.relocate({ projectId, folderId, path, requestId? })` gives an attached folder
|
|
304
|
+
a new path and keeps its id, so the conversations that use the folder follow it. Nothing on disk
|
|
305
|
+
moves. It is refused when another project already uses the new path or the folder's clone has not
|
|
306
|
+
finished. Declare `project.folder.relocate` in `commands.dispatch`; the generated types are
|
|
307
|
+
`ProjectsFoldersRelocateInput` and `ProjectsFoldersRelocateOutput`.
|
|
308
|
+
- Three optional input fields. `ThreadsUpdateInput.folderIds` is the folders the conversation hands
|
|
309
|
+
its agent: it must include the conversation's start folder, every id must still be attached to
|
|
310
|
+
the project on this machine, it takes effect from the next turn, and leaving it out changes
|
|
311
|
+
nothing. `ProjectsUpdateInput.defaultFolderId` is the folder new conversations on this machine
|
|
312
|
+
start in (`null` goes back to the first folder still attached; the folder must be attached, and
|
|
313
|
+
the project's `workspaceRoot` follows it); `ctx.projects.update` still refuses plugins.
|
|
314
|
+
`ProjectsFoldersAttachInput.threadId` also hands the new folder to that open conversation from
|
|
315
|
+
its next turn.
|
|
316
|
+
- `capabilities.projectMultiFolder` in `MachineSettingsConfigGetOutput.environment` is true on a
|
|
317
|
+
machine that accepts several folders per project, `defaultFolderId` and `project.folder.relocate`;
|
|
318
|
+
an older machine omits it.
|
|
319
|
+
- Executors. `ExecutorSessionStartInput.additionalDirectories` lists the folders other than `cwd`
|
|
320
|
+
that the session hands to its agent: absolute paths, without duplicates, in the project's order.
|
|
321
|
+
The host sends it only to an executor whose card declares the new optional capability
|
|
322
|
+
`ExecutorCapabilities.acceptsAdditionalDirectories` (also in the card capabilities that
|
|
323
|
+
`providers.executors.list` returns); the executor declares the folders to its CLI as working
|
|
324
|
+
directories, readable and writable like `cwd` and under the same approval rules. When the folders
|
|
325
|
+
change mid-session the host calls `startSession` again with the resume state: an executor that
|
|
326
|
+
fixes its directories at launch restarts, one that sends them every turn may keep the running
|
|
327
|
+
process and report the generation it already had. Absent or empty means `cwd` only.
|
|
328
|
+
- Conversation host data is now version 18 (`CONVERSATION_HOST_DATA_VERSION`; a conversation view
|
|
329
|
+
declares `ycodium.conversation.host-data.v18`). New: `ConversationThreadFolder`
|
|
330
|
+
(`{ id, name, cwd }`: a folder of the conversation's project on this machine, `cwd` being the
|
|
331
|
+
directory to search, the isolated worktree when the start folder has one) and the optional
|
|
332
|
+
`ConversationHostData.useThreadFolders(target)`, which lists them with the start folder first
|
|
333
|
+
(empty for a draft or a project not loaded yet); `ConversationComposerApi.pathSearch.useComposerPathSearchAcross({ environmentId, cwds, query })`,
|
|
334
|
+
which runs one `@` query in several directories and returns `ConversationComposerPathSearchAcrossState`
|
|
335
|
+
(`groups` in the order of `cwds`, plus `isPending`); and `CONVERSATION_COMPOSER_PATH_SEARCH_LIMIT`
|
|
336
|
+
(80), the longest `@` menu, per directory and after merging.
|
|
271
337
|
|
|
272
338
|
API 39 lets the work assignee be a project member and gives the person handle the member writes.
|
|
273
339
|
|
|
@@ -590,7 +656,7 @@ An empty page with a cursor still continues. All failures propagate unchanged, i
|
|
|
590
656
|
`ThreadNotFoundError` when the thread is missing; use `isThreadNotFound(error)` to identify it.
|
|
591
657
|
`ctx.communication.inbox.read` is gone; that port always rejected a plugin, because only the agent
|
|
592
658
|
in the thread has its own inbox. Plugins targeting these earlier versions are refused on the current host;
|
|
593
|
-
the minimum version is
|
|
659
|
+
the minimum version is 41.
|
|
594
660
|
|
|
595
661
|
API 8 changed what the UI gets for a communication record. `ConversationCommunicationRecord`
|
|
596
662
|
(from the conversation host's `useCommunicationRecord`) and `CommunicationViewExchange` carry `bodyState`, and their
|
package/dist/dataPorts.gen.d.ts
CHANGED
|
@@ -3290,6 +3290,7 @@ export type ProvidersExecutorsListOutput = {
|
|
|
3290
3290
|
readonly "handlesSkillInvocations"?: boolean | undefined;
|
|
3291
3291
|
readonly "discoversRepoSkills"?: boolean | undefined;
|
|
3292
3292
|
readonly "confirmsToolTermination"?: boolean | undefined;
|
|
3293
|
+
readonly "acceptsAdditionalDirectories"?: boolean | undefined;
|
|
3293
3294
|
readonly "inlineImages"?: {
|
|
3294
3295
|
readonly "maxBytes": number;
|
|
3295
3296
|
readonly "maxEdgePixels"?: number | undefined;
|