@opencode-ai/plugin 0.0.0-next-15347 → 0.0.0-next-15351

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.
@@ -0,0 +1,95 @@
1
+ import type { AgentInfo, CommandInfo, FormInfo, IntegrationInfo, LocationRef, McpResource, McpServer, ModelInfo, OpenCodeClient, OpenCodeEvent, PermissionSavedInfo, PermissionV2Request, ProviderV2Info, ReferenceInfo, SessionInfo, SessionMessageInfo, SessionPendingInfo, ShellInfo, SkillInfo } from "@opencode-ai/client";
2
+ import type { JSX } from "@opentui/solid";
3
+ interface LocationCollection<Value> {
4
+ list(location?: LocationRef): Value[] | undefined;
5
+ refresh(location?: LocationRef): Promise<void>;
6
+ }
7
+ export interface Data {
8
+ readonly on: <Type extends OpenCodeEvent["type"]>(type: Type, handler: (event: Extract<OpenCodeEvent, {
9
+ type: Type;
10
+ }>) => void) => () => void;
11
+ readonly listen: (handler: (event: {
12
+ details: OpenCodeEvent;
13
+ }) => void) => () => void;
14
+ readonly session: {
15
+ list(): SessionInfo[];
16
+ get(sessionID: string): SessionInfo | undefined;
17
+ root(sessionID: string): string;
18
+ family(sessionID: string): string[];
19
+ cost(sessionID: string): number;
20
+ status(sessionID: string): "idle" | "running";
21
+ readonly pending: {
22
+ list(sessionID: string): SessionPendingInfo[];
23
+ refresh(sessionID: string): Promise<void>;
24
+ };
25
+ refresh(sessionID: string): Promise<void>;
26
+ readonly message: {
27
+ list(sessionID: string): SessionMessageInfo[];
28
+ get(sessionID: string, messageID: string): SessionMessageInfo | undefined;
29
+ refresh(sessionID: string): Promise<void>;
30
+ };
31
+ readonly permission: {
32
+ list(sessionID: string): PermissionV2Request[] | undefined;
33
+ refresh(sessionID: string): Promise<void>;
34
+ };
35
+ readonly form: {
36
+ list(sessionID: string, location?: LocationRef): Array<FormInfo & {
37
+ readonly location?: LocationRef;
38
+ }> | undefined;
39
+ refresh(sessionID: string, location?: LocationRef): Promise<void>;
40
+ };
41
+ };
42
+ readonly project: {
43
+ readonly permission: {
44
+ list(projectID: string): PermissionSavedInfo[] | undefined;
45
+ refresh(projectID: string): Promise<void>;
46
+ };
47
+ };
48
+ readonly shell: {
49
+ list(location?: LocationRef): ShellInfo[];
50
+ get(id: string): ShellInfo | undefined;
51
+ refresh(location?: LocationRef): Promise<void>;
52
+ };
53
+ readonly location: {
54
+ default(): LocationRef;
55
+ refresh(location?: LocationRef): Promise<void>;
56
+ readonly agent: LocationCollection<AgentInfo>;
57
+ readonly command: LocationCollection<CommandInfo>;
58
+ readonly integration: LocationCollection<IntegrationInfo>;
59
+ readonly mcp: {
60
+ readonly server: LocationCollection<McpServer>;
61
+ readonly resource: LocationCollection<McpResource>;
62
+ };
63
+ readonly model: LocationCollection<ModelInfo>;
64
+ readonly provider: LocationCollection<ProviderV2Info>;
65
+ readonly reference: LocationCollection<ReferenceInfo>;
66
+ readonly skill: LocationCollection<SkillInfo>;
67
+ };
68
+ }
69
+ export interface RouteDefinition {
70
+ readonly name: string;
71
+ readonly render: (input: {
72
+ readonly params: any;
73
+ }) => JSX.Element;
74
+ }
75
+ export interface Route {
76
+ register(definition: RouteDefinition): () => void;
77
+ navigate(input: {
78
+ readonly name: string;
79
+ readonly params?: any;
80
+ }): void;
81
+ current(): {
82
+ readonly name: string;
83
+ readonly params: any;
84
+ };
85
+ }
86
+ export interface UI {
87
+ readonly route: Route;
88
+ }
89
+ export interface Context {
90
+ readonly options: Record<string, any>;
91
+ readonly client: OpenCodeClient;
92
+ readonly data: Data;
93
+ readonly ui: UI;
94
+ }
95
+ export {};
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/plugin",
4
- "version": "0.0.0-next-15347",
4
+ "version": "0.0.0-next-15351",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -30,6 +30,10 @@
30
30
  "import": "./dist/v2/effect/*.js",
31
31
  "types": "./dist/v2/effect/*.d.ts"
32
32
  },
33
+ "./v2/tui/*": {
34
+ "import": "./dist/v2/tui/*.js",
35
+ "types": "./dist/v2/tui/*.d.ts"
36
+ },
33
37
  "./v2": {
34
38
  "import": "./dist/v2/promise/index.js",
35
39
  "types": "./dist/v2/promise/index.d.ts"
@@ -44,9 +48,9 @@
44
48
  ],
45
49
  "dependencies": {
46
50
  "@ai-sdk/provider": "3.0.8",
47
- "@opencode-ai/client": "0.0.0-next-15347",
48
- "@opencode-ai/schema": "0.0.0-next-15347",
49
- "@opencode-ai/sdk": "0.0.0-next-15347",
51
+ "@opencode-ai/client": "0.0.0-next-15351",
52
+ "@opencode-ai/schema": "0.0.0-next-15351",
53
+ "@opencode-ai/sdk": "0.0.0-next-15351",
50
54
  "effect": "4.0.0-beta.83",
51
55
  "zod": "4.1.8"
52
56
  },