@opencode-ai/plugin 0.0.0-next-15346 → 0.0.0-next-15350
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/v2/tui/context.d.ts +76 -0
- package/dist/v2/tui/context.js +0 -0
- package/package.json +8 -4
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
interface LocationCollection<Value> {
|
|
3
|
+
list(location?: LocationRef): Value[] | undefined;
|
|
4
|
+
refresh(location?: LocationRef): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export interface Data {
|
|
7
|
+
readonly on: <Type extends OpenCodeEvent["type"]>(type: Type, handler: (event: Extract<OpenCodeEvent, {
|
|
8
|
+
type: Type;
|
|
9
|
+
}>) => void) => () => void;
|
|
10
|
+
readonly listen: (handler: (event: {
|
|
11
|
+
details: OpenCodeEvent;
|
|
12
|
+
}) => void) => () => void;
|
|
13
|
+
readonly session: {
|
|
14
|
+
list(): SessionInfo[];
|
|
15
|
+
get(sessionID: string): SessionInfo | undefined;
|
|
16
|
+
root(sessionID: string): string;
|
|
17
|
+
family(sessionID: string): string[];
|
|
18
|
+
cost(sessionID: string): number;
|
|
19
|
+
status(sessionID: string): "idle" | "running";
|
|
20
|
+
readonly pending: {
|
|
21
|
+
list(sessionID: string): SessionPendingInfo[];
|
|
22
|
+
refresh(sessionID: string): Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
refresh(sessionID: string): Promise<void>;
|
|
25
|
+
readonly message: {
|
|
26
|
+
list(sessionID: string): SessionMessageInfo[];
|
|
27
|
+
get(sessionID: string, messageID: string): SessionMessageInfo | undefined;
|
|
28
|
+
refresh(sessionID: string): Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
readonly permission: {
|
|
31
|
+
list(sessionID: string): PermissionV2Request[] | undefined;
|
|
32
|
+
refresh(sessionID: string): Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
readonly form: {
|
|
35
|
+
list(sessionID: string, location?: LocationRef): Array<FormInfo & {
|
|
36
|
+
readonly location?: LocationRef;
|
|
37
|
+
}> | undefined;
|
|
38
|
+
refresh(sessionID: string, location?: LocationRef): Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
readonly project: {
|
|
42
|
+
readonly permission: {
|
|
43
|
+
list(projectID: string): PermissionSavedInfo[] | undefined;
|
|
44
|
+
refresh(projectID: string): Promise<void>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly shell: {
|
|
48
|
+
list(location?: LocationRef): ShellInfo[];
|
|
49
|
+
get(id: string): ShellInfo | undefined;
|
|
50
|
+
refresh(location?: LocationRef): Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
readonly location: {
|
|
53
|
+
default(): LocationRef;
|
|
54
|
+
refresh(location?: LocationRef): Promise<void>;
|
|
55
|
+
readonly agent: LocationCollection<AgentInfo>;
|
|
56
|
+
readonly command: LocationCollection<CommandInfo>;
|
|
57
|
+
readonly integration: LocationCollection<IntegrationInfo>;
|
|
58
|
+
readonly mcp: {
|
|
59
|
+
readonly server: LocationCollection<McpServer>;
|
|
60
|
+
readonly resource: LocationCollection<McpResource>;
|
|
61
|
+
};
|
|
62
|
+
readonly model: LocationCollection<ModelInfo>;
|
|
63
|
+
readonly provider: LocationCollection<ProviderV2Info>;
|
|
64
|
+
readonly reference: LocationCollection<ReferenceInfo>;
|
|
65
|
+
readonly skill: LocationCollection<SkillInfo>;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface UI {
|
|
69
|
+
}
|
|
70
|
+
export interface Context {
|
|
71
|
+
readonly options: Record<string, any>;
|
|
72
|
+
readonly client: OpenCodeClient;
|
|
73
|
+
readonly data: Data;
|
|
74
|
+
readonly ui: UI;
|
|
75
|
+
}
|
|
76
|
+
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-
|
|
4
|
+
"version": "0.0.0-next-15350",
|
|
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-
|
|
48
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
49
|
-
"@opencode-ai/sdk": "0.0.0-next-
|
|
51
|
+
"@opencode-ai/client": "0.0.0-next-15350",
|
|
52
|
+
"@opencode-ai/schema": "0.0.0-next-15350",
|
|
53
|
+
"@opencode-ai/sdk": "0.0.0-next-15350",
|
|
50
54
|
"effect": "4.0.0-beta.83",
|
|
51
55
|
"zod": "4.1.8"
|
|
52
56
|
},
|