@opencode-ai/schema 0.0.0-next-16909 → 0.0.0-next-16926

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.
Files changed (40) hide show
  1. package/dist/config/agent.d.ts +42 -0
  2. package/dist/config/agent.js +20 -0
  3. package/dist/config/command.d.ts +27 -0
  4. package/dist/config/command.js +12 -0
  5. package/dist/config/compaction.d.ts +14 -0
  6. package/dist/config/compaction.js +13 -0
  7. package/dist/config/experimental.d.ts +16 -0
  8. package/dist/config/experimental.js +13 -0
  9. package/dist/config/formatter.d.ts +11 -0
  10. package/dist/config/formatter.js +11 -0
  11. package/dist/config/lsp.d.ts +20 -0
  12. package/dist/config/lsp.js +16 -0
  13. package/dist/config/mcp.d.ts +18 -0
  14. package/dist/config/mcp.js +14 -0
  15. package/dist/config/media.d.ts +15 -0
  16. package/dist/config/media.js +14 -0
  17. package/dist/config/model.d.ts +18 -0
  18. package/dist/config/model.js +28 -0
  19. package/dist/config/plugin.d.ts +11 -0
  20. package/dist/config/plugin.js +10 -0
  21. package/dist/config/policy.d.ts +10 -0
  22. package/dist/config/policy.js +8 -0
  23. package/dist/config/provider.d.ts +102 -0
  24. package/dist/config/provider.js +62 -0
  25. package/dist/config/reference.d.ts +21 -0
  26. package/dist/config/reference.js +18 -0
  27. package/dist/config/tool-output.d.ts +8 -0
  28. package/dist/config/tool-output.js +8 -0
  29. package/dist/config/warming.d.ts +10 -0
  30. package/dist/config/warming.js +16 -0
  31. package/dist/config/watcher.d.ts +7 -0
  32. package/dist/config/watcher.js +7 -0
  33. package/dist/config/websearch.d.ts +7 -0
  34. package/dist/config/websearch.js +7 -0
  35. package/dist/config.d.ts +142 -30
  36. package/dist/config.js +134 -0
  37. package/dist/mcp.d.ts +18 -24
  38. package/dist/mcp.js +19 -23
  39. package/dist/prompt.d.ts +11 -11
  40. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ export * as ConfigToolOutput from "./tool-output.js";
