@opencode-ai/plugin 0.0.0-next-16916 → 0.0.0-next-16931
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 +12 -6
- package/dist/promise/session.d.ts +11 -5
- package/package.json +6 -6
package/dist/effect/session.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Message, SystemPart } from "@opencode-ai/ai";
|
|
|
3
3
|
import type { Agent } from "@opencode-ai/schema/agent";
|
|
4
4
|
import type { Model } from "@opencode-ai/schema/model";
|
|
5
5
|
import type { Session } from "@opencode-ai/schema/session";
|
|
6
|
-
import type {
|
|
6
|
+
import type { JsonSchema } from "effect";
|
|
7
7
|
import type { Hooks } from "./registration.js";
|
|
8
8
|
export interface SessionContext {
|
|
9
9
|
readonly sessionID: Session.ID;
|
|
@@ -16,17 +16,23 @@ export interface SessionContext {
|
|
|
16
16
|
input: JsonSchema.JsonSchema;
|
|
17
17
|
}>;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface SessionHttpRequest {
|
|
20
20
|
readonly sessionID: Session.ID;
|
|
21
21
|
readonly agent: Agent.ID;
|
|
22
22
|
readonly model: Model.Ref;
|
|
23
|
-
|
|
23
|
+
request: Request;
|
|
24
|
+
}
|
|
25
|
+
export interface SessionHttpResponse {
|
|
26
|
+
readonly sessionID: Session.ID;
|
|
27
|
+
readonly agent: Agent.ID;
|
|
28
|
+
readonly model: Model.Ref;
|
|
29
|
+
readonly request: Request;
|
|
30
|
+
response: Response;
|
|
24
31
|
}
|
|
25
|
-
export type SessionHttpHandler = (request: Request) => Effect.Effect<Response, Error>;
|
|
26
|
-
export type SessionHttpMiddleware = (request: Request, next: SessionHttpHandler) => Effect.Effect<Response, Error>;
|
|
27
32
|
export interface SessionHooks {
|
|
28
33
|
readonly context: SessionContext;
|
|
29
|
-
readonly http:
|
|
34
|
+
readonly "http.request": SessionHttpRequest;
|
|
35
|
+
readonly "http.response": SessionHttpResponse;
|
|
30
36
|
}
|
|
31
37
|
export type SessionDomain = Pick<SessionApi<unknown>, "create" | "get" | "prompt" | "generate" | "command" | "synthetic" | "interrupt" | "rename" | "wait"> & {
|
|
32
38
|
readonly hook: Hooks<SessionHooks>;
|
|
@@ -16,17 +16,23 @@ export interface SessionContext {
|
|
|
16
16
|
input: JsonSchema.JsonSchema;
|
|
17
17
|
}>;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface SessionHttpRequest {
|
|
20
20
|
readonly sessionID: Session.ID;
|
|
21
21
|
readonly agent: Agent.ID;
|
|
22
22
|
readonly model: Model.Ref;
|
|
23
|
-
|
|
23
|
+
request: Request;
|
|
24
|
+
}
|
|
25
|
+
export interface SessionHttpResponse {
|
|
26
|
+
readonly sessionID: Session.ID;
|
|
27
|
+
readonly agent: Agent.ID;
|
|
28
|
+
readonly model: Model.Ref;
|
|
29
|
+
readonly request: Request;
|
|
30
|
+
response: Response;
|
|
24
31
|
}
|
|
25
|
-
export type SessionHttpHandler = (request: Request) => Promise<Response>;
|
|
26
|
-
export type SessionHttpMiddleware = (request: Request, next: SessionHttpHandler) => Promise<Response> | Response;
|
|
27
32
|
export interface SessionHooks {
|
|
28
33
|
readonly context: SessionContext;
|
|
29
|
-
readonly http:
|
|
34
|
+
readonly "http.request": SessionHttpRequest;
|
|
35
|
+
readonly "http.response": SessionHttpResponse;
|
|
30
36
|
}
|
|
31
37
|
export type SessionDomain = Pick<SessionApi, "create" | "get" | "prompt" | "generate" | "command" | "synthetic" | "interrupt"> & {
|
|
32
38
|
readonly hook: Hooks<SessionHooks>;
|
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-16931",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ai-sdk/provider": "3.0.8",
|
|
39
|
-
"@opencode-ai/ai": "0.0.0-next-
|
|
40
|
-
"@opencode-ai/client": "0.0.0-next-
|
|
41
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
39
|
+
"@opencode-ai/ai": "0.0.0-next-16931",
|
|
40
|
+
"@opencode-ai/client": "0.0.0-next-16931",
|
|
41
|
+
"@opencode-ai/schema": "0.0.0-next-16931",
|
|
42
42
|
"@opencode-ai/sdk": "1.18.5",
|
|
43
43
|
"@standard-schema/spec": "1.1.0",
|
|
44
44
|
"effect": "4.0.0-beta.101",
|
|
45
45
|
"zod": "4.1.8"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@opencode-ai/theme": "0.0.0-next-
|
|
48
|
+
"@opencode-ai/theme": "0.0.0-next-16931",
|
|
49
49
|
"@opentui/core": ">=0.4.5",
|
|
50
50
|
"@opentui/keymap": ">=0.4.5",
|
|
51
51
|
"@opentui/solid": ">=0.4.5",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@opencode-ai/theme": "0.0.0-next-
|
|
72
|
+
"@opencode-ai/theme": "0.0.0-next-16931",
|
|
73
73
|
"@opentui/core": "0.4.5",
|
|
74
74
|
"@opentui/keymap": "0.4.5",
|
|
75
75
|
"@opentui/solid": "0.4.5",
|