@opencode-ai/schema 0.0.0-next-14659
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 +175 -0
- package/dist/agent.js +43 -0
- package/dist/catalog.d.ts +89 -0
- package/dist/catalog.js +4 -0
- package/dist/command.d.ts +44 -0
- package/dist/command.js +12 -0
- package/dist/connection.d.ts +28 -0
- package/dist/connection.js +15 -0
- package/dist/credential.d.ts +36 -0
- package/dist/credential.js +23 -0
- package/dist/durable-event-manifest.d.ts +10626 -0
- package/dist/durable-event-manifest.js +12 -0
- package/dist/event-manifest.d.ts +15309 -0
- package/dist/event-manifest.js +43 -0
- package/dist/event.d.ts +82 -0
- package/dist/event.js +73 -0
- package/dist/file-diff.d.ts +11 -0
- package/dist/file-diff.js +10 -0
- package/dist/filesystem-watcher.d.ts +102 -0
- package/dist/filesystem-watcher.js +11 -0
- package/dist/filesystem.d.ts +134 -0
- package/dist/filesystem.js +32 -0
- package/dist/ide-event.d.ts +96 -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 +29 -0
- package/dist/index.js +29 -0
- package/dist/installation-event.d.ts +189 -0
- package/dist/installation-event.js +16 -0
- package/dist/integration-id.d.ts +5 -0
- package/dist/integration-id.js +3 -0
- package/dist/integration.d.ts +572 -0
- package/dist/integration.js +93 -0
- package/dist/legacy-event.d.ts +1 -0
- package/dist/legacy-event.js +1 -0
- package/dist/llm.d.ts +28 -0
- package/dist/llm.js +19 -0
- package/dist/location.d.ts +36 -0
- package/dist/location.js +21 -0
- package/dist/lsp-event.d.ts +87 -0
- package/dist/lsp-event.js +4 -0
- package/dist/mcp-event.d.ts +286 -0
- package/dist/mcp-event.js +25 -0
- package/dist/mcp.d.ts +39 -0
- package/dist/mcp.js +38 -0
- package/dist/model.d.ts +205 -0
- package/dist/model.js +86 -0
- package/dist/models-dev.d.ts +89 -0
- package/dist/models-dev.js +7 -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 +346 -0
- package/dist/permission.js +45 -0
- package/dist/plugin.d.ts +105 -0
- package/dist/plugin.js +12 -0
- package/dist/project-copy.d.ts +29 -0
- package/dist/project-copy.js +21 -0
- package/dist/project-directories.d.ts +105 -0
- package/dist/project-directories.js +8 -0
- package/dist/project-id.d.ts +5 -0
- package/dist/project-id.js +3 -0
- package/dist/project.d.ts +278 -0
- package/dist/project.js +44 -0
- package/dist/prompt-input.d.ts +106 -0
- package/dist/prompt-input.js +19 -0
- package/dist/prompt.d.ts +177 -0
- package/dist/prompt.js +43 -0
- package/dist/provider.d.ts +111 -0
- package/dist/provider.js +53 -0
- package/dist/pty-ticket.d.ts +8 -0
- package/dist/pty-ticket.js +7 -0
- package/dist/pty.d.ts +542 -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 +516 -0
- package/dist/question.js +64 -0
- package/dist/reference.d.ts +140 -0
- package/dist/reference.js +31 -0
- package/dist/revert.d.ts +34 -0
- package/dist/revert.js +19 -0
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +14 -0
- package/dist/server-event.d.ts +172 -0
- package/dist/server-event.js +5 -0
- package/dist/session-compaction-event.d.ts +107 -0
- package/dist/session-compaction-event.js +10 -0
- package/dist/session-delivery.d.ts +4 -0
- package/dist/session-delivery.js +3 -0
- package/dist/session-event.d.ts +14225 -0
- package/dist/session-event.js +421 -0
- package/dist/session-id.d.ts +6 -0
- package/dist/session-id.js +10 -0
- package/dist/session-input.d.ts +145 -0
- package/dist/session-input.js +18 -0
- package/dist/session-message.d.ts +1318 -0
- package/dist/session-message.js +171 -0
- package/dist/session-status-event.d.ts +339 -0
- package/dist/session-status-event.js +43 -0
- package/dist/session-todo.d.ts +137 -0
- package/dist/session-todo.js +21 -0
- package/dist/session-v1.d.ts +1 -0
- package/dist/session-v1.js +1 -0
- package/dist/session.d.ts +140 -0
- package/dist/session.js +43 -0
- package/dist/shell.d.ts +441 -0
- package/dist/shell.js +58 -0
- package/dist/skill.d.ts +146 -0
- package/dist/skill.js +45 -0
- package/dist/tui-event.d.ts +387 -0
- package/dist/tui-event.js +53 -0
- package/dist/v1/legacy-event.d.ts +128 -0
- package/dist/v1/legacy-event.js +15 -0
- package/dist/v1/permission.d.ts +356 -0
- package/dist/v1/permission.js +41 -0
- package/dist/v1/question.d.ts +504 -0
- package/dist/v1/question.js +57 -0
- package/dist/v1/session.d.ts +7775 -0
- package/dist/v1/session.js +535 -0
- package/dist/vcs-event.d.ts +96 -0
- package/dist/vcs-event.js +11 -0
- package/dist/workspace-event.d.ts +307 -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 +193 -0
- package/dist/worktree-event.js +18 -0
- package/package.json +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./v1/legacy-event.js";
|
package/dist/llm.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * as LLM from "./llm.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ProviderMetadata: Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
4
|
+
export type ProviderMetadata = Schema.Schema.Type<typeof ProviderMetadata>;
|
|
5
|
+
export interface ToolTextContent extends Schema.Schema.Type<typeof ToolTextContent> {
|
|
6
|
+
}
|
|
7
|
+
export declare const ToolTextContent: Schema.Struct<{
|
|
8
|
+
readonly type: Schema.Literal<"text">;
|
|
9
|
+
readonly text: Schema.String;
|
|
10
|
+
}>;
|
|
11
|
+
export interface ToolFileContent extends Schema.Schema.Type<typeof ToolFileContent> {
|
|
12
|
+
}
|
|
13
|
+
export declare const ToolFileContent: Schema.Struct<{
|
|
14
|
+
readonly type: Schema.Literal<"file">;
|
|
15
|
+
readonly uri: Schema.String;
|
|
16
|
+
readonly mime: Schema.String;
|
|
17
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const ToolContent: Schema.Union<readonly [Schema.Struct<{
|
|
20
|
+
readonly type: Schema.Literal<"text">;
|
|
21
|
+
readonly text: Schema.String;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly type: Schema.Literal<"file">;
|
|
24
|
+
readonly uri: Schema.String;
|
|
25
|
+
readonly mime: Schema.String;
|
|
26
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
27
|
+
}>]>;
|
|
28
|
+
export type ToolContent = Schema.Schema.Type<typeof ToolContent>;
|
package/dist/llm.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * as LLM from "./llm.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
export const ProviderMetadata = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.Unknown)).annotate({
|
|
5
|
+
identifier: "LLM.ProviderMetadata",
|
|
6
|
+
});
|
|
7
|
+
export const ToolTextContent = Schema.Struct({
|
|
8
|
+
type: Schema.Literal("text"),
|
|
9
|
+
text: Schema.String,
|
|
10
|
+
}).annotate({ identifier: "Tool.TextContent" });
|
|
11
|
+
export const ToolFileContent = Schema.Struct({
|
|
12
|
+
type: Schema.Literal("file"),
|
|
13
|
+
uri: Schema.String,
|
|
14
|
+
mime: Schema.String,
|
|
15
|
+
name: optional(Schema.String),
|
|
16
|
+
}).annotate({ identifier: "Tool.FileContent" });
|
|
17
|
+
export const ToolContent = Schema.Union([ToolTextContent, ToolFileContent])
|
|
18
|
+
.pipe(Schema.toTaggedUnion("type"))
|
|
19
|
+
.annotate({ identifier: "LLM.ToolContent" });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export * as Location from "./location.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export interface Ref extends Schema.Schema.Type<typeof Ref> {
|
|
4
|
+
}
|
|
5
|
+
export declare const Ref: Schema.Struct<{
|
|
6
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
7
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
8
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
9
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
11
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
12
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
13
|
+
}>, never, never>;
|
|
14
|
+
}>;
|
|
15
|
+
declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
16
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
18
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
19
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
20
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
21
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
22
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
23
|
+
}>, never, never>;
|
|
24
|
+
readonly project: Schema.Struct<{
|
|
25
|
+
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
26
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
27
|
+
};
|
|
28
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
29
|
+
}>;
|
|
30
|
+
}>, {}>;
|
|
31
|
+
export declare class Info extends Info_base {
|
|
32
|
+
}
|
|
33
|
+
export declare function response<S extends Schema.Top>(data: S): Schema.Struct<{
|
|
34
|
+
readonly location: typeof Info;
|
|
35
|
+
readonly data: S;
|
|
36
|
+
}>;
|
package/dist/location.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * as Location from "./location.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { AbsolutePath, optional } from "./schema.js";
|
|
4
|
+
import { ProjectID } from "./project-id.js";
|
|
5
|
+
import { WorkspaceID } from "./workspace-id.js";
|
|
6
|
+
export const Ref = Schema.Struct({
|
|
7
|
+
directory: AbsolutePath,
|
|
8
|
+
workspaceID: optional(WorkspaceID),
|
|
9
|
+
}).annotate({ identifier: "Location.Ref" });
|
|
10
|
+
export class Info extends Schema.Class("Location.Info")({
|
|
11
|
+
directory: AbsolutePath,
|
|
12
|
+
workspaceID: optional(WorkspaceID),
|
|
13
|
+
project: Schema.Struct({
|
|
14
|
+
id: ProjectID,
|
|
15
|
+
directory: AbsolutePath,
|
|
16
|
+
}),
|
|
17
|
+
}) {
|
|
18
|
+
}
|
|
19
|
+
export function response(data) {
|
|
20
|
+
return Schema.Struct({ location: Info, data });
|
|
21
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export * as LspEvent from "./lsp-event.js";
|
|
2
|
+
export declare const Updated: import("effect/Schema").Struct<{
|
|
3
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
4
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
readonly type: import("effect/Schema").Literal<"lsp.updated">;
|
|
8
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
9
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
10
|
+
readonly seq: import("effect/Schema").Int;
|
|
11
|
+
readonly version: import("effect/Schema").Int;
|
|
12
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
13
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
14
|
+
readonly seq: import("effect/Schema").Int;
|
|
15
|
+
readonly version: import("effect/Schema").Int;
|
|
16
|
+
}>>, never, never>;
|
|
17
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
18
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
19
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
20
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
21
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
22
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
23
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
24
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
25
|
+
}>, never, never>;
|
|
26
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
27
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
28
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
29
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
30
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
31
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
32
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
33
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
34
|
+
}>, never, never>;
|
|
35
|
+
}>>, never, never>;
|
|
36
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
37
|
+
}> & {
|
|
38
|
+
data: import("effect/Schema").Struct<{}>;
|
|
39
|
+
durable?: {
|
|
40
|
+
readonly version: number;
|
|
41
|
+
readonly aggregate: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
type: "lsp.updated";
|
|
44
|
+
};
|
|
45
|
+
export declare const Definitions: readonly [import("effect/Schema").Struct<{
|
|
46
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
47
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
48
|
+
};
|
|
49
|
+
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>;
|
|
50
|
+
readonly type: import("effect/Schema").Literal<"lsp.updated">;
|
|
51
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
52
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
53
|
+
readonly seq: import("effect/Schema").Int;
|
|
54
|
+
readonly version: import("effect/Schema").Int;
|
|
55
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
56
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
57
|
+
readonly seq: import("effect/Schema").Int;
|
|
58
|
+
readonly version: import("effect/Schema").Int;
|
|
59
|
+
}>>, never, never>;
|
|
60
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
61
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
62
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
63
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
64
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
65
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
66
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
67
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
68
|
+
}>, never, never>;
|
|
69
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
70
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
71
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
72
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
73
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
74
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
75
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
76
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
77
|
+
}>, never, never>;
|
|
78
|
+
}>>, never, never>;
|
|
79
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
80
|
+
}> & {
|
|
81
|
+
data: import("effect/Schema").Struct<{}>;
|
|
82
|
+
durable?: {
|
|
83
|
+
readonly version: number;
|
|
84
|
+
readonly aggregate: string;
|
|
85
|
+
} | undefined;
|
|
86
|
+
type: "lsp.updated";
|
|
87
|
+
}];
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
export * as McpEvent from "./mcp-event.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ToolsChanged: Schema.Struct<{
|
|
4
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
5
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6
|
+
};
|
|
7
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
8
|
+
readonly type: Schema.Literal<"mcp.tools.changed">;
|
|
9
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10
|
+
readonly aggregateID: Schema.String;
|
|
11
|
+
readonly seq: Schema.Int;
|
|
12
|
+
readonly version: Schema.Int;
|
|
13
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
14
|
+
readonly aggregateID: Schema.String;
|
|
15
|
+
readonly seq: Schema.Int;
|
|
16
|
+
readonly version: Schema.Int;
|
|
17
|
+
}>>, never, never>;
|
|
18
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
19
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
20
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
21
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
22
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
23
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
24
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
25
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
26
|
+
}>, never, never>;
|
|
27
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
28
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
29
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
30
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
31
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
32
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
33
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
34
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
35
|
+
}>, never, never>;
|
|
36
|
+
}>>, never, never>;
|
|
37
|
+
readonly data: Schema.Struct<{
|
|
38
|
+
readonly server: Schema.String;
|
|
39
|
+
}>;
|
|
40
|
+
}> & {
|
|
41
|
+
data: Schema.Struct<{
|
|
42
|
+
readonly server: Schema.String;
|
|
43
|
+
}>;
|
|
44
|
+
durable?: {
|
|
45
|
+
readonly version: number;
|
|
46
|
+
readonly aggregate: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
type: "mcp.tools.changed";
|
|
49
|
+
};
|
|
50
|
+
export declare const BrowserOpenFailed: Schema.Struct<{
|
|
51
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
52
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
53
|
+
};
|
|
54
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
55
|
+
readonly type: Schema.Literal<"mcp.browser.open.failed">;
|
|
56
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
57
|
+
readonly aggregateID: Schema.String;
|
|
58
|
+
readonly seq: Schema.Int;
|
|
59
|
+
readonly version: Schema.Int;
|
|
60
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
61
|
+
readonly aggregateID: Schema.String;
|
|
62
|
+
readonly seq: Schema.Int;
|
|
63
|
+
readonly version: Schema.Int;
|
|
64
|
+
}>>, never, never>;
|
|
65
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
66
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
67
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
68
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
69
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
70
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
71
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
72
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
73
|
+
}>, never, never>;
|
|
74
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
75
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
76
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
77
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
78
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
79
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
80
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
81
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
82
|
+
}>, never, never>;
|
|
83
|
+
}>>, never, never>;
|
|
84
|
+
readonly data: Schema.Struct<{
|
|
85
|
+
readonly mcpName: Schema.String;
|
|
86
|
+
readonly url: Schema.String;
|
|
87
|
+
}>;
|
|
88
|
+
}> & {
|
|
89
|
+
data: Schema.Struct<{
|
|
90
|
+
readonly mcpName: Schema.String;
|
|
91
|
+
readonly url: Schema.String;
|
|
92
|
+
}>;
|
|
93
|
+
durable?: {
|
|
94
|
+
readonly version: number;
|
|
95
|
+
readonly aggregate: string;
|
|
96
|
+
} | undefined;
|
|
97
|
+
type: "mcp.browser.open.failed";
|
|
98
|
+
};
|
|
99
|
+
export declare const StatusChanged: Schema.Struct<{
|
|
100
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
101
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
102
|
+
};
|
|
103
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
104
|
+
readonly type: Schema.Literal<"mcp.status.changed">;
|
|
105
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
106
|
+
readonly aggregateID: Schema.String;
|
|
107
|
+
readonly seq: Schema.Int;
|
|
108
|
+
readonly version: Schema.Int;
|
|
109
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
110
|
+
readonly aggregateID: Schema.String;
|
|
111
|
+
readonly seq: Schema.Int;
|
|
112
|
+
readonly version: Schema.Int;
|
|
113
|
+
}>>, never, never>;
|
|
114
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
115
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
116
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
117
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
118
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
119
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
120
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
121
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
122
|
+
}>, never, never>;
|
|
123
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
124
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
125
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
126
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
127
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
128
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
129
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
130
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
131
|
+
}>, never, never>;
|
|
132
|
+
}>>, never, never>;
|
|
133
|
+
readonly data: Schema.Struct<{
|
|
134
|
+
readonly server: Schema.String;
|
|
135
|
+
}>;
|
|
136
|
+
}> & {
|
|
137
|
+
data: Schema.Struct<{
|
|
138
|
+
readonly server: Schema.String;
|
|
139
|
+
}>;
|
|
140
|
+
durable?: {
|
|
141
|
+
readonly version: number;
|
|
142
|
+
readonly aggregate: string;
|
|
143
|
+
} | undefined;
|
|
144
|
+
type: "mcp.status.changed";
|
|
145
|
+
};
|
|
146
|
+
export declare const Definitions: readonly [Schema.Struct<{
|
|
147
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
148
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
149
|
+
};
|
|
150
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
151
|
+
readonly type: Schema.Literal<"mcp.tools.changed">;
|
|
152
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
153
|
+
readonly aggregateID: Schema.String;
|
|
154
|
+
readonly seq: Schema.Int;
|
|
155
|
+
readonly version: Schema.Int;
|
|
156
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
157
|
+
readonly aggregateID: Schema.String;
|
|
158
|
+
readonly seq: Schema.Int;
|
|
159
|
+
readonly version: Schema.Int;
|
|
160
|
+
}>>, never, never>;
|
|
161
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
162
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
163
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
164
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
165
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
166
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
167
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
168
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
169
|
+
}>, never, never>;
|
|
170
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
171
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
172
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
173
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
174
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
175
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
176
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
177
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
178
|
+
}>, never, never>;
|
|
179
|
+
}>>, never, never>;
|
|
180
|
+
readonly data: Schema.Struct<{
|
|
181
|
+
readonly server: Schema.String;
|
|
182
|
+
}>;
|
|
183
|
+
}> & {
|
|
184
|
+
data: Schema.Struct<{
|
|
185
|
+
readonly server: Schema.String;
|
|
186
|
+
}>;
|
|
187
|
+
durable?: {
|
|
188
|
+
readonly version: number;
|
|
189
|
+
readonly aggregate: string;
|
|
190
|
+
} | undefined;
|
|
191
|
+
type: "mcp.tools.changed";
|
|
192
|
+
}, Schema.Struct<{
|
|
193
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
194
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
195
|
+
};
|
|
196
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
197
|
+
readonly type: Schema.Literal<"mcp.browser.open.failed">;
|
|
198
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
199
|
+
readonly aggregateID: Schema.String;
|
|
200
|
+
readonly seq: Schema.Int;
|
|
201
|
+
readonly version: Schema.Int;
|
|
202
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
203
|
+
readonly aggregateID: Schema.String;
|
|
204
|
+
readonly seq: Schema.Int;
|
|
205
|
+
readonly version: Schema.Int;
|
|
206
|
+
}>>, never, never>;
|
|
207
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
208
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
209
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
210
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
211
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
212
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
213
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
214
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
215
|
+
}>, never, never>;
|
|
216
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
217
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
218
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
219
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
220
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
221
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
222
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
223
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
224
|
+
}>, never, never>;
|
|
225
|
+
}>>, never, never>;
|
|
226
|
+
readonly data: Schema.Struct<{
|
|
227
|
+
readonly mcpName: Schema.String;
|
|
228
|
+
readonly url: Schema.String;
|
|
229
|
+
}>;
|
|
230
|
+
}> & {
|
|
231
|
+
data: Schema.Struct<{
|
|
232
|
+
readonly mcpName: Schema.String;
|
|
233
|
+
readonly url: Schema.String;
|
|
234
|
+
}>;
|
|
235
|
+
durable?: {
|
|
236
|
+
readonly version: number;
|
|
237
|
+
readonly aggregate: string;
|
|
238
|
+
} | undefined;
|
|
239
|
+
type: "mcp.browser.open.failed";
|
|
240
|
+
}, Schema.Struct<{
|
|
241
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
242
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
243
|
+
};
|
|
244
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
245
|
+
readonly type: Schema.Literal<"mcp.status.changed">;
|
|
246
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
247
|
+
readonly aggregateID: Schema.String;
|
|
248
|
+
readonly seq: Schema.Int;
|
|
249
|
+
readonly version: Schema.Int;
|
|
250
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
251
|
+
readonly aggregateID: Schema.String;
|
|
252
|
+
readonly seq: Schema.Int;
|
|
253
|
+
readonly version: Schema.Int;
|
|
254
|
+
}>>, never, never>;
|
|
255
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
256
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
257
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
258
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
259
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
260
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
261
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
262
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
263
|
+
}>, never, never>;
|
|
264
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
265
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
266
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
267
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
268
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
269
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
270
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
271
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
272
|
+
}>, never, never>;
|
|
273
|
+
}>>, never, never>;
|
|
274
|
+
readonly data: Schema.Struct<{
|
|
275
|
+
readonly server: Schema.String;
|
|
276
|
+
}>;
|
|
277
|
+
}> & {
|
|
278
|
+
data: Schema.Struct<{
|
|
279
|
+
readonly server: Schema.String;
|
|
280
|
+
}>;
|
|
281
|
+
durable?: {
|
|
282
|
+
readonly version: number;
|
|
283
|
+
readonly aggregate: string;
|
|
284
|
+
} | undefined;
|
|
285
|
+
type: "mcp.status.changed";
|
|
286
|
+
}];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * as McpEvent from "./mcp-event.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Event } from "./event.js";
|
|
4
|
+
export const ToolsChanged = Event.define({
|
|
5
|
+
type: "mcp.tools.changed",
|
|
6
|
+
schema: {
|
|
7
|
+
server: Schema.String,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export const BrowserOpenFailed = Event.define({
|
|
11
|
+
type: "mcp.browser.open.failed",
|
|
12
|
+
schema: {
|
|
13
|
+
mcpName: Schema.String,
|
|
14
|
+
url: Schema.String,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
// Emitted whenever a server's connection status settles (connected, failed, needs_auth, closed) so
|
|
18
|
+
// observers can refresh status without polling.
|
|
19
|
+
export const StatusChanged = Event.define({
|
|
20
|
+
type: "mcp.status.changed",
|
|
21
|
+
schema: {
|
|
22
|
+
server: Schema.String,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
export const Definitions = Event.inventory(ToolsChanged, BrowserOpenFailed, StatusChanged);
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export * as Mcp from "./mcp.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export type Status = typeof Status.Type;
|
|
4
|
+
export declare const Status: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
|
|
5
|
+
readonly status: Schema.Literal<"connected">;
|
|
6
|
+
}>, Schema.Struct<{
|
|
7
|
+
readonly status: Schema.Literal<"disconnected">;
|
|
8
|
+
}>, Schema.Struct<{
|
|
9
|
+
readonly status: Schema.Literal<"disabled">;
|
|
10
|
+
}>, Schema.Struct<{
|
|
11
|
+
readonly status: Schema.Literal<"failed">;
|
|
12
|
+
readonly error: Schema.String;
|
|
13
|
+
}>, Schema.Struct<{
|
|
14
|
+
readonly status: Schema.Literal<"needs_auth">;
|
|
15
|
+
}>, Schema.Struct<{
|
|
16
|
+
readonly status: Schema.Literal<"needs_client_registration">;
|
|
17
|
+
readonly error: Schema.String;
|
|
18
|
+
}>]>;
|
|
19
|
+
export interface Server extends Schema.Schema.Type<typeof Server> {
|
|
20
|
+
}
|
|
21
|
+
export declare const Server: Schema.Struct<{
|
|
22
|
+
readonly name: Schema.String;
|
|
23
|
+
readonly status: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
|
|
24
|
+
readonly status: Schema.Literal<"connected">;
|
|
25
|
+
}>, Schema.Struct<{
|
|
26
|
+
readonly status: Schema.Literal<"disconnected">;
|
|
27
|
+
}>, Schema.Struct<{
|
|
28
|
+
readonly status: Schema.Literal<"disabled">;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly status: Schema.Literal<"failed">;
|
|
31
|
+
readonly error: Schema.String;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly status: Schema.Literal<"needs_auth">;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly status: Schema.Literal<"needs_client_registration">;
|
|
36
|
+
readonly error: Schema.String;
|
|
37
|
+
}>]>;
|
|
38
|
+
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
|
|
39
|
+
}>;
|
package/dist/mcp.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * as Mcp from "./mcp.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { IntegrationID } from "./integration-id.js";
|
|
5
|
+
const Connected = Schema.Struct({ status: Schema.Literal("connected") }).annotate({
|
|
6
|
+
identifier: "Mcp.Status.Connected",
|
|
7
|
+
});
|
|
8
|
+
const Disconnected = Schema.Struct({ status: Schema.Literal("disconnected") }).annotate({
|
|
9
|
+
identifier: "Mcp.Status.Disconnected",
|
|
10
|
+
});
|
|
11
|
+
const Disabled = Schema.Struct({ status: Schema.Literal("disabled") }).annotate({
|
|
12
|
+
identifier: "Mcp.Status.Disabled",
|
|
13
|
+
});
|
|
14
|
+
const Failed = Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String }).annotate({
|
|
15
|
+
identifier: "Mcp.Status.Failed",
|
|
16
|
+
});
|
|
17
|
+
const NeedsAuth = Schema.Struct({ status: Schema.Literal("needs_auth") }).annotate({
|
|
18
|
+
identifier: "Mcp.Status.NeedsAuth",
|
|
19
|
+
});
|
|
20
|
+
const NeedsClientRegistration = Schema.Struct({
|
|
21
|
+
status: Schema.Literal("needs_client_registration"),
|
|
22
|
+
error: Schema.String,
|
|
23
|
+
}).annotate({ identifier: "Mcp.Status.NeedsClientRegistration" });
|
|
24
|
+
export const Status = Schema.Union([
|
|
25
|
+
Connected,
|
|
26
|
+
Disconnected,
|
|
27
|
+
Disabled,
|
|
28
|
+
Failed,
|
|
29
|
+
NeedsAuth,
|
|
30
|
+
NeedsClientRegistration,
|
|
31
|
+
]).pipe(Schema.toTaggedUnion("status"));
|
|
32
|
+
export const Server = Schema.Struct({
|
|
33
|
+
name: Schema.String,
|
|
34
|
+
status: Status,
|
|
35
|
+
// Set for remote servers registered as OAuth integrations; lets clients act on the right integration
|
|
36
|
+
// without matching by name, which could collide with provider or plugin integrations.
|
|
37
|
+
integrationID: optional(IntegrationID),
|
|
38
|
+
}).annotate({ identifier: "Mcp.Server" });
|