@opencode/plugin 2.0.4 → 2.0.6
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/session.d.ts +25 -0
- package/dist/promise/session.d.ts +25 -0
- package/package.json +8 -8
package/dist/effect/session.d.ts
CHANGED
|
@@ -89,6 +89,29 @@ export interface SessionWebSocketHandshake {
|
|
|
89
89
|
url: string;
|
|
90
90
|
headers: Record<string, string>;
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Outbound frame about to be written to the Session's socket, after the provider driver has built
|
|
94
|
+
* it. Replacing `frame` sends the replacement verbatim; the driver still tracks state from the
|
|
95
|
+
* provider's replies, so a rewrite that changes protocol meaning is on the plugin. Experimental.
|
|
96
|
+
*/
|
|
97
|
+
export interface SessionWebSocketSend {
|
|
98
|
+
readonly sessionID: Session.ID;
|
|
99
|
+
readonly agent: Agent.ID;
|
|
100
|
+
readonly model: Model.Ref;
|
|
101
|
+
readonly kind: SessionRequestKind;
|
|
102
|
+
frame: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Inbound frame read from the Session's socket, before the provider driver observes it. Replacing
|
|
106
|
+
* `frame` hands the replacement to the driver verbatim. Experimental.
|
|
107
|
+
*/
|
|
108
|
+
export interface SessionWebSocketReceive {
|
|
109
|
+
readonly sessionID: Session.ID;
|
|
110
|
+
readonly agent: Agent.ID;
|
|
111
|
+
readonly model: Model.Ref;
|
|
112
|
+
readonly kind: SessionRequestKind;
|
|
113
|
+
frame: string;
|
|
114
|
+
}
|
|
92
115
|
export type SessionRetryDecision = {
|
|
93
116
|
retry: false;
|
|
94
117
|
} | {
|
|
@@ -113,6 +136,8 @@ export interface SessionHooks {
|
|
|
113
136
|
readonly "http.request": SessionHttpRequest;
|
|
114
137
|
readonly "http.response": SessionHttpResponse;
|
|
115
138
|
readonly "experimental.ws.handshake": SessionWebSocketHandshake;
|
|
139
|
+
readonly "experimental.ws.send": SessionWebSocketSend;
|
|
140
|
+
readonly "experimental.ws.receive": SessionWebSocketReceive;
|
|
116
141
|
readonly retry: SessionRetry;
|
|
117
142
|
}
|
|
118
143
|
export type SessionDomain = Pick<SessionApi<unknown>, "create" | "get" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "synthetic" | "interrupt" | "update" | "move" | "wait" | "context"> & {
|
|
@@ -89,6 +89,29 @@ export interface SessionWebSocketHandshake {
|
|
|
89
89
|
url: string;
|
|
90
90
|
headers: Record<string, string>;
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Outbound frame about to be written to the Session's socket, after the provider driver has built
|
|
94
|
+
* it. Replacing `frame` sends the replacement verbatim; the driver still tracks state from the
|
|
95
|
+
* provider's replies, so a rewrite that changes protocol meaning is on the plugin. Experimental.
|
|
96
|
+
*/
|
|
97
|
+
export interface SessionWebSocketSend {
|
|
98
|
+
readonly sessionID: Session.ID;
|
|
99
|
+
readonly agent: Agent.ID;
|
|
100
|
+
readonly model: Model.Ref;
|
|
101
|
+
readonly kind: SessionRequestKind;
|
|
102
|
+
frame: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Inbound frame read from the Session's socket, before the provider driver observes it. Replacing
|
|
106
|
+
* `frame` hands the replacement to the driver verbatim. Experimental.
|
|
107
|
+
*/
|
|
108
|
+
export interface SessionWebSocketReceive {
|
|
109
|
+
readonly sessionID: Session.ID;
|
|
110
|
+
readonly agent: Agent.ID;
|
|
111
|
+
readonly model: Model.Ref;
|
|
112
|
+
readonly kind: SessionRequestKind;
|
|
113
|
+
frame: string;
|
|
114
|
+
}
|
|
92
115
|
export type SessionRetryDecision = {
|
|
93
116
|
retry: false;
|
|
94
117
|
} | {
|
|
@@ -113,6 +136,8 @@ export interface SessionHooks {
|
|
|
113
136
|
readonly "http.request": SessionHttpRequest;
|
|
114
137
|
readonly "http.response": SessionHttpResponse;
|
|
115
138
|
readonly "experimental.ws.handshake": SessionWebSocketHandshake;
|
|
139
|
+
readonly "experimental.ws.send": SessionWebSocketSend;
|
|
140
|
+
readonly "experimental.ws.receive": SessionWebSocketReceive;
|
|
116
141
|
readonly retry: SessionRetry;
|
|
117
142
|
}
|
|
118
143
|
export type SessionDomain = Pick<SessionApi, "create" | "get" | "switchAgent" | "switchModel" | "prompt" | "generate" | "command" | "synthetic" | "interrupt" | "update" | "move" | "wait" | "context"> & {
|
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.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ai-sdk/provider": "3.0.8",
|
|
46
|
-
"@opencode/ai": "2.0.
|
|
47
|
-
"@opencode/client": "2.0.
|
|
48
|
-
"@opencode/protocol": "2.0.
|
|
49
|
-
"@opencode/schema": "2.0.
|
|
50
|
-
"@opencode/util": "2.0.
|
|
46
|
+
"@opencode/ai": "2.0.6",
|
|
47
|
+
"@opencode/client": "2.0.6",
|
|
48
|
+
"@opencode/protocol": "2.0.6",
|
|
49
|
+
"@opencode/schema": "2.0.6",
|
|
50
|
+
"@opencode/util": "2.0.6",
|
|
51
51
|
"@standard-schema/spec": "1.1.0",
|
|
52
52
|
"effect": "4.0.0-rc.112",
|
|
53
53
|
"zod": "4.1.8"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@opencode/theme": "2.0.
|
|
56
|
+
"@opencode/theme": "2.0.6",
|
|
57
57
|
"@opentui/core": ">=0.5.10",
|
|
58
58
|
"@opentui/solid": ">=0.5.10",
|
|
59
59
|
"solid-js": ">=1.9.0"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@opencode/theme": "2.0.
|
|
76
|
+
"@opencode/theme": "2.0.6",
|
|
77
77
|
"@opentui/core": "0.5.10",
|
|
78
78
|
"@opentui/solid": "0.5.10",
|
|
79
79
|
"@tsconfig/bun": "1.0.9",
|