2
+ import { Schema } from "effect";
3
+ import { optional, PositiveInt } from "../schema.js";
4
+ export class Info extends Schema.Class("Config.ToolOutput")({
5
+ max_lines: PositiveInt.pipe(optional),
6
+ max_bytes: PositiveInt.pipe(optional),
7
+ }) {
8
+ }
@@ -0,0 +1,10 @@
1
+ export * as ConfigWarming from "./warming.js";
2
+ import { Schema } from "effect";
3
+ declare const Info_base: Schema.Class<Info, Schema.Struct<{
4
+ readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5
+ readonly interval: Schema.decodeTo<Schema.optional<Schema.toType<Schema.DurationFromString>>, Schema.optionalKey<Schema.DurationFromString>, never, never>;
6
+ readonly duration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.DurationFromString>>, Schema.optionalKey<Schema.DurationFromString>, never, never>;
7
+ }>, {}>;
8
+ export declare class Info extends Info_base {
9
+ }
10
+ export declare const Warming: Schema.Union<readonly [Schema.Boolean, typeof Info]>;
@@ -0,0 +1,16 @@
1
+ export * as ConfigWarming from "./warming.js";
2
+ import { Schema } from "effect";
3
+ import { optional } from "../schema.js";
4
+ export class Info extends Schema.Class("Config.Warming")({
5
+ prompt: Schema.String.pipe(optional).annotate({
6
+ description: "Prompt sent for keep-alive requests",
7
+ }),
8
+ interval: Schema.DurationFromString.pipe(optional).annotate({
9
+ description: 'Idle time between keep-alive requests (default: "4 minutes")',
10
+ }),
11
+ duration: Schema.DurationFromString.pipe(optional).annotate({
12
+ description: 'Time after the last active request to keep a session warm (default: "30 minutes")',
13
+ }),
14
+ }) {
15
+ }
16
+ export const Warming = Schema.Union([Schema.Boolean, Info]);
@@ -0,0 +1,7 @@
1
+ export * as ConfigWatcher from "./watcher.js";
2
+ import { Schema } from "effect";
3
+ declare const Info_base: Schema.Class<Info, Schema.Struct<{
4
+ readonly ignore: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
5
+ }>, {}>;
6
+ export declare class Info extends Info_base {
7
+ }
@@ -0,0 +1,7 @@
1
+ export * as ConfigWatcher from "./watcher.js";
2
+ import { Schema } from "effect";
3
+ import { optional } from "../schema.js";
4
+ export class Info extends Schema.Class("Config.Watcher")({
5
+ ignore: Schema.String.pipe(Schema.Array, optional),
6
+ }) {
7
+ }
@@ -0,0 +1,7 @@
1
+ export * as ConfigWebSearch from "./websearch.js";
2
+ import { Schema } from "effect";
3
+ declare const Info_base: Schema.Class<Info, Schema.Struct<{
4
+ readonly provider: Schema.brand<Schema.String, "WebSearch.ID">;
5
+ }>, {}>;
6
+ export declare class Info extends Info_base {
7
+ }
@@ -0,0 +1,7 @@
1
+ export * as ConfigWebSearch from "./websearch.js";
2
+ import { Schema } from "effect";
3
+ import { WebSearch } from "../websearch.js";
4
+ export class Info extends Schema.Class("ConfigWebSearch.Info")({
5
+ provider: WebSearch.ID,
6
+ }) {
7
+ }
package/dist/config.d.ts CHANGED
@@ -1,69 +1,181 @@
1
1
  export * as Config from "./config.js";
