@opencode-ai/schema 0.0.0-next-15090 → 0.0.0-next-15092

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/agent.d.ts CHANGED
@@ -1,15 +1,18 @@
1
1
  export * as Agent from "./agent.js";
2
2
  import { Schema } from "effect";
3
- export declare const ID: Schema.brand<Schema.String, "AgentV2.ID">;
3
+ export declare const ID: Schema.brand<Schema.String, "Agent.ID">;
4
4
  export type ID = typeof ID.Type;
5
+ export declare const Name: Schema.brand<Schema.String, "Agent.Name">;
6
+ export type Name = typeof Name.Type;
5
7
  export declare const Color: Schema.Union<readonly [Schema.String, Schema.Literals<readonly ["primary", "secondary", "accent", "success", "warning", "error", "info"]>]>;
6
8
  export type Color = typeof Color.Type;
7
9
  export interface Info extends Schema.Schema.Type<typeof Info> {
8
10
  }
9
11
  export declare const Info: Schema.Struct<{
10
- readonly id: Schema.brand<Schema.String, "AgentV2.ID">;
12
+ readonly id: Schema.brand<Schema.String, "Agent.ID">;
13
+ readonly name: Schema.brand<Schema.String, "Agent.Name">;
11
14
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
12
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
15
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
13
16
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
14
17
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
15
18
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -23,9 +26,9 @@ export declare const Info: Schema.Struct<{
23
26
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
24
27
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
25
28
  };
26
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
29
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
27
30
  }>>>, Schema.optionalKey<Schema.Struct<{
28
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
31
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
29
32
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
30
33
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
31
34
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -39,7 +42,7 @@ export declare const Info: Schema.Struct<{
39
42
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
40
43
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
41
44
  };
42
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
45
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
43
46
  }>>, never, never>;
44
47
  readonly request: Schema.Struct<{
45
48
  readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
@@ -59,7 +62,8 @@ export declare const Info: Schema.Struct<{
59
62
  }>>;
60
63
  }> & {
61
64
  empty: (id: ID) => {
62
- readonly id: string & import("effect/Brand").Brand<"AgentV2.ID">;
65
+ readonly id: string & import("effect/Brand").Brand<"Agent.ID">;
66
+ readonly name: string & import("effect/Brand").Brand<"Agent.Name">;
63
67
  readonly request: {
64
68
  readonly settings: {
65
69
  readonly [x: string]: Schema.Json;
@@ -79,9 +83,9 @@ export declare const Info: Schema.Struct<{
79
83
  readonly effect: "allow" | "deny" | "ask";
80
84
  }[];
81
85
  readonly model?: {
82
- readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
86
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
83
87
  readonly providerID: string & import("effect/Brand").Brand<"ProviderV2.ID">;
84
- readonly variant?: (string & import("effect/Brand").Brand<"VariantID">) | undefined;
88
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
85
89
  } | undefined;
86
90
  readonly system?: string | undefined;
87
91
  readonly description?: string | undefined;
package/dist/agent.js CHANGED
@@ -7,13 +7,15 @@ import { Permission } from "./permission.js";
7
7
  import { Provider } from "./provider.js";
8
8
  import { PositiveInt, statics } from "./schema.js";
9
9
  const Updated = ephemeral({ type: "agent.updated", schema: {} });
10
- export const ID = Schema.String.pipe(Schema.brand("AgentV2.ID"));
10
+ export const ID = Schema.String.pipe(Schema.brand("Agent.ID"));
11
+ export const Name = Schema.String.pipe(Schema.brand("Agent.Name"));
11
12
  export const Color = Schema.Union([
12
13
  Schema.String.check(Schema.isPattern(/^#[0-9a-fA-F]{6}$/)),
13
14
  Schema.Literals(["primary", "secondary", "accent", "success", "warning", "error", "info"]),
14
15
  ]).annotate({ identifier: "Agent.Color" });
15
16
  export const Info = Schema.Struct({
16
17
  id: ID,
18
+ name: Name,
17
19
  model: Model.Ref.pipe(optional),
18
20
  request: Provider.Request,
19
21
  system: Schema.String.pipe(optional),
@@ -24,10 +26,11 @@ export const Info = Schema.Struct({
24
26
  steps: PositiveInt.pipe(optional),
25
27
  permissions: Permission.Ruleset,
26
28
  })
27
- .annotate({ identifier: "AgentV2.Info" })
29
+ .annotate({ identifier: "Agent.Info" })
28
30
  .pipe(statics((schema) => ({
29
31
  empty: (id) => schema.make({
30
32
  id,
33
+ name: Name.make(id),
31
34
  request: { settings: {}, headers: {}, body: {} },
32
35
  mode: "all",
33
36
  hidden: false,
package/dist/command.d.ts CHANGED
@@ -6,9 +6,9 @@ export declare const Info: Schema.Struct<{
6
6
  readonly name: Schema.String;
7
7
  readonly template: Schema.String;
8
8
  readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
9
- readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
9
+ readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
10
10
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
11
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
12
12
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
13
13
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
14
14
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -22,9 +22,9 @@ export declare const Info: Schema.Struct<{
22
22
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
23
23
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
24
24
  };
25
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
25
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
26
26
  }>>>, Schema.optionalKey<Schema.Struct<{
27
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
27
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
28
28
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
29
29
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
30
30
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -38,7 +38,7 @@ export declare const Info: Schema.Struct<{
38
38
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
39
39
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
40
40
  };
41
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
41
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
42
42
  }>>, never, never>;
43
43
  readonly subtask: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
44
44
  }>;
package/dist/command.js CHANGED
@@ -3,15 +3,16 @@ import { Schema } from "effect";
3
3
  import { ephemeral, inventory } from "./event.js";
4
4
  import { optional } from "./schema.js";
5
5
  import { Model } from "./model.js";
6
+ import { Agent } from "./agent.js";
6
7
  const Updated = ephemeral({ type: "command.updated", schema: {} });
7
8
  export const Info = Schema.Struct({
8
9
  name: Schema.String,
9
10
  template: Schema.String,
10
11
  description: Schema.String.pipe(optional),
11
- agent: Schema.String.pipe(optional),
12
+ agent: Agent.ID.pipe(optional),
12
13
  model: Model.Ref.pipe(optional),
13
14
  subtask: Schema.Boolean.pipe(optional),
14
- }).annotate({ identifier: "CommandV2.Info" });
15
+ }).annotate({ identifier: "Command.Info" });
15
16
  export const Event = {
16
17
  Updated,
17
18
  Definitions: inventory(Updated),