@opencode-ai/schema 0.0.0-dev-17471
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 +164 -0
- package/dist/agent.js +46 -0
- package/dist/ai.d.ts +4 -0
- package/dist/ai.js +5 -0
- package/dist/catalog.d.ts +69 -0
- package/dist/catalog.js +4 -0
- package/dist/command.d.ts +124 -0
- package/dist/command.js +19 -0
- package/dist/config/agent.d.ts +42 -0
- package/dist/config/agent.js +20 -0
- package/dist/config/command.d.ts +27 -0
- package/dist/config/command.js +12 -0
- package/dist/config/compaction.d.ts +14 -0
- package/dist/config/compaction.js +13 -0
- package/dist/config/experimental.d.ts +17 -0
- package/dist/config/experimental.js +16 -0
- package/dist/config/formatter.d.ts +11 -0
- package/dist/config/formatter.js +11 -0
- package/dist/config/lsp.d.ts +20 -0
- package/dist/config/lsp.js +16 -0
- package/dist/config/mcp.d.ts +18 -0
- package/dist/config/mcp.js +14 -0
- package/dist/config/media.d.ts +15 -0
- package/dist/config/media.js +14 -0
- package/dist/config/model.d.ts +18 -0
- package/dist/config/model.js +28 -0
- package/dist/config/plugin.d.ts +11 -0
- package/dist/config/plugin.js +10 -0
- package/dist/config/policy.d.ts +10 -0
- package/dist/config/policy.js +8 -0
- package/dist/config/provider.d.ts +106 -0
- package/dist/config/provider.js +62 -0
- package/dist/config/reference.d.ts +21 -0
- package/dist/config/reference.js +18 -0
- package/dist/config/tool-output.d.ts +8 -0
- package/dist/config/tool-output.js +8 -0
- package/dist/config/warming.d.ts +10 -0
- package/dist/config/warming.js +16 -0
- package/dist/config/watcher.d.ts +7 -0
- package/dist/config/watcher.js +7 -0
- package/dist/config/websearch.d.ts +9 -0
- package/dist/config/websearch.js +8 -0
- package/dist/config.d.ts +175 -0
- package/dist/config.js +136 -0
- package/dist/connection.d.ts +28 -0
- package/dist/connection.js +15 -0
- package/dist/credential.d.ts +38 -0
- package/dist/credential.js +25 -0
- package/dist/durable-event-manifest.d.ts +3 -0
- package/dist/durable-event-manifest.js +5 -0
- package/dist/event-log.d.ts +14 -0
- package/dist/event-log.js +17 -0
- package/dist/event-manifest.d.ts +11372 -0
- package/dist/event-manifest.js +45 -0
- package/dist/event.d.ts +142 -0
- package/dist/event.js +110 -0
- package/dist/file-diff.d.ts +21 -0
- package/dist/file-diff.js +18 -0
- package/dist/filesystem-v1.d.ts +1 -0
- package/dist/filesystem-v1.js +1 -0
- package/dist/filesystem.d.ts +118 -0
- package/dist/filesystem.js +35 -0
- package/dist/form.d.ts +1259 -0
- package/dist/form.js +120 -0
- package/dist/ide-event.d.ts +76 -0
- package/dist/ide-event.js +10 -0
- package/dist/identifier.d.ts +3 -0
- package/dist/identifier.js +24 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +39 -0
- package/dist/installation-event.d.ts +149 -0
- package/dist/installation-event.js +16 -0
- package/dist/instruction-entry.d.ts +23 -0
- package/dist/instruction-entry.js +22 -0
- package/dist/instruction.d.ts +13 -0
- package/dist/instruction.js +8 -0
- package/dist/integration-id.d.ts +5 -0
- package/dist/integration-id.js +3 -0
- package/dist/integration.d.ts +1675 -0
- package/dist/integration.js +87 -0
- package/dist/legacy-event.d.ts +1 -0
- package/dist/legacy-event.js +1 -0
- package/dist/llm.d.ts +4 -0
- package/dist/llm.js +3 -0
- package/dist/location.d.ts +37 -0
- package/dist/location.js +22 -0
- package/dist/lsp-event.d.ts +67 -0
- package/dist/lsp-event.js +4 -0
- package/dist/mcp-event.d.ts +222 -0
- package/dist/mcp-event.js +24 -0
- package/dist/mcp.d.ts +138 -0
- package/dist/mcp.js +111 -0
- package/dist/model.d.ts +186 -0
- package/dist/model.js +104 -0
- package/dist/models-dev.d.ts +69 -0
- package/dist/models-dev.js +7 -0
- package/dist/money.d.ts +10 -0
- package/dist/money.js +5 -0
- package/dist/permission-saved.d.ts +18 -0
- package/dist/permission-saved.js +12 -0
- package/dist/permission-v1.d.ts +1 -0
- package/dist/permission-v1.js +1 -0
- package/dist/permission.d.ts +306 -0
- package/dist/permission.js +45 -0
- package/dist/plugin.d.ts +150 -0
- package/dist/plugin.js +16 -0
- package/dist/project-id.d.ts +5 -0
- package/dist/project-id.js +3 -0
- package/dist/project.d.ts +241 -0
- package/dist/project.js +37 -0
- package/dist/prompt-input.d.ts +143 -0
- package/dist/prompt-input.js +25 -0
- package/dist/prompt.d.ts +297 -0
- package/dist/prompt.js +61 -0
- package/dist/provider.d.ts +60 -0
- package/dist/provider.js +42 -0
- package/dist/pty-ticket.d.ts +8 -0
- package/dist/pty-ticket.js +7 -0
- package/dist/pty.d.ts +462 -0
- package/dist/pty.js +43 -0
- package/dist/question-v1.d.ts +1 -0
- package/dist/question-v1.js +1 -0
- package/dist/question.d.ts +15 -0
- package/dist/question.js +15 -0
- package/dist/reference.d.ts +120 -0
- package/dist/reference.js +30 -0
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +14 -0
- package/dist/server-event.d.ts +132 -0
- package/dist/server-event.js +5 -0
- package/dist/session-compaction-event.d.ts +87 -0
- package/dist/session-compaction-event.js +10 -0
- package/dist/session-error.d.ts +9 -0
- package/dist/session-error.js +8 -0
- package/dist/session-event.d.ts +17994 -0
- package/dist/session-event.js +499 -0
- package/dist/session-fork.d.ts +26 -0
- package/dist/session-fork.js +11 -0
- package/dist/session-id.d.ts +6 -0
- package/dist/session-id.js +10 -0
- package/dist/session-inbox.d.ts +748 -0
- package/dist/session-inbox.js +47 -0
- package/dist/session-message.d.ts +1512 -0
- package/dist/session-message.js +209 -0
- package/dist/session-revert.d.ts +480 -0
- package/dist/session-revert.js +63 -0
- package/dist/session-status-event.d.ts +299 -0
- package/dist/session-status-event.js +43 -0
- package/dist/session-transfer.d.ts +744 -0
- package/dist/session-transfer.js +8 -0
- package/dist/session-v1.d.ts +1 -0
- package/dist/session-v1.js +1 -0
- package/dist/session.d.ts +218 -0
- package/dist/session.js +45 -0
- package/dist/shell.d.ts +381 -0
- package/dist/shell.js +58 -0
- package/dist/skill.d.ts +133 -0
- package/dist/skill.js +48 -0
- package/dist/snapshot.d.ts +4 -0
- package/dist/snapshot.js +3 -0
- package/dist/token-usage.d.ts +13 -0
- package/dist/token-usage.js +11 -0
- package/dist/tool.d.ts +74 -0
- package/dist/tool.js +22 -0
- package/dist/tui-event.d.ts +307 -0
- package/dist/tui-event.js +53 -0
- package/dist/v1/filesystem.d.ts +78 -0
- package/dist/v1/filesystem.js +8 -0
- package/dist/v1/legacy-event.d.ts +108 -0
- package/dist/v1/legacy-event.js +15 -0
- package/dist/v1/permission.d.ts +316 -0
- package/dist/v1/permission.js +41 -0
- package/dist/v1/question.d.ts +444 -0
- package/dist/v1/question.js +57 -0
- package/dist/v1/session.d.ts +7657 -0
- package/dist/v1/session.js +535 -0
- package/dist/vcs-event.d.ts +76 -0
- package/dist/vcs-event.js +11 -0
- package/dist/vcs.d.ts +26 -0
- package/dist/vcs.js +17 -0
- package/dist/websearch.d.ts +108 -0
- package/dist/websearch.js +31 -0
- package/dist/workspace-event.d.ts +247 -0
- package/dist/workspace-event.js +25 -0
- package/dist/workspace-id.d.ts +6 -0
- package/dist/workspace-id.js +16 -0
- package/dist/workspace.d.ts +9 -0
- package/dist/workspace.js +5 -0
- package/dist/worktree-event.d.ts +153 -0
- package/dist/worktree-event.js +18 -0
- package/dist/worktree.d.ts +255 -0
- package/dist/worktree.js +61 -0
- package/package.json +42 -0
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
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<Schema.Union<readonly [Schema.Literal<false>, typeof ConfigWebSearch.Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Literal<false>, 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.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, 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 AgentsDirectory_base: Schema.Class<AgentsDirectory, Schema.Struct<{
|
|
95
|
+
readonly type: Schema.Literal<"agents">;
|
|
96
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
97
|
+
}>, {}>;
|
|
98
|
+
export declare class AgentsDirectory extends AgentsDirectory_base {
|
|
99
|
+
}
|
|
100
|
+
declare const ClaudeDirectory_base: Schema.Class<ClaudeDirectory, Schema.Struct<{
|
|
101
|
+
readonly type: Schema.Literal<"claude">;
|
|
102
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
103
|
+
}>, {}>;
|
|
104
|
+
export declare class ClaudeDirectory extends ClaudeDirectory_base {
|
|
105
|
+
}
|
|
106
|
+
export declare const Entry: Schema.Union<readonly [typeof Document, typeof Directory, typeof AgentsDirectory, typeof ClaudeDirectory]>;
|
|
107
|
+
export type Entry = typeof Entry.Type;
|
|
108
|
+
export declare const Event: {
|
|
109
|
+
Updated: Schema.Struct<{
|
|
110
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
111
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
112
|
+
};
|
|
113
|
+
readonly created: Schema.Finite;
|
|
114
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
115
|
+
readonly type: Schema.Literal<"config.updated">;
|
|
116
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
117
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
118
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
119
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
120
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
121
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
122
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
123
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
124
|
+
}>, never, never>;
|
|
125
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
126
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
127
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
128
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
129
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
130
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
131
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
132
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
133
|
+
}>, never, never>;
|
|
134
|
+
}>>, never, never>;
|
|
135
|
+
readonly data: Schema.Struct<{}>;
|
|
136
|
+
}> & {
|
|
137
|
+
type: "config.updated";
|
|
138
|
+
durability: "ephemeral";
|
|
139
|
+
durable: undefined;
|
|
140
|
+
data: Schema.Struct<{}>;
|
|
141
|
+
};
|
|
142
|
+
Definitions: readonly [Schema.Struct<{
|
|
143
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
144
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
145
|
+
};
|
|
146
|
+
readonly created: Schema.Finite;
|
|
147
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
148
|
+
readonly type: Schema.Literal<"config.updated">;
|
|
149
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
150
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
151
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
152
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
153
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
154
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
155
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
156
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
157
|
+
}>, never, never>;
|
|
158
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
159
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
160
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
161
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
162
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
163
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
164
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
165
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
166
|
+
}>, never, never>;
|
|
167
|
+
}>>, never, never>;
|
|
168
|
+
readonly data: Schema.Struct<{}>;
|
|
169
|
+
}> & {
|
|
170
|
+
type: "config.updated";
|
|
171
|
+
durability: "ephemeral";
|
|
172
|
+
durable: undefined;
|
|
173
|
+
data: Schema.Struct<{}>;
|
|
174
|
+
}];
|
|
175
|
+
};
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export * as Config from "./config.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
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.Selection.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: AbsolutePath.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 AgentsDirectory extends Schema.Class("Config.AgentsDirectory")({
|
|
120
|
+
type: Schema.Literal("agents"),
|
|
121
|
+
path: AbsolutePath,
|
|
122
|
+
}) {
|
|
123
|
+
}
|
|
124
|
+
export class ClaudeDirectory extends Schema.Class("Config.ClaudeDirectory")({
|
|
125
|
+
type: Schema.Literal("claude"),
|
|
126
|
+
path: AbsolutePath,
|
|
127
|
+
}) {
|
|
128
|
+
}
|
|
129
|
+
export const Entry = Schema.Union([Document, Directory, AgentsDirectory, ClaudeDirectory]).annotate({
|
|
130
|
+
identifier: "Config.Entry",
|
|
131
|
+
});
|
|
132
|
+
const Updated = ephemeral({
|
|
133
|
+
type: "config.updated",
|
|
134
|
+
schema: {},
|
|
135
|
+
});
|
|
136
|
+
export const Event = { Updated, Definitions: inventory(Updated) };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * as Connection from "./connection.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export interface CredentialInfo extends Schema.Schema.Type<typeof CredentialInfo> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CredentialInfo: Schema.Struct<{
|
|
6
|
+
readonly type: Schema.Literal<"credential">;
|
|
7
|
+
readonly id: Schema.brand<Schema.String, "Credential.ID"> & {
|
|
8
|
+
create: () => string & import("effect/Brand").Brand<"Credential.ID">;
|
|
9
|
+
};
|
|
10
|
+
readonly label: Schema.String;
|
|
11
|
+
}>;
|
|
12
|
+
export interface EnvInfo extends Schema.Schema.Type<typeof EnvInfo> {
|
|
13
|
+
}
|
|
14
|
+
export declare const EnvInfo: Schema.Struct<{
|
|
15
|
+
readonly type: Schema.Literal<"env">;
|
|
16
|
+
readonly name: Schema.String;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
19
|
+
readonly type: Schema.Literal<"credential">;
|
|
20
|
+
readonly id: Schema.brand<Schema.String, "Credential.ID"> & {
|
|
21
|
+
create: () => string & import("effect/Brand").Brand<"Credential.ID">;
|
|
22
|
+
};
|
|
23
|
+
readonly label: Schema.String;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly type: Schema.Literal<"env">;
|
|
26
|
+
readonly name: Schema.String;
|
|
27
|
+
}>]>;
|
|
28
|
+
export type Info = typeof Info.Type;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * as Connection from "./connection.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Credential } from "./credential.js";
|
|
4
|
+
export const CredentialInfo = Schema.Struct({
|
|
5
|
+
type: Schema.Literal("credential"),
|
|
6
|
+
id: Credential.ID,
|
|
7
|
+
label: Schema.String,
|
|
8
|
+
}).annotate({ identifier: "Connection.CredentialInfo" });
|
|
9
|
+
export const EnvInfo = Schema.Struct({
|
|
10
|
+
type: Schema.Literal("env"),
|
|
11
|
+
name: Schema.String,
|
|
12
|
+
}).annotate({ identifier: "Connection.EnvInfo" });
|
|
13
|
+
export const Info = Schema.Union([CredentialInfo, EnvInfo])
|
|
14
|
+
.pipe(Schema.toTaggedUnion("type"))
|
|
15
|
+
.annotate({ identifier: "Connection.Info" });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * as Credential from "./credential.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ID: Schema.brand<Schema.String, "Credential.ID"> & {
|
|
4
|
+
create: () => string & import("effect/Brand").Brand<"Credential.ID">;
|
|
5
|
+
};
|
|
6
|
+
export type ID = typeof ID.Type;
|
|
7
|
+
export interface OAuth extends Schema.Schema.Type<typeof OAuth> {
|
|
8
|
+
}
|
|
9
|
+
export declare const OAuth: Schema.Struct<{
|
|
10
|
+
readonly type: Schema.Literal<"oauth">;
|
|
11
|
+
readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
|
|
12
|
+
readonly refresh: Schema.String;
|
|
13
|
+
readonly access: Schema.String;
|
|
14
|
+
readonly expires: Schema.Int;
|
|
15
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
16
|
+
}>;
|
|
17
|
+
export interface Key extends Schema.Schema.Type<typeof Key> {
|
|
18
|
+
}
|
|
19
|
+
export declare const Key: Schema.Struct<{
|
|
20
|
+
readonly type: Schema.Literal<"key">;
|
|
21
|
+
readonly key: Schema.String;
|
|
22
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
23
|
+
readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const Value: Schema.Union<readonly [Schema.Struct<{
|
|
26
|
+
readonly type: Schema.Literal<"oauth">;
|
|
27
|
+
readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
|
|
28
|
+
readonly refresh: Schema.String;
|
|
29
|
+
readonly access: Schema.String;
|
|
30
|
+
readonly expires: Schema.Int;
|
|
31
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly type: Schema.Literal<"key">;
|
|
34
|
+
readonly key: Schema.String;
|
|
35
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
36
|
+
readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
|
|
37
|
+
}>]>;
|
|
38
|
+
export type Value = Schema.Schema.Type<typeof Value>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * as Credential from "./credential.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { IntegrationMethodID } from "./integration-id.js";
|
|
5
|
+
import { ascending } from "./identifier.js";
|
|
6
|
+
import { NonNegativeInt, statics } from "./schema.js";
|
|
7
|
+
import { Form } from "./form.js";
|
|
8
|
+
export const ID = Schema.String.pipe(Schema.brand("Credential.ID"), statics((schema) => ({ create: () => schema.make("cred_" + ascending()) })));
|
|
9
|
+
export const OAuth = Schema.Struct({
|
|
10
|
+
type: Schema.Literal("oauth"),
|
|
11
|
+
methodID: IntegrationMethodID,
|
|
12
|
+
refresh: Schema.String,
|
|
13
|
+
access: Schema.String,
|
|
14
|
+
expires: NonNegativeInt,
|
|
15
|
+
metadata: optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
16
|
+
}).annotate({ identifier: "Credential.OAuth" });
|
|
17
|
+
export const Key = Schema.Struct({
|
|
18
|
+
type: Schema.Literal("key"),
|
|
19
|
+
key: Schema.String,
|
|
20
|
+
metadata: optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
21
|
+
configuration: optional(Form.Answer),
|
|
22
|
+
}).annotate({ identifier: "Credential.Key" });
|
|
23
|
+
export const Value = Schema.Union([OAuth, Key])
|
|
24
|
+
.pipe(Schema.toTaggedUnion("type"))
|
|
25
|
+
.annotate({ identifier: "Credential.Value" });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as DurableEventManifest from "./durable-event-manifest.js";
|
|
2
|
+
import { Event } from "./event.js";
|
|
3
|
+
import { Worktree } from "./worktree.js";
|
|
4
|
+
import { SessionEvent } from "./session-event.js";
|
|
5
|
+
export const Durable = Event.durableMap([...SessionEvent.DurableDefinitions, Worktree.Event.Resolved]);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * as EventLog from "./event-log.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
/**
|
|
4
|
+
* Replay-to-live boundary marker for a durable log read. The reader now holds
|
|
5
|
+
* every event committed at or below this watermark; `seq` is absent when the
|
|
6
|
+
* captured watermark is empty. Emitted once for the captured watermark.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Synced: Schema.Struct<{
|
|
9
|
+
readonly type: Schema.Literal<"log.synced">;
|
|
10
|
+
readonly aggregateID: Schema.String;
|
|
11
|
+
readonly seq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Int, "Event.Seq">>>, Schema.optionalKey<Schema.brand<Schema.Int, "Event.Seq">>, never, never>;
|
|
12
|
+
}>;
|
|
13
|
+
export interface Synced extends Schema.Schema.Type<typeof Synced> {
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * as EventLog from "./event-log.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Event } from "./event.js";
|
|
4
|
+
import { optional } from "./schema.js";
|
|
5
|
+
/**
|
|
6
|
+
* Replay-to-live boundary marker for a durable log read. The reader now holds
|
|
7
|
+
* every event committed at or below this watermark; `seq` is absent when the
|
|
8
|
+
* captured watermark is empty. Emitted once for the captured watermark.
|
|
9
|
+
*/
|
|
10
|
+
export const Synced = Schema.Struct({
|
|
11
|
+
type: Schema.Literal("log.synced"),
|
|
12
|
+
aggregateID: Schema.String,
|
|
13
|
+
seq: optional(Event.Seq),
|
|
14
|
+
}).annotate({
|
|
15
|
+
identifier: "EventLog.Synced",
|
|
16
|
+
description: "Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq.",
|
|
17
|
+
});
|