2
+ import { Schema } from "effect";
3
+ import { ConfigAgent } from "./config/agent.js";
4
+ import { ConfigMedia } from "./config/media.js";
5
+ import { ConfigCompaction } from "./config/compaction.js";
6
+ import { ConfigCommand } from "./config/command.js";
7
+ import { ConfigExperimental } from "./config/experimental.js";
8
+ import { ConfigFormatter } from "./config/formatter.js";
9
+ import { ConfigLSP } from "./config/lsp.js";
10
+ import { ConfigMCP } from "./config/mcp.js";
11
+ import { ConfigPlugin } from "./config/plugin.js";
12
+ import { ConfigProvider } from "./config/provider.js";
13
+ import { ConfigReference } from "./config/reference.js";
14
+ import { ConfigWebSearch } from "./config/websearch.js";
15
+ import { ConfigToolOutput } from "./config/tool-output.js";
16
+ import { ConfigWatcher } from "./config/watcher.js";
17
+ import { ConfigWarming } from "./config/warming.js";
18
+ declare const Info_base: Schema.Class<Info, Schema.Struct<{
19
+ readonly $schema: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
20
+ readonly shell: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
21
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
22
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
23
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
24
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
25
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
26
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
27
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
28
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
29
+ }>]>, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
30
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
31
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
32
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
33
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
34
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
35
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
36
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
37
+ }>]>, never, never>>, never, never>;
38
+ readonly default_agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
39
+ readonly autoupdate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Literal<"notify">]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Literal<"notify">]>>, never, never>;
40
+ readonly share: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["manual", "auto", "disabled"]>>>, Schema.optionalKey<Schema.Literals<readonly ["manual", "auto", "disabled"]>>, never, never>;
41
+ readonly enterprise: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
42
+ readonly url: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
43
+ }>>>, Schema.optionalKey<Schema.Struct<{
44
+ readonly url: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
45
+ }>>, never, never>;
46
+ readonly username: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
47
+ readonly permissions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
48
+ readonly action: Schema.String;
49
+ readonly resource: Schema.String;
50
+ readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
51
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
52
+ readonly action: Schema.String;
53
+ readonly resource: Schema.String;
54
+ readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
55
+ }>>>, never, never>;
56
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof ConfigAgent.Info>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof ConfigAgent.Info>>, never, never>;
57
+ readonly snapshots: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
58
+ readonly watcher: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigWatcher.Info>>, Schema.optionalKey<typeof ConfigWatcher.Info>, never, never>;
59
+ readonly formatter: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.$Record<Schema.String, typeof ConfigFormatter.Entry>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.$Record<Schema.String, typeof ConfigFormatter.Entry>]>>, never, never>;
60
+ readonly lsp: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
61
+ readonly disabled: Schema.Literal<true>;
62
+ }>, typeof ConfigLSP.Server]>>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
63
+ readonly disabled: Schema.Literal<true>;
64
+ }>, typeof ConfigLSP.Server]>>]>>, never, never>;
65
+ readonly media: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigMedia.Info>>, Schema.optionalKey<typeof ConfigMedia.Info>, never, never>;
66
+ readonly tool_output: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigToolOutput.Info>>, Schema.optionalKey<typeof ConfigToolOutput.Info>, never, never>;
67
+ readonly mcp: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigMCP.Info>>, Schema.optionalKey<typeof ConfigMCP.Info>, never, never>;
68
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigCompaction.Info>>, Schema.optionalKey<typeof ConfigCompaction.Info>, never, never>;
69
+ readonly skills: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
70
+ readonly commands: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof ConfigCommand.Info>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof ConfigCommand.Info>>, never, never>;
71
+ readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
72
+ readonly references: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, typeof ConfigReference.Git, typeof ConfigReference.Local]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, typeof ConfigReference.Git, typeof ConfigReference.Local]>>>, never, never>;
73
+ readonly websearch: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigWebSearch.Info>>, Schema.optionalKey<typeof ConfigWebSearch.Info>, never, never>;
74
+ readonly plugins: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Union<readonly [Schema.String, typeof ConfigPlugin.Entry]>>>>, Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.String, typeof ConfigPlugin.Entry]>>>, never, never>;
75
+ readonly warming: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, typeof ConfigWarming.Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, typeof ConfigWarming.Info]>>, never, never>;
76
+ readonly providers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof ConfigProvider.Info>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof ConfigProvider.Info>>, never, never>;
77
+ readonly experimental: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigExperimental.Info>>, Schema.optionalKey<typeof ConfigExperimental.Info>, never, never>;
78
+ }>, {}>;
79
+ export declare class Info extends Info_base {
80
+ }
81
+ declare const Document_base: Schema.Class<Document, Schema.Struct<{
82
+ readonly type: Schema.Literal<"document">;
83
+ readonly path: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
84
+ readonly info: typeof Info;
85
+ }>, {}>;
86
+ export declare class Document extends Document_base {
87
+ }
88
+ declare const Directory_base: Schema.Class<Directory, Schema.Struct<{
89
+ readonly type: Schema.Literal<"directory">;
90
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
91
+ }>, {}>;
92
+ export declare class Directory extends Directory_base {
93
+ }
94
+ declare const File_base: Schema.Class<File, Schema.Struct<{
95
+ readonly type: Schema.Literal<"file">;
96
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
97
+ }>, {}>;
98
+ export declare class File extends File_base {
99
+ }
100
+ declare const AgentsDirectory_base: Schema.Class<AgentsDirectory, Schema.Struct<{
101
+ readonly type: Schema.Literal<"agents">;
102
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
103
+ }>, {}>;
104
+ export declare class AgentsDirectory extends AgentsDirectory_base {
105
+ }
106
+ declare const ClaudeDirectory_base: Schema.Class<ClaudeDirectory, Schema.Struct<{
107
+ readonly type: Schema.Literal<"claude">;
108
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
109
+ }>, {}>;
110
+ export declare class ClaudeDirectory extends ClaudeDirectory_base {
111
+ }
112
+ export declare const Entry: Schema.Union<readonly [typeof Document, typeof Directory, typeof File, typeof AgentsDirectory, typeof ClaudeDirectory]>;
113
+ export type Entry = typeof Entry.Type;
2
114
  export declare const Event: {
3
- Updated: import("effect/Schema").Struct<{
4
- readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
115
+ Updated: Schema.Struct<{
116
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5
117
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
6
118
  };
7
- readonly created: import("effect/Schema").decodeTo<import("effect/Schema").DateTimeUtc, import("effect/Schema").Finite, never, never>;
8
- readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
9
- readonly type: import("effect/Schema").Literal<"config.updated">;
10
- readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
11
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
12
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
119
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
120
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
121
+ readonly type: Schema.Literal<"config.updated">;
122
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
123
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
124
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
13
125
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14
126
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
15
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
127
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
16
128
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
17
129
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
18
130
  }>, never, never>;
19
- }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
20
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
21
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
131
+ }>>>, Schema.optionalKey<Schema.Struct<{
132
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
133
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
22
134
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
23
135
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
24
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
136
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
25
137
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
26
138
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
27
139
  }>, never, never>;
