@opencode/plugin 2.2.0 → 2.2.2
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/dist/effect/plugin.d.ts +3 -3
- package/dist/effect/session.d.ts +40 -2
- package/dist/gui/host-apis.d.ts +35 -3
- package/dist/gui/icon-name.d.ts +1 -1
- package/dist/gui/registries.d.ts +21 -3
- package/dist/promise/plugin.d.ts +3 -3
- package/dist/promise/session.d.ts +40 -2
- package/package.json +11 -12
package/dist/effect/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CredentialApi, ExperimentalApi,
|
|
1
|
+
import type { CredentialApi, ExperimentalApi, ExperimentalGenerateApi, PluginApi } from "@opencode/client/effect/api";
|
|
2
2
|
import type { Location } from "@opencode/schema/location";
|
|
3
3
|
import type { Effect, Scope } from "effect";
|
|
4
4
|
import type { PluginOptions } from "../options.js";
|
|
@@ -34,13 +34,13 @@ export interface Context {
|
|
|
34
34
|
readonly experimental: {
|
|
35
35
|
readonly terminal: Pick<ExperimentalApi<unknown>["persistentPty"], "read">;
|
|
36
36
|
/** Stateless generation with a model and a prompt: no session, history or tools. */
|
|
37
|
-
readonly generate:
|
|
37
|
+
readonly generate: ExperimentalGenerateApi<unknown>;
|
|
38
38
|
};
|
|
39
39
|
readonly integration: IntegrationDomain;
|
|
40
40
|
readonly mcp: MCPDomain;
|
|
41
41
|
readonly model: ModelDomain;
|
|
42
42
|
/** @deprecated Use `experimental.generate.text`. */
|
|
43
|
-
readonly generate: Pick<
|
|
43
|
+
readonly generate: Pick<ExperimentalGenerateApi<unknown>, "text">;
|
|
44
44
|
readonly permission: PermissionDomain;
|
|
45
45
|
readonly plugin: Pick<PluginApi<unknown>, "list">;
|
|
46
46
|
readonly provider: ProviderDomain;
|
package/dist/effect/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SessionApi } from "@opencode/client/effect/api";
|
|
1
|
+
import type { ExperimentalSessionApi, SessionApi } from "@opencode/client/effect/api";
|
|
2
2
|
import type { GenerationOptionsFields, Message, SystemPart } from "@opencode/ai/effect";
|
|
3
3
|
import type { Agent } from "@opencode/schema/agent";
|
|
4
4
|
import type { Model } from "@opencode/schema/model";
|
|
@@ -127,6 +127,43 @@ export interface SessionRetry {
|
|
|
127
127
|
readonly attempt: number;
|
|
128
128
|
decision: SessionRetryDecision;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Background work still running for the idle Session or one of its descendants. `sessionID` is
|
|
132
|
+
* the Session that owns the job: the idle Session itself, or a descendant such as a subagent child.
|
|
133
|
+
*/
|
|
134
|
+
export type SessionIdleBackground = {
|
|
135
|
+
readonly kind: "shell";
|
|
136
|
+
readonly sessionID: Session.ID;
|
|
137
|
+
readonly shellID: string;
|
|
138
|
+
readonly command: string;
|
|
139
|
+
} | {
|
|
140
|
+
readonly kind: "subagent";
|
|
141
|
+
readonly sessionID: Session.ID;
|
|
142
|
+
readonly childSessionID: Session.ID;
|
|
143
|
+
readonly agent: string;
|
|
144
|
+
readonly description: string;
|
|
145
|
+
} | {
|
|
146
|
+
readonly kind: "image";
|
|
147
|
+
readonly sessionID: Session.ID;
|
|
148
|
+
readonly path: string;
|
|
149
|
+
readonly model: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Runs when a Session finishes model work and has no pending input, just before it goes idle.
|
|
153
|
+
* It does not run after interruption, failure, or control-only work such as a manual compaction.
|
|
154
|
+
* Input admitted by the hook, such as a synthetic message, runs in the same execution instead
|
|
155
|
+
* of the Session going idle.
|
|
156
|
+
*
|
|
157
|
+
* `background` lists work that is still running. When the Session's own shell or subagent finishes,
|
|
158
|
+
* its notice wakes the Session and the hook runs again, so a plugin that waits for that work can
|
|
159
|
+
* simply return. Work a descendant owns, such as a shell a subagent left running, wakes that
|
|
160
|
+
* descendant instead, so it is listed for information only. Notices admitted with `resume: false`,
|
|
161
|
+
* such as those recovered after a restart, wait for the next wake. Experimental.
|
|
162
|
+
*/
|
|
163
|
+
export interface SessionIdle {
|
|
164
|
+
readonly sessionID: Session.ID;
|
|
165
|
+
readonly background: ReadonlyArray<SessionIdleBackground>;
|
|
166
|
+
}
|
|
130
167
|
export interface SessionHooks {
|
|
131
168
|
readonly prompt: SessionPrompt;
|
|
132
169
|
readonly context: SessionContext;
|
|
@@ -140,7 +177,8 @@ export interface SessionHooks {
|
|
|
140
177
|
readonly "experimental.ws.send": SessionWebSocketSend;
|
|
141
178
|
readonly "experimental.ws.receive": SessionWebSocketReceive;
|
|
142
179
|
readonly retry: SessionRetry;
|
|
180
|
+
readonly "experimental.idle": SessionIdle;
|
|
143
181
|
}
|
|
144
|
-
export type SessionDomain = Pick<SessionApi<unknown>, "list" | "create" | "get" | "remove" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "compact" | "synthetic" | "interrupt" | "update" | "move" | "
|
|
182
|
+
export type SessionDomain = Pick<SessionApi<unknown>, "list" | "create" | "get" | "remove" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "compact" | "synthetic" | "interrupt" | "update" | "move" | "context"> & Pick<ExperimentalSessionApi<unknown>, "wait" | "instructions"> & {
|
|
145
183
|
readonly hook: ModelHooks<SessionHooks>;
|
|
146
184
|
};
|
package/dist/gui/host-apis.d.ts
CHANGED
|
@@ -436,7 +436,8 @@ export interface ComposerFile {
|
|
|
436
436
|
commentOrigin?: "review" | "file";
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
|
-
* A
|
|
439
|
+
* A reference to something other than workspace lines, such as an element picked in a page, with an optional comment.
|
|
440
|
+
* The model reads "The user referenced <subject>." when `comment` is empty, otherwise
|
|
440
441
|
* "The user made the following comment regarding <subject>: <comment>".
|
|
441
442
|
*/
|
|
442
443
|
export interface ComposerNote {
|
|
@@ -448,11 +449,15 @@ export interface ComposerNote {
|
|
|
448
449
|
commentID: string;
|
|
449
450
|
/** Chip text naming the subject, e.g. `button#save`. */
|
|
450
451
|
label: string;
|
|
452
|
+
/** Primary heading while `comment` is empty, e.g. `button#save`. Defaults to `label`; ignored with a comment. */
|
|
453
|
+
title?: string;
|
|
454
|
+
/** Plain-text footer with or without a comment, e.g. `Browser annotation`. Defaults to `label` when omitted. */
|
|
455
|
+
subtitle?: string;
|
|
451
456
|
/** Chip icon. */
|
|
452
457
|
icon: IconName;
|
|
453
458
|
/** What the comment is about, for the model. Quote untrusted text such as page content. */
|
|
454
459
|
subject: string;
|
|
455
|
-
/** The user's comment. */
|
|
460
|
+
/** The user's comment. An empty string attaches the subject without a comment. */
|
|
456
461
|
comment: string;
|
|
457
462
|
/** The link opening the chip routes, with `origin`. */
|
|
458
463
|
href?: string;
|
|
@@ -491,6 +496,32 @@ export interface ComposerQuote {
|
|
|
491
496
|
readonly subject: string;
|
|
492
497
|
};
|
|
493
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Positions a quote's optional comment editor beside its source, in viewport pixels. Called after the first editor
|
|
501
|
+
* measurement, on scroll and resize, and when reactive values it reads change. The editor holds its opening bottom
|
|
502
|
+
* edge as its input grows upward. Return undefined when the source is unavailable to use the composer tile instead.
|
|
503
|
+
* Never persisted.
|
|
504
|
+
*
|
|
505
|
+
* @param size - The current editor width and its frozen opening height; never called with an unmeasured zero height.
|
|
506
|
+
* @example
|
|
507
|
+
* const anchor: ComposerQuoteAnchor = (size) => ({ top: 200, left: 400 - size.width / 2 })
|
|
508
|
+
*/
|
|
509
|
+
export type ComposerQuoteAnchor = (size: {
|
|
510
|
+
/** Current editor width in pixels. */
|
|
511
|
+
width: number;
|
|
512
|
+
/** Measured opening height in pixels, unchanged as the input grows. */
|
|
513
|
+
height: number;
|
|
514
|
+
}) => {
|
|
515
|
+
/** Physical distance from the viewport's top edge, in pixels. Clamped to the viewport. */
|
|
516
|
+
top: number;
|
|
517
|
+
/** Physical distance from the viewport's left edge, in pixels. Clamped to the viewport. */
|
|
518
|
+
left: number;
|
|
519
|
+
} | undefined;
|
|
520
|
+
/** Optional placement for a newly attached quote's comment editor. */
|
|
521
|
+
export interface ComposerFocusOptions {
|
|
522
|
+
/** Positions the editor beside its source instead of its tile. Omit for tile placement. */
|
|
523
|
+
anchor?: ComposerQuoteAnchor;
|
|
524
|
+
}
|
|
494
525
|
/** A model the composer sends a prompt with, as the model picker names it. */
|
|
495
526
|
export interface ComposerModel {
|
|
496
527
|
/** The provider's id, e.g. `anthropic`. */
|
|
@@ -580,8 +611,9 @@ export interface Composer {
|
|
|
580
611
|
* its focus and the comment editor opens once the composer shows.
|
|
581
612
|
*
|
|
582
613
|
* @param commentID - The attached quote whose comment editor to open. Omit it to focus the prompt.
|
|
614
|
+
* @param options - Optional placement beside the quote's source. Omit to anchor to its composer tile.
|
|
583
615
|
*/
|
|
584
|
-
focus(commentID?: string): void;
|
|
616
|
+
focus(commentID?: string, options?: ComposerFocusOptions): void;
|
|
585
617
|
/**
|
|
586
618
|
* Changes an attached part. Files, notes and quotes alike; a note or a quote takes only `comment`. Before the
|
|
587
619
|
* session's draft loads, it waits and applies in call order.
|
package/dist/gui/icon-name.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** An icon from the app's catalog, for SDK fields such as `SessionPanelMenuItem.icon`. */
|
|
2
|
-
export type IconName = "align-right" | "appearance" | "archive" | "arrow-down-to-line" | "arrow-left" | "arrow-right" | "arrow-undo-down" | "arrow-up" | "arrow-up-right" | "brain" | "branch" | "branch-out" | "bubble-5" | "bullet-list" | "check" | "check-small" | "checklist" | "chevron-double-right" | "chevron-down" | "chevron-grabber-vertical" | "chevron-left" | "chevron-right" | "circle-ban-sign" | "circle-check" | "circle-exclamation" | "circle-x" | "circle-xmark" | "close" | "close-small" | "cloud-upload" | "code" | "code-lines" | "code-slash" | "collapse" | "comment" | "console" | "copy" | "cube" | "dash" | "discord" | "dot-grid" | "download" | "edit" | "edit-small-2" | "enter" | "expand" | "extensions" | "eye" | "file-document" | "file-tree" | "file-tree-active" | "filetree" | "fill-triangle-down" | "flask" | "folder" | "folder-add-left" | "fork" | "github" | "glasses" | "globe" | "graduation-cap" | "grid-plus" | "help" | "info" | "keyboard" | "layout-bottom" | "layout-bottom-full" | "layout-bottom-partial" | "layout-left" | "layout-left-full" | "layout-left-partial" | "layout-right" | "layout-right-full" | "layout-right-partial" | "link" | "lock" | "magnifying-glass" | "magnifying-glass-menu" | "mcp" | "menu" | "minus" | "models" | "monitor" | "new-session" | "new-session-active" | "notifications" | "open-file" | "outline-arrow-left" | "outline-arrow-right" | "outline-arrow-to-corner-top-right" | "outline-arrow-up-right" | "outline-audio" | "outline-brain" | "outline-browser-annotate" | "outline-chevron-down" | "outline-chevron-right" | "outline-console" | "outline-cookie" | "outline-copy" | "outline-dots" | "outline-eye" | "outline-eye-slash" | "outline-globe" | "outline-globe-plus" | "outline-hexagonal-warning" | "outline-photo" | "outline-quote" | "outline-reset" | "outline-rotate-clockwise" | "outline-share" | "outline-sliders" | "outline-square-arrow" | "outline-steer" | "outline-text" | "outline-trash" | "outline-undo" | "outline-video" | "outline-wave-audio" | "outline-worktree" | "outline-xmark" | "pencil-line" | "photo" | "plus" | "plus-small" | "post-skill" | "prompt" | "providers" | "refresh" | "reset" | "review" | "review-active" | "select-element" | "selector" | "server" | "settings-gear" | "share" | "shield" | "sidebar" | "sidebar-active" | "sliders" | "speech-bubble" | "split" | "square-arrow-top-right" | "status" | "status-active" | "stop" | "task" | "terminal" | "terminal-active" | "trash" | "unified" | "warning" | "waveform" | "window-analytics" | "window-cursor" | "workspace" | "workspace-isolated" | "workspace-new" | "xmark-small";
|
|
2
|
+
export type IconName = "align-right" | "appearance" | "archive" | "arrow-down-to-line" | "arrow-left" | "arrow-right" | "arrow-undo-down" | "arrow-up" | "arrow-up-right" | "brain" | "branch" | "branch-out" | "bubble-5" | "bullet-list" | "check" | "check-small" | "checklist" | "chevron-double-right" | "chevron-down" | "chevron-grabber-vertical" | "chevron-left" | "chevron-right" | "circle-ban-sign" | "circle-check" | "circle-exclamation" | "circle-x" | "circle-xmark" | "close" | "close-small" | "cloud-upload" | "code" | "code-lines" | "code-slash" | "collapse" | "comment" | "console" | "copy" | "cube" | "dash" | "discord" | "dot-grid" | "download" | "edit" | "edit-small-2" | "enter" | "expand" | "extensions" | "eye" | "file-document" | "file-tree" | "file-tree-active" | "filetree" | "fill-triangle-down" | "flask" | "folder" | "folder-add-left" | "fork" | "github" | "glasses" | "globe" | "graduation-cap" | "grid-plus" | "help" | "info" | "keyboard" | "layout-bottom" | "layout-bottom-full" | "layout-bottom-partial" | "layout-left" | "layout-left-full" | "layout-left-partial" | "layout-right" | "layout-right-full" | "layout-right-partial" | "link" | "lock" | "magnifying-glass" | "magnifying-glass-menu" | "mcp" | "menu" | "minus" | "models" | "monitor" | "new-session" | "new-session-active" | "notifications" | "open-file" | "outline-arrow-left" | "outline-arrow-right" | "outline-arrow-to-corner-top-right" | "outline-arrow-up-right" | "outline-audio" | "outline-brain" | "outline-browser-annotate" | "outline-chevron-down" | "outline-chevron-right" | "outline-code-brackets" | "outline-console" | "outline-cookie" | "outline-copy" | "outline-dots" | "outline-expand" | "outline-eye" | "outline-eye-slash" | "outline-globe" | "outline-globe-plus" | "outline-hexagonal-warning" | "outline-magnifier-minus" | "outline-magnifier-plus" | "outline-photo" | "outline-quote" | "outline-reset" | "outline-rotate-clockwise" | "outline-share" | "outline-sliders" | "outline-square-arrow" | "outline-steer" | "outline-text" | "outline-trash" | "outline-undo" | "outline-video" | "outline-wave-audio" | "outline-worktree" | "outline-xmark" | "pencil-line" | "photo" | "plus" | "plus-small" | "post-skill" | "prompt" | "providers" | "refresh" | "reset" | "review" | "review-active" | "select-element" | "selector" | "server" | "settings-gear" | "share" | "shield" | "sidebar" | "sidebar-active" | "sliders" | "speech-bubble" | "split" | "square-arrow-top-right" | "status" | "status-active" | "stop" | "task" | "terminal" | "terminal-active" | "trash" | "unified" | "warning" | "waveform" | "window-analytics" | "window-cursor" | "workspace" | "workspace-isolated" | "workspace-new" | "xmark-small";
|
package/dist/gui/registries.d.ts
CHANGED
|
@@ -591,6 +591,11 @@ export interface ComposerPillRow {
|
|
|
591
591
|
/** Runs when the user picks the row. Omit it for a row that only shows. */
|
|
592
592
|
run?(): void;
|
|
593
593
|
}
|
|
594
|
+
/** What a composer pill's `menu` receives: the pill's session and a way to close the popover. Do not destructure. */
|
|
595
|
+
export interface ComposerPillMenuProps extends ComposerPillProps {
|
|
596
|
+
/** Closes the popover, for example after the user picks an action in it. Does nothing once it is closed. */
|
|
597
|
+
close(): void;
|
|
598
|
+
}
|
|
594
599
|
/** What a composer pill shows above one session's composer. */
|
|
595
600
|
export interface ComposerPillView {
|
|
596
601
|
/** The capsule's text; long text truncates. */
|
|
@@ -599,11 +604,14 @@ export interface ComposerPillView {
|
|
|
599
604
|
readonly icon?: IconName;
|
|
600
605
|
/** Colors the capsule's icon. */
|
|
601
606
|
readonly tone?: ComposerPillTone;
|
|
602
|
-
/**
|
|
607
|
+
/**
|
|
608
|
+
* Accessible name, and the heading of the menu or popover the pill opens, when it differs from `label`. The heading
|
|
609
|
+
* wraps to at most three lines, then truncates.
|
|
610
|
+
*/
|
|
603
611
|
readonly title?: string;
|
|
604
|
-
/** The menu the pill opens. Omit it for a pill that runs `run` instead. */
|
|
612
|
+
/** The menu the pill opens. Omit it for a pill that runs `run` instead. Unused when the pill has a `menu`. */
|
|
605
613
|
readonly rows?: readonly ComposerPillRow[];
|
|
606
|
-
/** Runs when the user clicks a pill without `rows`. */
|
|
614
|
+
/** Runs when the user clicks a pill without `rows` or a `menu`. */
|
|
607
615
|
run?(): void;
|
|
608
616
|
}
|
|
609
617
|
/**
|
|
@@ -623,6 +631,16 @@ export interface ComposerPill {
|
|
|
623
631
|
* @param input - The session and its screen. Do not destructure.
|
|
624
632
|
*/
|
|
625
633
|
show(input: ComposerPillProps): ComposerPillView | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* Your content for the popover the pill opens, for a pill that needs more than `rows`, such as status text and
|
|
636
|
+
* buttons. The host owns the capsule and the popover around this content: its placement, focus, dismissal, and the
|
|
637
|
+
* heading (`title`, else `label`). When set, clicking the pill opens the popover, and the view's `rows` and `run` are
|
|
638
|
+
* unused. Renders each time the popover opens; its own reactivity updates it while open, also when another session is
|
|
639
|
+
* routed. A render that throws renders nothing and records the error.
|
|
640
|
+
*
|
|
641
|
+
* @param input - The session, its screen, and `close`. Do not destructure.
|
|
642
|
+
*/
|
|
643
|
+
menu?(input: ComposerPillMenuProps): JSX.Element;
|
|
626
644
|
}
|
|
627
645
|
/** The places a `Slot` renders, with the input each passes to `render`. */
|
|
628
646
|
export interface SlotMap {
|
package/dist/promise/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OpenCodeClient } from "@opencode/client";
|
|
2
|
-
import type { CredentialApi,
|
|
2
|
+
import type { CredentialApi, ExperimentalGenerateApi, PluginApi } from "@opencode/client/promise/api";
|
|
3
3
|
import type { Location } from "@opencode/schema/location";
|
|
4
4
|
import type { PluginOptions } from "../options.js";
|
|
5
5
|
import type { App } from "../app.js";
|
|
@@ -34,13 +34,13 @@ export interface Context {
|
|
|
34
34
|
readonly experimental: {
|
|
35
35
|
readonly terminal: Pick<OpenCodeClient["experimental"]["persistentPty"], "read">;
|
|
36
36
|
/** Stateless generation with a model and a prompt: no session, history or tools. */
|
|
37
|
-
readonly generate:
|
|
37
|
+
readonly generate: ExperimentalGenerateApi;
|
|
38
38
|
};
|
|
39
39
|
readonly integration: IntegrationDomain;
|
|
40
40
|
readonly mcp: MCPDomain;
|
|
41
41
|
readonly model: ModelDomain;
|
|
42
42
|
/** @deprecated Use `experimental.generate.text`. */
|
|
43
|
-
readonly generate: Pick<
|
|
43
|
+
readonly generate: Pick<ExperimentalGenerateApi, "text">;
|
|
44
44
|
readonly permission: PermissionDomain;
|
|
45
45
|
readonly plugin: Pick<PluginApi, "list">;
|
|
46
46
|
readonly provider: ProviderDomain;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SessionApi } from "@opencode/client/promise/api";
|
|
1
|
+
import type { ExperimentalSessionApi, SessionApi } from "@opencode/client/promise/api";
|
|
2
2
|
import type { GenerationOptionsFields, Message, SystemPart } from "@opencode/ai/effect";
|
|
3
3
|
import type { Agent } from "@opencode/schema/agent";
|
|
4
4
|
import type { Model } from "@opencode/schema/model";
|
|
@@ -127,6 +127,43 @@ export interface SessionRetry {
|
|
|
127
127
|
readonly attempt: number;
|
|
128
128
|
decision: SessionRetryDecision;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Background work still running for the idle Session or one of its descendants. `sessionID` is
|
|
132
|
+
* the Session that owns the job: the idle Session itself, or a descendant such as a subagent child.
|
|
133
|
+
*/
|
|
134
|
+
export type SessionIdleBackground = {
|
|
135
|
+
readonly kind: "shell";
|
|
136
|
+
readonly sessionID: Session.ID;
|
|
137
|
+
readonly shellID: string;
|
|
138
|
+
readonly command: string;
|
|
139
|
+
} | {
|
|
140
|
+
readonly kind: "subagent";
|
|
141
|
+
readonly sessionID: Session.ID;
|
|
142
|
+
readonly childSessionID: Session.ID;
|
|
143
|
+
readonly agent: string;
|
|
144
|
+
readonly description: string;
|
|
145
|
+
} | {
|
|
146
|
+
readonly kind: "image";
|
|
147
|
+
readonly sessionID: Session.ID;
|
|
148
|
+
readonly path: string;
|
|
149
|
+
readonly model: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Runs when a Session finishes model work and has no pending input, just before it goes idle.
|
|
153
|
+
* It does not run after interruption, failure, or control-only work such as a manual compaction.
|
|
154
|
+
* Input admitted by the hook, such as a synthetic message, runs in the same execution instead
|
|
155
|
+
* of the Session going idle.
|
|
156
|
+
*
|
|
157
|
+
* `background` lists work that is still running. When the Session's own shell or subagent finishes,
|
|
158
|
+
* its notice wakes the Session and the hook runs again, so a plugin that waits for that work can
|
|
159
|
+
* simply return. Work a descendant owns, such as a shell a subagent left running, wakes that
|
|
160
|
+
* descendant instead, so it is listed for information only. Notices admitted with `resume: false`,
|
|
161
|
+
* such as those recovered after a restart, wait for the next wake. Experimental.
|
|
162
|
+
*/
|
|
163
|
+
export interface SessionIdle {
|
|
164
|
+
readonly sessionID: Session.ID;
|
|
165
|
+
readonly background: ReadonlyArray<SessionIdleBackground>;
|
|
166
|
+
}
|
|
130
167
|
export interface SessionHooks {
|
|
131
168
|
readonly prompt: SessionPrompt;
|
|
132
169
|
readonly context: SessionContext;
|
|
@@ -140,7 +177,8 @@ export interface SessionHooks {
|
|
|
140
177
|
readonly "experimental.ws.send": SessionWebSocketSend;
|
|
141
178
|
readonly "experimental.ws.receive": SessionWebSocketReceive;
|
|
142
179
|
readonly retry: SessionRetry;
|
|
180
|
+
readonly "experimental.idle": SessionIdle;
|
|
143
181
|
}
|
|
144
|
-
export type SessionDomain = Pick<SessionApi, "list" | "create" | "get" | "remove" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "compact" | "synthetic" | "interrupt" | "update" | "move" | "
|
|
182
|
+
export type SessionDomain = Pick<SessionApi, "list" | "create" | "get" | "remove" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "compact" | "synthetic" | "interrupt" | "update" | "move" | "context"> & Pick<ExperimentalSessionApi, "wait" | "instructions"> & {
|
|
145
183
|
readonly hook: ModelHooks<SessionHooks>;
|
|
146
184
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/plugin",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -78,15 +78,15 @@
|
|
|
78
78
|
],
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@ai-sdk/provider": "3.0.8",
|
|
81
|
-
"@opencode/ai": "2.2.
|
|
82
|
-
"@opencode/client": "2.2.
|
|
83
|
-
"@opencode/protocol": "2.2.
|
|
84
|
-
"@opencode/schema": "2.2.
|
|
85
|
-
"@opencode/util": "2.2.
|
|
86
|
-
"effect": "4.0.
|
|
81
|
+
"@opencode/ai": "2.2.2",
|
|
82
|
+
"@opencode/client": "2.2.2",
|
|
83
|
+
"@opencode/protocol": "2.2.2",
|
|
84
|
+
"@opencode/schema": "2.2.2",
|
|
85
|
+
"@opencode/util": "2.2.2",
|
|
86
|
+
"effect": "4.0.6"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@opencode/theme": "2.2.
|
|
89
|
+
"@opencode/theme": "2.2.2",
|
|
90
90
|
"@opentui/core": "0.7.0",
|
|
91
91
|
"@opentui/solid": "0.7.0",
|
|
92
92
|
"electron": "*",
|
|
@@ -118,17 +118,16 @@
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
|
-
"@opencode/theme": "2.2.
|
|
121
|
+
"@opencode/theme": "2.2.2",
|
|
122
122
|
"@opentui/core": "0.7.0",
|
|
123
123
|
"@opentui/solid": "0.7.0",
|
|
124
124
|
"@tsconfig/bun": "1.0.9",
|
|
125
|
-
"@tsconfig/node22": "22.0.2",
|
|
126
125
|
"@types/bun": "1.4.3",
|
|
127
126
|
"@types/node": "24.12.2",
|
|
128
127
|
"electron": "44.9.1",
|
|
129
|
-
"solid-js": "1.9.
|
|
128
|
+
"solid-js": "1.9.17",
|
|
130
129
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
131
|
-
"vite": "7.3.
|
|
130
|
+
"vite": "7.3.7",
|
|
132
131
|
"vite-plugin-solid": "2.11.10",
|
|
133
132
|
"@typescript/native": "npm:typescript@7.1.0-beta"
|
|
134
133
|
},
|