@opencode-ai/plugin 0.0.0-next-16229 → 0.0.0-next-16231

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.
@@ -8,3 +8,4 @@ export { Model } from "@opencode-ai/schema/model";
8
8
  export { Provider } from "@opencode-ai/schema/provider";
9
9
  export { Reference } from "@opencode-ai/schema/reference";
10
10
  export { Skill } from "@opencode-ai/schema/skill";
11
+ export { WebSearch } from "@opencode-ai/schema/websearch";
@@ -8,3 +8,4 @@ export { Model } from "@opencode-ai/schema/model";
8
8
  export { Provider } from "@opencode-ai/schema/provider";
9
9
  export { Reference } from "@opencode-ai/schema/reference";
10
10
  export { Skill } from "@opencode-ai/schema/skill";
11
+ export { WebSearch } from "@opencode-ai/schema/websearch";
@@ -12,6 +12,7 @@ import type { ReferenceDomain } from "./reference.js";
12
12
  import type { SessionDomain } from "./session.js";
13
13
  import type { SkillDomain } from "./skill.js";
14
14
  import type { ToolDomain } from "./tool.js";
15
+ import type { WebSearchDomain } from "./websearch.js";
15
16
  export interface Context {
16
17
  readonly app: App;
17
18
  readonly options: PluginOptions;
@@ -26,6 +27,7 @@ export interface Context {
26
27
  readonly session: SessionDomain;
27
28
  readonly skill: SkillDomain;
28
29
  readonly tool: ToolDomain;
30
+ readonly websearch: WebSearchDomain;
29
31
  }
30
32
  export interface Plugin<R = Scope.Scope> {
31
33
  readonly id: string;
@@ -0,0 +1,20 @@
1
+ import type { WebSearch } from "@opencode-ai/schema/websearch";
2
+ import type { WebsearchApi } from "@opencode-ai/client/effect/api";
3
+ import type { Effect } from "effect";
4
+ import type { Transform } from "./registration.js";
5
+ export interface WebSearchDefinition {
6
+ readonly id: string;
7
+ readonly name: string;
8
+ readonly execute: (input: WebSearch.ProviderInput) => Effect.Effect<readonly WebSearch.Result[], unknown>;
9
+ }
10
+ export interface WebSearchDomain extends WebsearchApi<unknown> {
11
+ readonly transform: Transform<WebSearchDraft>;
12
+ readonly reload: () => Effect.Effect<void>;
13
+ }
14
+ export interface WebSearchDraft {
15
+ add(definition: WebSearchDefinition): void;
16
+ readonly default: {
17
+ get(): string | undefined;
18
+ set(providerID: string): void;
19
+ };
20
+ }
File without changes
@@ -9,3 +9,4 @@ export { Model } from "@opencode-ai/schema/model";
9
9
  export { Provider } from "@opencode-ai/schema/provider";
10
10
  export { Reference } from "@opencode-ai/schema/reference";
11
11
  export { Skill } from "@opencode-ai/schema/skill";
12
+ export { WebSearch } from "@opencode-ai/schema/websearch";
@@ -8,3 +8,4 @@ export { Model } from "@opencode-ai/schema/model";
8
8
  export { Provider } from "@opencode-ai/schema/provider";
9
9
  export { Reference } from "@opencode-ai/schema/reference";
10
10
  export { Skill } from "@opencode-ai/schema/skill";
11
+ export { WebSearch } from "@opencode-ai/schema/websearch";
@@ -1,8 +1,19 @@
1
1
  import type { IntegrationApi } from "@opencode-ai/client/promise/api";
2
2
  import type { IntegrationDraft, IntegrationMethodRegistration } from "../effect/integration.js";
3
- import type { CredentialValue } from "@opencode-ai/sdk/v2/types";
3
+ import type { CredentialOAuth, CredentialValue } from "@opencode-ai/sdk/v2/types";
4
4
  import type { Transform } from "./registration.js";
5
5
  export type { IntegrationDraft, IntegrationMethodRegistration };
6
+ export type IntegrationOAuthAuthorization = {
7
+ readonly url: string;
8
+ readonly instructions: string;
9
+ readonly expiresAt?: number;
10
+ } & ({
11
+ readonly mode: "auto";
12
+ readonly callback: Promise<CredentialOAuth>;
13
+ } | {
14
+ readonly mode: "code";
15
+ readonly callback: (code: string) => Promise<CredentialOAuth>;
16
+ });
6
17
  export interface IntegrationDomain extends Omit<IntegrationApi, "wellknown"> {
7
18
  readonly transform: Transform<IntegrationDraft>;
8
19
  readonly reload: () => Promise<void>;
@@ -11,6 +11,7 @@ import type { ReferenceDomain } from "./reference.js";
11
11
  import type { SessionDomain } from "./session.js";
12
12
  import type { SkillDomain } from "./skill.js";
13
13
  import type { ToolDomain } from "./tool.js";
14
+ import type { WebSearchDomain } from "./websearch.js";
14
15
  export interface Context {
15
16
  readonly app: App;
16
17
  readonly options: PluginOptions;
@@ -25,6 +26,7 @@ export interface Context {
25
26
  readonly session: SessionDomain;
26
27
  readonly skill: SkillDomain;
27
28
  readonly tool: ToolDomain;
29
+ readonly websearch: WebSearchDomain;
28
30
  }
29
31
  export type Cleanup = () => Promise<void> | void;
30
32
  export interface Plugin {
@@ -0,0 +1,21 @@
1
+ import type { WebSearch } from "@opencode-ai/schema/websearch";
2
+ import type { WebSearchApi } from "@opencode-ai/client/promise/api";
3
+ import type { Transform } from "./registration.js";
4
+ export interface WebSearchDefinition {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly execute: (input: WebSearch.ProviderInput, context: {
8
+ readonly signal: AbortSignal;
9
+ }) => Promise<readonly WebSearch.Result[]>;
10
+ }
11
+ export interface WebSearchDomain extends WebSearchApi {
12
+ readonly transform: Transform<WebSearchDraft>;
13
+ readonly reload: () => Promise<void>;
14
+ }
15
+ export interface WebSearchDraft {
16
+ add(definition: WebSearchDefinition): void;
17
+ readonly default: {
18
+ get(): string | undefined;
19
+ set(providerID: string): void;
20
+ };
21
+ }
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-16229",
4
+ "version": "0.0.0-next-16231",
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-16229",
56
- "@opencode-ai/client": "0.0.0-next-16229",
57
- "@opencode-ai/schema": "0.0.0-next-16229",
58
- "@opencode-ai/sdk": "0.0.0-next-16229",
55
+ "@opencode-ai/ai": "0.0.0-next-16231",
56
+ "@opencode-ai/client": "0.0.0-next-16231",
57
+ "@opencode-ai/schema": "0.0.0-next-16231",
58
+ "@opencode-ai/sdk": "0.0.0-next-16231",
59
59
  "@standard-schema/spec": "^1.1.0",
60
60
  "effect": "4.0.0-beta.98",
61
61
  "zod": "4.1.8"