28
140
  }>>, never, never>;
29
- readonly data: import("effect/Schema").Struct<{}>;
141
+ readonly data: Schema.Struct<{}>;
30
142
  }> & {
31
143
  type: "config.updated";
32
144
  durability: "ephemeral";
33
145
  durable: undefined;
34
- data: import("effect/Schema").Struct<{}>;
146
+ data: Schema.Struct<{}>;
35
147
  };
36
- Definitions: readonly [import("effect/Schema").Struct<{
37
- readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
148
+ Definitions: readonly [Schema.Struct<{
149
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
38
150
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
39
151
  };
40
- readonly created: import("effect/Schema").decodeTo<import("effect/Schema").DateTimeUtc, import("effect/Schema").Finite, never, never>;
41
- readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
42
- readonly type: import("effect/Schema").Literal<"config.updated">;
43
- readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
44
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
45
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
152
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
153
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
154
+ readonly type: Schema.Literal<"config.updated">;
155
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
156
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
157
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
46
158
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
47
159
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
48
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
160
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
49
161
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
50
162
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
51
163
  }>, never, never>;
52
- }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
53
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
54
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
164
+ }>>>, Schema.optionalKey<Schema.Struct<{
165
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
166
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
55
167
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
56
168
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
57
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
169
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
58
170
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
59
171
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
60
172
  }>, never, never>;
61
173
  }>>, never, never>;
62
- readonly data: import("effect/Schema").Struct<{}>;
174
+ readonly data: Schema.Struct<{}>;
63
175
  }> & {
64
176
  type: "config.updated";
65
177
  durability: "ephemeral";
66
178
  durable: undefined;
67
- data: import("effect/Schema").Struct<{}>;
179
+ data: Schema.Struct<{}>;
68
180
  }];
69
181
  };
package/dist/config.js CHANGED
@@ -1,5 +1,139 @@
1
1
  export * as Config from "./config.js";
2
+ import { Schema } from "effect";
2
3
  import { ephemeral, inventory } from "./event.js";
