@opencode/schema 0.0.0-dev-51 → 0.0.0-dev-56

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.
@@ -1555,14 +1555,11 @@ export interface Ref extends Schema.Schema.Type<typeof Ref> {
1555
1555
  export declare const Ref: Schema.Struct<{
1556
1556
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
1557
1557
  readonly name: Schema.String;
1558
- /** Declared in provider configuration, independently of credential connections. */
1559
- readonly configured: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
1560
1558
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
1561
1559
  }>;
1562
1560
  export declare const Info: Schema.Struct<{
1563
1561
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
1564
1562
  readonly name: Schema.String;
1565
- readonly configured: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
1566
1563
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
1567
1564
  readonly methods: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1568
1565
  readonly id: Schema.brand<Schema.String, "Integration.MethodID">;
@@ -47,14 +47,11 @@ export const Event = { Updated, Definitions: inventory(Updated) };
47
47
  export const Ref = Schema.Struct({
48
48
  id: ID,
49
49
  name: Schema.String,
50
- /** Declared in provider configuration, independently of credential connections. */
51
- configured: optional(Schema.Boolean),
52
50
  metadata: optional(Schema.Record(Schema.String, Schema.Any)),
53
51
  }).annotate({ identifier: "Integration.Ref" });
54
52
  export const Info = Schema.Struct({
55
53
  id: ID,
56
54
  name: Schema.String,
57
- configured: optional(Schema.Boolean),
58
55
  metadata: optional(Schema.Record(Schema.String, Schema.Any)),
59
56
  methods: Schema.Array(Method),
60
57
  connections: Schema.Array(Connection.Info),
package/dist/plugin.d.ts CHANGED
@@ -21,8 +21,21 @@ export declare const Features: Schema.Struct<{
21
21
  readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
22
22
  readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
23
23
  readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
24
+ /** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
25
+ readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
24
26
  }>;
25
27
  export type Features = typeof Features.Type;
28
+ /** A plugin's prebuilt CommonJS `./gui-experimental` bundle. */
29
+ export interface GuiBundle extends Schema.Schema.Type<typeof GuiBundle> {
30
+ }
31
+ export declare const GuiBundle: Schema.Struct<{
32
+ /** The bundle's CommonJS code. */
33
+ readonly code: Schema.String;
34
+ /** An opaque value that changes whenever the plugin, its options or its bundle change. */
35
+ readonly revision: Schema.String;
36
+ /** The plugin's options from its `opencode.json` entry, as its server entry receives them. */
37
+ readonly options: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
38
+ }>;
26
39
  export declare const State: Schema.Union<readonly [Schema.Struct<{
27
40
  readonly status: Schema.Literal<"active">;
28
41
  }>, Schema.Struct<{
@@ -53,6 +66,8 @@ export declare const Info: Schema.Struct<{
53
66
  readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
54
67
  readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
55
68
  readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
69
+ /** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
70
+ readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
56
71
  }>;
57
72
  readonly state: Schema.Union<readonly [Schema.Struct<{
58
73
  readonly status: Schema.Literal<"active">;
package/dist/plugin.js CHANGED
@@ -2,7 +2,7 @@ export * as Plugin from "./plugin.js";
2
2
  import { Schema } from "effect";
3
3
  import { ephemeral, inventory } from "./event.js";
4
4
  import { optional } from "./schema.js";
5
- export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"));
5
+ export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"), Schema.annotate({ identifier: "Plugin.ID" }));
6
6
  export const Source = Schema.Union([
7
7
  Schema.Struct({ type: Schema.Literal("builtin") }),
8
8
  Schema.Struct({
@@ -19,7 +19,17 @@ export const Features = Schema.Struct({
19
19
  server: Schema.Literal(true).pipe(optional),
20
20
  tui: Schema.Literal(true).pipe(optional),
21
21
  rpc: Schema.Literal(true).pipe(optional),
22
+ /** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
23
+ gui: Schema.Literal(true).pipe(optional),
22
24
  }).annotate({ identifier: "Plugin.Features" });
25
+ export const GuiBundle = Schema.Struct({
26
+ /** The bundle's CommonJS code. */
27
+ code: Schema.String,
28
+ /** An opaque value that changes whenever the plugin, its options or its bundle change. */
29
+ revision: Schema.String,
30
+ /** The plugin's options from its `opencode.json` entry, as its server entry receives them. */
31
+ options: Schema.Record(Schema.String, Schema.Json),
32
+ }).annotate({ identifier: "Plugin.GuiBundle" });
23
33
  export const State = Schema.Union([
24
34
  Schema.Struct({ status: Schema.Literal("active") }),
25
35
  Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String, ref: Schema.String.pipe(optional) }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "0.0.0-dev-51",
4
+ "version": "0.0.0-dev-56",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {