@opencode-ai/plugin 0.0.0-next-15619 → 0.0.0-next-15623

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.
@@ -2,7 +2,6 @@ import type { PluginApi } from "@opencode-ai/client/effect/api";
2
2
  import type { Effect, Scope } from "effect";
3
3
  import type { PluginOptions } from "../options.js";
4
4
  import type { AgentDomain } from "./agent.js";
5
- import type { AIDomain } from "./ai.js";
6
5
  import type { AISDKDomain } from "./aisdk.js";
7
6
  import type { CatalogDomain } from "./catalog.js";
8
7
  import type { CommandDomain } from "./command.js";
@@ -15,7 +14,6 @@ import type { ToolDomain } from "./tool.js";
15
14
  export interface Context {
16
15
  readonly options: PluginOptions;
17
16
  readonly agent: AgentDomain;
18
- readonly ai: AIDomain;
19
17
  readonly aisdk: AISDKDomain;
20
18
  readonly catalog: CatalogDomain;
21
19
  readonly command: CommandDomain;
@@ -1,2 +1,24 @@
1
1
  import type { SessionApi } from "@opencode-ai/client/effect/api";
2
- export type SessionDomain = Pick<SessionApi<unknown>, "create" | "get" | "prompt" | "command" | "interrupt">;
2
+ import type { Message, SystemPart } from "@opencode-ai/ai";
3
+ import type { Agent } from "@opencode-ai/schema/agent";
4
+ import type { Model } from "@opencode-ai/schema/model";
5
+ import type { Session } from "@opencode-ai/schema/session";
6
+ import type { JsonSchema } from "effect";
7
+ import type { Hooks } from "./registration.js";
8
+ export interface SessionContext {
9
+ readonly sessionID: Session.ID;
10
+ readonly agent: Agent.ID;
11
+ readonly model: Model.Ref;
12
+ system: Array<SystemPart>;
13
+ messages: Array<Message>;
14
+ tools: Record<string, {
15
+ description: string;
16
+ input: JsonSchema.JsonSchema;
17
+ }>;
18
+ }
19
+ export interface SessionHooks {
20
+ readonly context: SessionContext;
21
+ }
22
+ export type SessionDomain = Pick<SessionApi<unknown>, "create" | "get" | "prompt" | "command" | "interrupt"> & {
23
+ readonly hook: Hooks<SessionHooks>;
24
+ };
@@ -1,7 +1,6 @@
1
1
  import type { PluginApi } from "@opencode-ai/client/promise/api";
2
2
  import type { PluginOptions } from "../options.js";
3
3
  import type { AgentDomain } from "./agent.js";
4
- import type { AIDomain } from "./ai.js";
5
4
  import type { AISDKDomain } from "./aisdk.js";
6
5
  import type { CatalogDomain } from "./catalog.js";
7
6
  import type { CommandDomain } from "./command.js";
@@ -14,7 +13,6 @@ import type { ToolDomain } from "./tool.js";
14
13
  export interface Context {
15
14
  readonly options: PluginOptions;
16
15
  readonly agent: AgentDomain;
17
- readonly ai: AIDomain;
18
16
  readonly aisdk: AISDKDomain;
19
17
  readonly catalog: CatalogDomain;
20
18
  readonly command: CommandDomain;
@@ -1,2 +1,24 @@
1
1
  import type { SessionApi } from "@opencode-ai/client/promise/api";
2
- export type SessionDomain = Pick<SessionApi, "create" | "get" | "prompt" | "command" | "interrupt">;
2
+ import type { Message, SystemPart } from "@opencode-ai/ai";
3
+ import type { Agent } from "@opencode-ai/schema/agent";
4
+ import type { Model } from "@opencode-ai/schema/model";
5
+ import type { Session } from "@opencode-ai/schema/session";
6
+ import type { JsonSchema } from "effect";
7
+ import type { Hooks } from "./registration.js";
8
+ export interface SessionContext {
9
+ readonly sessionID: Session.ID;
10
+ readonly agent: Agent.ID;
11
+ readonly model: Model.Ref;
12
+ system: Array<SystemPart>;
13
+ messages: Array<Message>;
14
+ tools: Record<string, {
15
+ description: string;
16
+ input: JsonSchema.JsonSchema;
17
+ }>;
18
+ }
19
+ export interface SessionHooks {
20
+ readonly context: SessionContext;
21
+ }
22
+ export type SessionDomain = Pick<SessionApi, "create" | "get" | "prompt" | "command" | "interrupt"> & {
23
+ readonly hook: Hooks<SessionHooks>;
24
+ };
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-15619",
4
+ "version": "0.0.0-next-15623",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -52,10 +52,10 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@ai-sdk/provider": "3.0.8",
55
- "@opencode-ai/ai": "0.0.0-next-15619",
56
- "@opencode-ai/client": "0.0.0-next-15619",
57
- "@opencode-ai/schema": "0.0.0-next-15619",
58
- "@opencode-ai/sdk": "0.0.0-next-15619",
55
+ "@opencode-ai/ai": "0.0.0-next-15623",
56
+ "@opencode-ai/client": "0.0.0-next-15623",
57
+ "@opencode-ai/schema": "0.0.0-next-15623",
58
+ "@opencode-ai/sdk": "0.0.0-next-15623",
59
59
  "effect": "4.0.0-beta.83",
60
60
  "zod": "4.1.8"
61
61
  },
@@ -1,23 +0,0 @@
1
- import type { Message, SystemPart } from "@opencode-ai/ai";
2
- import type { Agent } from "@opencode-ai/schema/agent";
3
- import type { Model } from "@opencode-ai/schema/model";
4
- import type { Session } from "@opencode-ai/schema/session";
5
- import type { JsonSchema } from "effect";
6
- import type { Hooks } from "./registration.js";
7
- export interface AIRequest {
8
- readonly sessionID: Session.ID;
9
- readonly agent: Agent.ID;
10
- readonly model: Model.Ref;
11
- system: Array<SystemPart>;
12
- messages: Array<Message>;
13
- tools: Record<string, {
14
- description: string;
15
- input: JsonSchema.JsonSchema;
16
- }>;
17
- }
18
- export interface AIHooks {
19
- readonly request: AIRequest;
20
- }
21
- export interface AIDomain {
22
- readonly hook: Hooks<AIHooks>;
23
- }
File without changes
@@ -1,23 +0,0 @@
1
- import type { Message, SystemPart } from "@opencode-ai/ai";
2
- import type { Agent } from "@opencode-ai/schema/agent";
3
- import type { Model } from "@opencode-ai/schema/model";
4
- import type { Session } from "@opencode-ai/schema/session";
5
- import type { JsonSchema } from "effect";
6
- import type { Hooks } from "./registration.js";
7
- export interface AIRequest {
8
- readonly sessionID: Session.ID;
9
- readonly agent: Agent.ID;
10
- readonly model: Model.Ref;
11
- system: Array<SystemPart>;
12
- messages: Array<Message>;
13
- tools: Record<string, {
14
- description: string;
15
- input: JsonSchema.JsonSchema;
16
- }>;
17
- }
18
- export interface AIHooks {
19
- readonly request: AIRequest;
20
- }
21
- export interface AIDomain {
22
- readonly hook: Hooks<AIHooks>;
23
- }
File without changes