4
+ import { Permission } from "./permission.js";
5
+ import { AbsolutePath, optional } from "./schema.js";
6
+ import { ConfigAgent } from "./config/agent.js";
7
+ import { ConfigMedia } from "./config/media.js";
8
+ import { ConfigCompaction } from "./config/compaction.js";
9
+ import { ConfigCommand } from "./config/command.js";
10
+ import { ConfigExperimental } from "./config/experimental.js";
11
+ import { ConfigFormatter } from "./config/formatter.js";
12
+ import { ConfigLSP } from "./config/lsp.js";
13
+ import { ConfigMCP } from "./config/mcp.js";
14
+ import { ConfigModel } from "./config/model.js";
15
+ import { ConfigPlugin } from "./config/plugin.js";
16
+ import { ConfigProvider } from "./config/provider.js";
17
+ import { ConfigReference } from "./config/reference.js";
18
+ import { ConfigWebSearch } from "./config/websearch.js";
19
+ import { ConfigToolOutput } from "./config/tool-output.js";
20
+ import { ConfigWatcher } from "./config/watcher.js";
21
+ import { ConfigWarming } from "./config/warming.js";
22
+ export class Info extends Schema.Class("Config.Info")({
23
+ $schema: optional(Schema.String).annotate({
24
+ description: "JSON schema reference for configuration validation",
25
+ }),
26
+ shell: Schema.String.pipe(optional).annotate({
27
+ description: "Default shell to use for terminal and shell tool execution",
28
+ }),
29
+ model: ConfigModel.Selection.pipe(optional).annotate({
30
+ description: "Default model to use when no session or agent model is selected",
31
+ }),
32
+ default_agent: Schema.String.pipe(optional).annotate({
33
+ description: "Default primary agent to use when no session agent is selected",
34
+ }),
35
+ autoupdate: Schema.Union([Schema.Boolean, Schema.Literal("notify")])
36
+ .pipe(optional)
37
+ .annotate({
38
+ description: "Automatically update or notify when a new version is available",
39
+ }),
40
+ share: Schema.Literals(["manual", "auto", "disabled"]).pipe(optional).annotate({
41
+ description: "Control whether sessions may be shared manually, automatically, or not at all",
42
+ }),
43
+ enterprise: Schema.Struct({
44
+ url: Schema.String.pipe(optional),
45
+ })
46
+ .pipe(optional)
47
+ .annotate({
48
+ description: "Enterprise sharing service configuration",
49
+ }),
50
+ username: Schema.String.pipe(optional).annotate({
51
+ description: "Username displayed in conversations and used for telemetry identity",
52
+ }),
53
+ permissions: Permission.Ruleset.pipe(optional).annotate({
54
+ description: "Ordered tool permission rules applied to agent tool use",
55
+ }),
56
+ agents: Schema.Record(Schema.String, ConfigAgent.Info).pipe(optional).annotate({
57
+ description: "Named built-in agent overrides and custom agent definitions",
58
+ }),
59
+ snapshots: Schema.Boolean.pipe(optional).annotate({
60
+ description: "Enable snapshots used for undo and revert behavior",
61
+ }),
62
+ watcher: ConfigWatcher.Info.pipe(optional).annotate({
63
+ description: "Filesystem watcher configuration",
64
+ }),
65
+ formatter: ConfigFormatter.Info.pipe(optional).annotate({
66
+ description: "Enable built-in formatters or configure formatter overrides",
67
+ }),
68
+ lsp: ConfigLSP.Info.pipe(optional).annotate({
69
+ description: "Enable built-in language servers or configure server overrides",
70
+ }),
71
+ media: ConfigMedia.Info.pipe(optional).annotate({
72
+ description: "Media processing configuration",
73
+ }),
74
+ tool_output: ConfigToolOutput.Info.pipe(optional).annotate({
75
+ description: "Tool output truncation thresholds",
76
+ }),
77
+ mcp: ConfigMCP.Info.pipe(optional).annotate({
78
+ description: "MCP server configuration",
79
+ }),
80
+ compaction: ConfigCompaction.Info.pipe(optional).annotate({
81
+ description: "Conversation compaction behavior",
82
+ }),
83
+ skills: Schema.String.pipe(Schema.Array, optional).annotate({
84
+ description: "Additional paths or URLs to discover skills from",
85
+ }),
86
+ commands: Schema.Record(Schema.String, ConfigCommand.Info).pipe(optional).annotate({
87
+ description: "Named slash command definitions",
88
+ }),
89
+ instructions: Schema.String.pipe(Schema.Array, optional).annotate({
90
+ description: "Additional paths or URLs supplying ambient instructions",
91
+ }),
92
+ references: ConfigReference.Info.pipe(optional).annotate({
93
+ description: "Named local directories or Git repositories available as external context",
94
+ }),
95
+ websearch: ConfigWebSearch.Info.pipe(optional).annotate({
96
+ description: "Web search provider selection",
97
+ }),
98
+ plugins: ConfigPlugin.Plugins.pipe(optional).annotate({
99
+ description: "Ordered plugin enablement directives and external package declarations",
100
+ }),
101
+ warming: ConfigWarming.Warming.pipe(optional).annotate({
102
+ description: "Keep recently active sessions warm with transient model requests (default: false)",
103
+ }),
104
+ providers: Schema.Record(Schema.String, ConfigProvider.Info).pipe(optional),
105
+ experimental: ConfigExperimental.Info.pipe(optional),
106
+ }) {
107
+ }
108
+ export class Document extends Schema.Class("Config.Document")({
109
+ type: Schema.Literal("document"),
110
+ path: Schema.String.pipe(optional),
111
+ info: Info,
112
+ }) {
113
+ }
114
+ export class Directory extends Schema.Class("Config.Directory")({
115
+ type: Schema.Literal("directory"),
116
+ path: AbsolutePath,
117
+ }) {
118
+ }
119
+ export class File extends Schema.Class("Config.File")({
120
+ type: Schema.Literal("file"),
121
+ path: AbsolutePath,
122
+ }) {
123
+ }
124
+ export class AgentsDirectory extends Schema.Class("Config.AgentsDirectory")({
125
+ type: Schema.Literal("agents"),
126
+ path: AbsolutePath,
127
+ }) {
128
+ }
129
+ export class ClaudeDirectory extends Schema.Class("Config.ClaudeDirectory")({
130
+ type: Schema.Literal("claude"),
131
+ path: AbsolutePath,
132
+ }) {
133
+ }
134
+ export const Entry = Schema.Union([Document, Directory, File, AgentsDirectory, ClaudeDirectory]).annotate({
135
+ identifier: "Config.Entry",
136
+ });
3
137
  const Updated = ephemeral({
4
138
  type: "config.updated",
5
139
  schema: {},
package/dist/mcp.d.ts CHANGED
@@ -1,40 +1,40 @@
1
1
  export * as Mcp from "./mcp.js";
2
2
  import { Schema } from "effect";
3
3
  declare const TimeoutConfig_base: Schema.Class<TimeoutConfig, Schema.Struct<{
4
- readonly startup: Schema.optional<Schema.Int>;
5
- readonly catalog: Schema.optional<Schema.Int>;
6
- readonly execution: Schema.optional<Schema.Int>;
4
+ readonly startup: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
5
+ readonly catalog: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
6
+ readonly execution: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
7
7
  }>, {}>;
8
8
  export declare class TimeoutConfig extends TimeoutConfig_base {
9
9
  }
10
10
  declare const LocalConfig_base: Schema.Class<LocalConfig, Schema.Struct<{
11
11
  readonly type: Schema.Literal<"local">;
12
12
  readonly command: Schema.$Array<Schema.String>;
13
- readonly cwd: Schema.optional<Schema.String>;
14
- readonly environment: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
15
- readonly disabled: Schema.optional<Schema.Boolean>;
16
- readonly codemode: Schema.optional<Schema.Boolean>;
17
- readonly timeout: Schema.optional<typeof TimeoutConfig>;
13
+ readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
14
+ readonly environment: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
15
+ readonly disabled: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
16
+ readonly codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
17
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<typeof TimeoutConfig>>, Schema.optionalKey<typeof TimeoutConfig>, never, never>;
18
18
  }>, {}>;
19
19
  export declare class LocalConfig extends LocalConfig_base {
20
20
  }
21
21
  declare const OAuthConfig_base: Schema.Class<OAuthConfig, Schema.Struct<{
22
- readonly client_id: Schema.optional<Schema.String>;
23
- readonly client_secret: Schema.optional<Schema.String>;
24
- readonly scope: Schema.optional<Schema.String>;
25
- readonly callback_port: Schema.optional<Schema.Int>;
26
- readonly redirect_uri: Schema.optional<Schema.String>;
22
+ readonly client_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
23
+ readonly client_secret: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
24
+ readonly scope: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
25
+ readonly callback_port: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
26
+ readonly redirect_uri: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
27
27
  }>, {}>;
28
28
  export declare class OAuthConfig extends OAuthConfig_base {
29
29
  }
30
30
  declare const RemoteConfig_base: Schema.Class<RemoteConfig, Schema.Struct<{
31
31
  readonly type: Schema.Literal<"remote">;
32
32
  readonly url: Schema.String;
33
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
34
- readonly oauth: Schema.optional<Schema.Union<readonly [typeof OAuthConfig, Schema.Literal<false>]>>;
35
- readonly disabled: Schema.optional<Schema.Boolean>;
36
- readonly codemode: Schema.optional<Schema.Boolean>;
37
- readonly timeout: Schema.optional<typeof TimeoutConfig>;
33
+ readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
34
+ readonly oauth: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [typeof OAuthConfig, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [typeof OAuthConfig, Schema.Literal<false>]>>, never, never>;
35
+ readonly disabled: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
36
+ readonly codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
37
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<typeof TimeoutConfig>>, Schema.optionalKey<typeof TimeoutConfig>, never, never>;
38
38
  }>, {}>;
39
39
  export declare class RemoteConfig extends RemoteConfig_base {
40
40
  }
@@ -52,9 +52,6 @@ export declare const Status: Schema.toTaggedUnion<"status", readonly [Schema.Str
52
52
  readonly error: Schema.String;
53
53
  }>, Schema.Struct<{
54
54
  readonly status: Schema.Literal<"needs_auth">;
55
- }>, Schema.Struct<{
56
- readonly status: Schema.Literal<"needs_client_registration">;
57
- readonly error: Schema.String;
58
55
  }>]>;
59
56
  export interface Server extends Schema.Schema.Type<typeof Server> {
60
57
  }
@@ -71,9 +68,6 @@ export declare const Server: Schema.Struct<{
71
68
  readonly error: Schema.String;
72
69
  }>, Schema.Struct<{
73
70
  readonly status: Schema.Literal<"needs_auth">;
74
- }>, Schema.Struct<{
75
- readonly status: Schema.Literal<"needs_client_registration">;
76
- readonly error: Schema.String;
77
71
  }>]>;
78
72
  readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
79
73
  }>;
