@opencode/plugin 2.1.3 → 2.1.4

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 { Schema } from "effect";
2
2
  export declare const AssertInput: Schema.Struct<{
3
3
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4
4
  create: () => string & import("effect/Brand").Brand<"SessionID">;
5
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
6
5
  };
7
6
  readonly agent: Schema.optional<Schema.brand<Schema.String, "Agent.ID">>;
8
7
  readonly action: Schema.String;
@@ -156,6 +156,7 @@ export function fromPromise(plugin) {
156
156
  id: plugin.id,
157
157
  effect: (host) => Effect.gen(function* () {
158
158
  const [{ ClientApi }, { OpenCodeEvent }] = yield* Effect.promise(() => Promise.all([import("@opencode/protocol/client"), import("@opencode/protocol/groups/event")]));
159
+ const encodeOpenCodeEvent = Schema.encodeUnknownEffect(OpenCodeEvent);
159
160
  const AgentEndpoints = ClientApi.groups["server.agent"].endpoints;
160
161
  const CommandEndpoints = ClientApi.groups["server.command"].endpoints;
161
162
  const CredentialEndpoints = ClientApi.groups["server.credential"].endpoints;
@@ -226,7 +227,7 @@ export function fromPromise(plugin) {
226
227
  activate: adaptApiMethod(CredentialEndpoints["credential.activate"], host.credential.activate),
227
228
  },
228
229
  event: {
229
- subscribe: (options) => streams(host.event.subscribe().pipe(Stream.mapEffect((event) => Schema.encodeUnknownEffect(OpenCodeEvent)(event)), Stream.map((event) => event)), options),
230
+ subscribe: (options) => streams(host.event.subscribe().pipe(Stream.mapEffect((event) => encodeOpenCodeEvent(event)), Stream.map((event) => event)), options),
230
231
  },
231
232
  experimental: {
232
233
  terminal: {
@@ -1,12 +1,12 @@
1
1
  import type { AgentApi } from "@opencode/client/promise/api";
2
2
  import type { Agent } from "@opencode/schema/agent";
3
+ import type { Types } from "effect";
3
4
  import type { Transform } from "./registration.js";
4
- import type { DeepMutable } from "./types.js";
5
5
  export interface AgentEditor {
6
- list(): readonly DeepMutable<Agent.Info>[];
7
- get(id: string): DeepMutable<Agent.Info> | undefined;
6
+ list(): readonly Types.DeepMutable<Agent.Info>[];
7
+ get(id: string): Types.DeepMutable<Agent.Info> | undefined;
8
8
  default(id: string | undefined): void;
9
- update(id: string, update: (agent: DeepMutable<Agent.Info>) => void): void;
9
+ update(id: string, update: (agent: Types.DeepMutable<Agent.Info>) => void): void;
10
10
  remove(id: string): void;
11
11
  }
12
12
  export interface AgentDomain extends AgentApi {
@@ -1,12 +1,12 @@
1
1
  import type { McpApi } from "@opencode/client/promise/api";
2
2
  import type { Mcp } from "@opencode/schema/mcp";
3
+ import type { Types } from "effect";
3
4
  import type { Transform } from "./registration.js";
4
- import type { DeepMutable } from "./types.js";
5
5
  export interface MCPEditor {
6
- list(): readonly [string, DeepMutable<Mcp.ServerConfig>][];
7
- get(name: string): DeepMutable<Mcp.ServerConfig> | undefined;
6
+ list(): readonly [string, Types.DeepMutable<Mcp.ServerConfig>][];
7
+ get(name: string): Types.DeepMutable<Mcp.ServerConfig> | undefined;
8
8
  set(name: string, config: Mcp.ServerConfig): void;
9
- update(name: string, update: (config: DeepMutable<Mcp.ServerConfig>) => void): void;
9
+ update(name: string, update: (config: Types.DeepMutable<Mcp.ServerConfig>) => void): void;
10
10
  remove(name: string): void;
11
11
  }
12
12
  export interface MCPDomain extends Pick<McpApi, "list"> {
@@ -1,14 +1,14 @@
1
1
  import type { ModelApi } from "@opencode/client/promise/api";
2
2
  import type { Model } from "@opencode/schema/model";
3
+ import type { Types } from "effect";
3
4
  import type { ProviderRecord } from "./provider.js";
4
5
  import type { Transform } from "./registration.js";
5
- import type { DeepMutable } from "./types.js";
6
6
  export interface ModelEditor {
7
7
  /** Candidates from available providers, including models disabled by earlier transforms. */
8
- list(providerID?: string): readonly DeepMutable<Model.Info>[];
9
- get(providerID: string, modelID: string): DeepMutable<Model.Info> | undefined;
8
+ list(providerID?: string): readonly Types.DeepMutable<Model.Info>[];
9
+ get(providerID: string, modelID: string): Types.DeepMutable<Model.Info> | undefined;
10
10
  /** Edits raw model overrides; cannot create an unavailable provider. */
11
- update(providerID: string, modelID: string, update: (model: DeepMutable<Model.Info>) => void): void;
11
+ update(providerID: string, modelID: string, update: (model: Types.DeepMutable<Model.Info>) => void): void;
12
12
  remove(providerID: string, modelID: string): void;
13
13
  readonly default: {
14
14
  get(): {
@@ -2,8 +2,8 @@ import type { ProviderApi } from "@opencode/client/promise/api";
2
2
  import type { Model } from "@opencode/schema/model";
3
3
  import type { Provider } from "@opencode/schema/provider";
4
4
  import type { ConnectionInfo } from "@opencode/client";
5
+ import type { Types } from "effect";
5
6
  import type { Transform } from "./registration.js";
6
- import type { DeepMutable } from "./types.js";
7
7
  /** Provider metadata and immutable source definitions, including inactive providers. */
8
8
  export interface ProviderRecord {
9
9
  readonly provider: Provider.Info;
@@ -19,12 +19,12 @@ export interface ProviderEditor {
19
19
  models: readonly Model.Info[];
20
20
  sourceConnection?: ConnectionInfo;
21
21
  }): void;
22
- update(providerID: string, update: (provider: DeepMutable<Provider.Info>) => void): void;
22
+ update(providerID: string, update: (provider: Types.DeepMutable<Provider.Info>) => void): void;
23
23
  remove(providerID: string): void;
24
24
  readonly models: {
25
25
  set(providerID: string, models: readonly Model.Info[]): void;
26
26
  /** Updates an owned copy of a source definition. */
27
- update(providerID: string, modelID: string, update: (model: DeepMutable<Model.Info>) => void): void;
27
+ update(providerID: string, modelID: string, update: (model: Types.DeepMutable<Model.Info>) => void): void;
28
28
  remove(providerID: string, modelID: string): void;
29
29
  };
30
30
  }
@@ -1,12 +1,12 @@
1
1
  import type { SkillApi } from "@opencode/client/promise/api";
2
2
  import type { Skill } from "@opencode/schema/skill";
3
+ import type { Types } from "effect";
3
4
  import type { Transform } from "./registration.js";
4
- import type { DeepMutable } from "./types.js";
5
5
  export interface SkillEditor {
6
- list(): readonly DeepMutable<Skill.Info>[];
7
- get(id: string): DeepMutable<Skill.Info> | undefined;
6
+ list(): readonly Types.DeepMutable<Skill.Info>[];
7
+ get(id: string): Types.DeepMutable<Skill.Info> | undefined;
8
8
  add(skill: Skill.Info): void;
9
- update(id: string, update: (skill: DeepMutable<Skill.Info>) => void): void;
9
+ update(id: string, update: (skill: Types.DeepMutable<Skill.Info>) => void): void;
10
10
  remove(id: string): void;
11
11
  }
12
12
  export interface SkillDomain extends SkillApi {
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/plugin",
4
- "version": "2.1.3",
4
+ "version": "2.1.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "test": "bun test --only-failures",
9
- "typecheck": "tsc --noEmit",
9
+ "typecheck": "bun check --no-script",
10
+ "typecheck:tsc": "tsc --noEmit",
10
11
  "build": "tsc -p tsconfig.build.json"
11
12
  },
12
13
  "exports": {
@@ -47,17 +48,17 @@
47
48
  ],
48
49
  "dependencies": {
49
50
  "@ai-sdk/provider": "3.0.8",
50
- "@opencode/ai": "2.1.3",
51
- "@opencode/client": "2.1.3",
52
- "@opencode/protocol": "2.1.3",
53
- "@opencode/schema": "2.1.3",
54
- "@opencode/util": "2.1.3",
51
+ "@opencode/ai": "2.1.4",
52
+ "@opencode/client": "2.1.4",
53
+ "@opencode/protocol": "2.1.4",
54
+ "@opencode/schema": "2.1.4",
55
+ "@opencode/util": "2.1.4",
55
56
  "effect": "4.0.1"
56
57
  },
57
58
  "peerDependencies": {
58
- "@opencode/theme": "2.1.3",
59
- "@opentui/core": ">=0.6.6",
60
- "@opentui/solid": ">=0.6.6",
59
+ "@opencode/theme": "2.1.4",
60
+ "@opentui/core": ">=0.6.8",
61
+ "@opentui/solid": ">=0.6.8",
61
62
  "solid-js": ">=1.9.0"
62
63
  },
63
64
  "peerDependenciesMeta": {
@@ -75,15 +76,15 @@
75
76
  }
76
77
  },
77
78
  "devDependencies": {
78
- "@opencode/theme": "2.1.3",
79
- "@opentui/core": "0.6.6",
80
- "@opentui/solid": "0.6.6",
79
+ "@opencode/theme": "2.1.4",
80
+ "@opentui/core": "0.6.8",
81
+ "@opentui/solid": "0.6.8",
81
82
  "@tsconfig/bun": "1.0.9",
82
83
  "@tsconfig/node22": "22.0.2",
83
84
  "@types/bun": "1.4.3",
84
85
  "@types/node": "24.12.2",
85
86
  "solid-js": "1.9.15",
86
87
  "typescript": "npm:@typescript/typescript6@6.0.2",
87
- "@typescript/native": "npm:typescript@7.0.2"
88
+ "@typescript/native": "npm:typescript@7.1.0-beta"
88
89
  }
89
90
  }
@@ -1,3 +0,0 @@
1
- export type DeepMutable<A> = A extends (...args: never[]) => unknown ? A : A extends ReadonlyMap<infer K, infer V> ? Map<DeepMutable<K>, DeepMutable<V>> : A extends ReadonlyArray<infer I> ? DeepMutable<I>[] : A extends object ? {
2
- -readonly [K in keyof A]: DeepMutable<A[K]>;
3
- } : A;
File without changes