package/dist/mcp.js CHANGED
@@ -3,13 +3,13 @@ import { Schema } from "effect";
3
3
  import { optional, PositiveInt } from "./schema.js";
4
4
  import { IntegrationID } from "./integration-id.js";
5
5
  export class TimeoutConfig extends Schema.Class("Mcp.TimeoutConfig")({
6
- startup: PositiveInt.pipe(Schema.optional).annotate({
6
+ startup: PositiveInt.pipe(optional).annotate({
7
7
  description: "Maximum time in milliseconds to establish and initialize the MCP server.",
8
8
  }),
9
- catalog: PositiveInt.pipe(Schema.optional).annotate({
9
+ catalog: PositiveInt.pipe(optional).annotate({
10
10
  description: "Maximum time in milliseconds to wait for MCP discovery requests such as tools/list and prompts/list.",
11
11
  }),
12
- execution: PositiveInt.pipe(Schema.optional).annotate({
12
+ execution: PositiveInt.pipe(optional).annotate({
13
13
  description: "Maximum time in milliseconds to wait for MCP tool and prompt execution.",
14
14
  }),
15
15
  }) {
@@ -17,35 +17,35 @@ export class TimeoutConfig extends Schema.Class("Mcp.TimeoutConfig")({
17
17
  export class LocalConfig extends Schema.Class("Mcp.LocalConfig")({
18
18
  type: Schema.Literal("local"),
19
19
  command: Schema.String.pipe(Schema.Array),
20
- cwd: Schema.String.pipe(Schema.optional).annotate({
20
+ cwd: Schema.String.pipe(optional).annotate({
21
21
  description: "Working directory for the MCP server process. Relative paths resolve from the workspace directory.",
22
22
  }),
23
- environment: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional),
24
- disabled: Schema.Boolean.pipe(Schema.optional),
25
- codemode: Schema.Boolean.pipe(Schema.optional).annotate({
23
+ environment: Schema.Record(Schema.String, Schema.String).pipe(optional),
24
+ disabled: Schema.Boolean.pipe(optional),
25
+ codemode: Schema.Boolean.pipe(optional).annotate({
26
26
  description: "Expose this server's tools through Code Mode. Defaults to true.",
27
27
  }),
28
- timeout: TimeoutConfig.pipe(Schema.optional),
28
+ timeout: TimeoutConfig.pipe(optional),
29
29
  }) {
30
30
  }
31
31
  export class OAuthConfig extends Schema.Class("Mcp.OAuthConfig")({
32
- client_id: Schema.String.pipe(Schema.optional),
33
- client_secret: Schema.String.pipe(Schema.optional),
34
- scope: Schema.String.pipe(Schema.optional),
35
- callback_port: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65535 })).pipe(Schema.optional),
36
- redirect_uri: Schema.String.pipe(Schema.optional),
32
+ client_id: Schema.String.pipe(optional),
33
+ client_secret: Schema.String.pipe(optional),
34
+ scope: Schema.String.pipe(optional),
35
+ callback_port: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65535 })).pipe(optional),
36
+ redirect_uri: Schema.String.pipe(optional),
37
37
  }) {
38
38
  }
39
39
  export class RemoteConfig extends Schema.Class("Mcp.RemoteConfig")({
40
40
  type: Schema.Literal("remote"),
41
41
  url: Schema.String,
42
- headers: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional),
43
- oauth: Schema.Union([OAuthConfig, Schema.Literal(false)]).pipe(Schema.optional),
44
- disabled: Schema.Boolean.pipe(Schema.optional),
45
- codemode: Schema.Boolean.pipe(Schema.optional).annotate({
42
+ headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
43
+ oauth: Schema.Union([OAuthConfig, Schema.Literal(false)]).pipe(optional),
44
+ disabled: Schema.Boolean.pipe(optional),
45
+ codemode: Schema.Boolean.pipe(optional).annotate({
46
46
  description: "Expose this server's tools through Code Mode. Defaults to true.",
47
47
  }),
48
- timeout: TimeoutConfig.pipe(Schema.optional),
48
+ timeout: TimeoutConfig.pipe(optional),
49
49
  }) {
50
50
  }
51
51
  export const ServerConfig = Schema.Union([LocalConfig, RemoteConfig]).pipe(Schema.toTaggedUnion("type"));
@@ -64,11 +64,7 @@ const Failed = Schema.Struct({ status: Schema.Literal("failed"), error: Schema.S
64
64
  const NeedsAuth = Schema.Struct({ status: Schema.Literal("needs_auth") }).annotate({
65
65
  identifier: "Mcp.Status.NeedsAuth",
66
66
  });
67
- const NeedsClientRegistration = Schema.Struct({
68
- status: Schema.Literal("needs_client_registration"),
69
- error: Schema.String,
70
- }).annotate({ identifier: "Mcp.Status.NeedsClientRegistration" });
71
- export const Status = Schema.Union([Connected, Pending, Disabled, Failed, NeedsAuth, NeedsClientRegistration]).pipe(Schema.toTaggedUnion("status"));
67
+ export const Status = Schema.Union([Connected, Pending, Disabled, Failed, NeedsAuth]).pipe(Schema.toTaggedUnion("status"));
72
68
  export const Server = Schema.Struct({
73
69
  name: Schema.String,
74
70
  status: Status,