@kilocode/schema 0.0.0-stage → 0.0.0-v2-9
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 +179 -0
- package/dist/agent.js +45 -0
- package/dist/command.d.ts +76 -0
- package/dist/command.js +13 -0
- package/dist/config/agent.d.ts +42 -0
- package/dist/config/agent.js +21 -0
- package/dist/config/command.d.ts +28 -0
- package/dist/config/command.js +13 -0
- package/dist/config/compaction.d.ts +14 -0
- package/dist/config/compaction.js +13 -0
- package/dist/config/experimental.d.ts +20 -0
- package/dist/config/experimental.js +27 -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 +20 -0
- package/dist/config/mcp.js +15 -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 +392 -0
- package/dist/config/provider.js +109 -0
- package/dist/config/reference.d.ts +21 -0
- package/dist/config/reference.js +18 -0
- package/dist/config/shell.d.ts +9 -0
- package/dist/config/shell.js +7 -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 +13 -0
- package/dist/config/worktree.d.ts +7 -0
- package/dist/config/worktree.js +7 -0
- package/dist/config.d.ts +182 -0
- package/dist/config.js +135 -0
- package/dist/connection.d.ts +79 -0
- package/dist/connection.js +25 -0
- package/dist/credential-legacy.d.ts +54 -0
- package/dist/credential-legacy.js +19 -0
- package/dist/credential.d.ts +255 -0
- package/dist/credential.js +56 -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 +12865 -0
- package/dist/event-manifest.js +48 -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 +123 -0
- package/dist/filesystem.js +38 -0
- package/dist/form.d.ts +1438 -0
- package/dist/form.js +128 -0
- package/dist/identifier.d.ts +4 -0
- package/dist/identifier.js +25 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +41 -0
- package/dist/installation-event.d.ts +149 -0
- package/dist/installation-event.js +16 -0
- package/dist/instruction-entry.d.ts +29 -0
- package/dist/instruction-entry.js +26 -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 +2410 -0
- package/dist/integration.js +91 -0
- package/dist/kilocode/gateway.d.ts +975 -0
- package/dist/kilocode/gateway.js +328 -0
- package/dist/kilocode/handshake.d.ts +36 -0
- package/dist/kilocode/handshake.js +29 -0
- package/dist/kilocode/marketplace.d.ts +593 -0
- package/dist/kilocode/marketplace.js +122 -0
- package/dist/kilocode/provider-usage.d.ts +371 -0
- package/dist/kilocode/provider-usage.js +60 -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-event.d.ts +68 -0
- package/dist/location-event.js +5 -0
- package/dist/location.d.ts +56 -0
- package/dist/location.js +28 -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 +145 -0
- package/dist/mcp.js +120 -0
- package/dist/model-compatibility.d.ts +38 -0
- package/dist/model-compatibility.js +28 -0
- package/dist/model.d.ts +406 -0
- package/dist/model.js +115 -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 +22 -0
- package/dist/permission-saved.js +16 -0
- package/dist/permission-v1.d.ts +1 -0
- package/dist/permission-v1.js +1 -0
- package/dist/permission.d.ts +302 -0
- package/dist/permission.js +46 -0
- package/dist/persistent-pty.d.ts +539 -0
- package/dist/persistent-pty.js +55 -0
- package/dist/plugin.d.ts +132 -0
- package/dist/plugin.js +37 -0
- package/dist/project-id.d.ts +5 -0
- package/dist/project-id.js +3 -0
- package/dist/project.d.ts +270 -0
- package/dist/project.js +47 -0
- package/dist/prompt-input.d.ts +110 -0
- package/dist/prompt-input.js +21 -0
- package/dist/prompt.d.ts +297 -0
- package/dist/prompt.js +61 -0
- package/dist/provider.d.ts +275 -0
- package/dist/provider.js +66 -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.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/rpc.d.ts +111 -0
- package/dist/rpc.js +9 -0
- package/dist/schema.d.ts +11 -0
- package/dist/schema.js +17 -0
- package/dist/server-event.d.ts +132 -0
- package/dist/server-event.js +5 -0
- package/dist/session-error.d.ts +16 -0
- package/dist/session-error.js +11 -0
- package/dist/session-event.d.ts +21417 -0
- package/dist/session-event.js +565 -0
- package/dist/session-fork.d.ts +16 -0
- package/dist/session-fork.js +7 -0
- package/dist/session-id.d.ts +5 -0
- package/dist/session-id.js +6 -0
- package/dist/session-inbox.d.ts +756 -0
- package/dist/session-inbox.js +47 -0
- package/dist/session-legacy.d.ts +7 -0
- package/dist/session-legacy.js +118 -0
- package/dist/session-message.d.ts +2049 -0
- package/dist/session-message.js +234 -0
- package/dist/session-metadata.d.ts +8 -0
- package/dist/session-metadata.js +9 -0
- package/dist/session-revert.d.ts +896 -0
- package/dist/session-revert.js +63 -0
- package/dist/session-stats.d.ts +186 -0
- package/dist/session-stats.js +53 -0
- package/dist/session-status-event.d.ts +291 -0
- package/dist/session-status-event.js +45 -0
- package/dist/session-transfer.d.ts +910 -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 +320 -0
- package/dist/session.js +116 -0
- package/dist/shell.d.ts +386 -0
- package/dist/shell.js +61 -0
- package/dist/skill.d.ts +130 -0
- package/dist/skill.js +47 -0
- package/dist/snapshot.d.ts +4 -0
- package/dist/snapshot.js +3 -0
- package/dist/token-usage.d.ts +14 -0
- package/dist/token-usage.js +14 -0
- package/dist/tool.d.ts +78 -0
- package/dist/tool.js +22 -0
- package/dist/tui-event.d.ts +307 -0
- package/dist/tui-event.js +52 -0
- package/dist/v1/filesystem.d.ts +78 -0
- package/dist/v1/filesystem.js +8 -0
- package/dist/v1/legacy-event.d.ts +104 -0
- package/dist/v1/legacy-event.js +15 -0
- package/dist/v1/permission.d.ts +306 -0
- package/dist/v1/permission.js +41 -0
- package/dist/v1/session.d.ts +6977 -0
- package/dist/v1/session.js +531 -0
- package/dist/vcs-event.d.ts +76 -0
- package/dist/vcs-event.js +11 -0
- package/dist/vcs.d.ts +36 -0
- package/dist/vcs.js +24 -0
- package/dist/websearch.d.ts +108 -0
- package/dist/websearch.js +33 -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 +14 -0
- package/dist/workspace.d.ts +15 -0
- package/dist/workspace.js +14 -0
- package/dist/worktree-event.d.ts +153 -0
- package/dist/worktree-event.js +18 -0
- package/dist/worktree.d.ts +282 -0
- package/dist/worktree.js +83 -0
- package/package.json +42 -4
- package/README.md +0 -3
package/dist/mcp.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export * as Mcp from "./mcp.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional, PositiveInt } from "./schema.js";
|
|
4
|
+
import { IntegrationID } from "./integration-id.js";
|
|
5
|
+
export class TimeoutConfig extends Schema.Class("Mcp.TimeoutConfig")({
|
|
6
|
+
startup: PositiveInt.pipe(optional).annotate({
|
|
7
|
+
description: "Maximum time in milliseconds to establish and initialize the MCP server.",
|
|
8
|
+
}),
|
|
9
|
+
catalog: PositiveInt.pipe(optional).annotate({
|
|
10
|
+
description: "Maximum time in milliseconds to wait for MCP discovery requests such as tools/list and prompts/list.",
|
|
11
|
+
}),
|
|
12
|
+
execution: PositiveInt.pipe(optional).annotate({
|
|
13
|
+
description: "Maximum time in milliseconds to wait for MCP tool and prompt execution.",
|
|
14
|
+
}),
|
|
15
|
+
}) {
|
|
16
|
+
}
|
|
17
|
+
export const Protocol = Schema.Literals(["legacy", "auto", "2026-07-28"]).annotate({
|
|
18
|
+
identifier: "Mcp.Protocol",
|
|
19
|
+
description: 'MCP protocol negotiation. "legacy" (default) opens with the initialize handshake and speaks protocol revisions up to 2025-11-25. "auto" probes for the 2026-07-28 revision and falls back to legacy when the server does not support it. "2026-07-28" requires that revision and fails otherwise.',
|
|
20
|
+
});
|
|
21
|
+
export class LocalConfig extends Schema.Class("Mcp.LocalConfig")({
|
|
22
|
+
type: Schema.Literal("local"),
|
|
23
|
+
command: Schema.String.pipe(Schema.Array),
|
|
24
|
+
cwd: Schema.String.pipe(optional).annotate({
|
|
25
|
+
description: "Working directory for the MCP server process. Relative paths resolve from the workspace directory.",
|
|
26
|
+
}),
|
|
27
|
+
environment: Schema.Record(Schema.String, Schema.String).pipe(optional),
|
|
28
|
+
disabled: Schema.Boolean.pipe(optional),
|
|
29
|
+
codemode: Schema.Boolean.pipe(optional).annotate({
|
|
30
|
+
description: "Expose this server's tools through Code Mode. Defaults to true.",
|
|
31
|
+
}),
|
|
32
|
+
timeout: TimeoutConfig.pipe(optional),
|
|
33
|
+
protocol: Protocol.pipe(optional),
|
|
34
|
+
}) {
|
|
35
|
+
}
|
|
36
|
+
export class OAuthConfig extends Schema.Class("Mcp.OAuthConfig")({
|
|
37
|
+
client_id: Schema.String.pipe(optional),
|
|
38
|
+
client_secret: Schema.String.pipe(optional),
|
|
39
|
+
scope: Schema.String.pipe(optional),
|
|
40
|
+
callback_port: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65535 })).pipe(optional),
|
|
41
|
+
redirect_uri: Schema.String.pipe(optional),
|
|
42
|
+
auth_server_metadata_url: Schema.String.pipe(optional).annotate({
|
|
43
|
+
description: "URL of the OAuth or OpenID Connect authorization server metadata document. Set when the MCP server does not publish protected resource metadata that names its authorization server.",
|
|
44
|
+
}),
|
|
45
|
+
}) {
|
|
46
|
+
}
|
|
47
|
+
export class RemoteConfig extends Schema.Class("Mcp.RemoteConfig")({
|
|
48
|
+
type: Schema.Literal("remote"),
|
|
49
|
+
url: Schema.String,
|
|
50
|
+
headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
|
|
51
|
+
oauth: Schema.Union([OAuthConfig, Schema.Literal(false)]).pipe(optional),
|
|
52
|
+
disabled: Schema.Boolean.pipe(optional),
|
|
53
|
+
codemode: Schema.Boolean.pipe(optional).annotate({
|
|
54
|
+
description: "Expose this server's tools through Code Mode. Defaults to true.",
|
|
55
|
+
}),
|
|
56
|
+
timeout: TimeoutConfig.pipe(optional),
|
|
57
|
+
protocol: Protocol.pipe(optional),
|
|
58
|
+
}) {
|
|
59
|
+
}
|
|
60
|
+
export const ServerConfig = Schema.Union([LocalConfig, RemoteConfig]).pipe(Schema.toTaggedUnion("type"));
|
|
61
|
+
const Connected = Schema.Struct({ status: Schema.Literal("connected") }).annotate({
|
|
62
|
+
identifier: "Mcp.Status.Connected",
|
|
63
|
+
});
|
|
64
|
+
const Pending = Schema.Struct({ status: Schema.Literal("pending") }).annotate({
|
|
65
|
+
identifier: "Mcp.Status.Pending",
|
|
66
|
+
});
|
|
67
|
+
const Disabled = Schema.Struct({ status: Schema.Literal("disabled") }).annotate({
|
|
68
|
+
identifier: "Mcp.Status.Disabled",
|
|
69
|
+
});
|
|
70
|
+
const Failed = Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String }).annotate({
|
|
71
|
+
identifier: "Mcp.Status.Failed",
|
|
72
|
+
});
|
|
73
|
+
const NeedsAuth = Schema.Struct({ status: Schema.Literal("needs_auth"), error: Schema.String }).annotate({
|
|
74
|
+
identifier: "Mcp.Status.NeedsAuth",
|
|
75
|
+
});
|
|
76
|
+
export const Status = Schema.Union([Connected, Pending, Disabled, Failed, NeedsAuth]).pipe(Schema.toTaggedUnion("status"));
|
|
77
|
+
export const Server = Schema.Struct({
|
|
78
|
+
name: Schema.String,
|
|
79
|
+
status: Status,
|
|
80
|
+
// Set for remote servers registered as OAuth integrations; lets clients act on the right integration
|
|
81
|
+
// without matching by name, which could collide with provider or plugin integrations.
|
|
82
|
+
integrationID: optional(IntegrationID),
|
|
83
|
+
}).annotate({ identifier: "Mcp.Server" });
|
|
84
|
+
export const Resource = Schema.Struct({
|
|
85
|
+
server: Schema.String,
|
|
86
|
+
name: Schema.String,
|
|
87
|
+
uri: Schema.String,
|
|
88
|
+
description: optional(Schema.String),
|
|
89
|
+
mimeType: optional(Schema.String),
|
|
90
|
+
}).annotate({ identifier: "Mcp.Resource" });
|
|
91
|
+
export const ResourceTemplate = Schema.Struct({
|
|
92
|
+
server: Schema.String,
|
|
93
|
+
name: Schema.String,
|
|
94
|
+
uriTemplate: Schema.String,
|
|
95
|
+
description: optional(Schema.String),
|
|
96
|
+
mimeType: optional(Schema.String),
|
|
97
|
+
}).annotate({ identifier: "Mcp.ResourceTemplate" });
|
|
98
|
+
export const ResourceCatalog = Schema.Struct({
|
|
99
|
+
resources: Schema.Array(Resource),
|
|
100
|
+
templates: Schema.Array(ResourceTemplate),
|
|
101
|
+
}).annotate({ identifier: "Mcp.ResourceCatalog" });
|
|
102
|
+
export const ResourceContentPart = Schema.Union([
|
|
103
|
+
Schema.Struct({
|
|
104
|
+
type: Schema.Literal("text"),
|
|
105
|
+
uri: Schema.String,
|
|
106
|
+
text: Schema.String,
|
|
107
|
+
mimeType: optional(Schema.String),
|
|
108
|
+
}),
|
|
109
|
+
Schema.Struct({
|
|
110
|
+
type: Schema.Literal("blob"),
|
|
111
|
+
uri: Schema.String,
|
|
112
|
+
blob: Schema.String,
|
|
113
|
+
mimeType: optional(Schema.String),
|
|
114
|
+
}),
|
|
115
|
+
]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Mcp.ResourceContentPart" }));
|
|
116
|
+
export const ResourceContent = Schema.Struct({
|
|
117
|
+
server: Schema.String,
|
|
118
|
+
uri: Schema.String,
|
|
119
|
+
contents: Schema.Array(ResourceContentPart),
|
|
120
|
+
}).annotate({ identifier: "Mcp.ResourceContent" });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export type ReasoningField = "reasoning" | "reasoning_content" | "reasoning_text" | (string & {});
|
|
3
|
+
export declare const ReasoningField: Schema.Codec<ReasoningField>;
|
|
4
|
+
export declare const MaxTokensField: Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>;
|
|
5
|
+
export type MaxTokensField = typeof MaxTokensField.Type;
|
|
6
|
+
export declare const CacheFormat: Schema.Literals<readonly ["anthropic", "alibaba"]>;
|
|
7
|
+
export type CacheFormat = typeof CacheFormat.Type;
|
|
8
|
+
export interface Compatibility extends Schema.Schema.Type<typeof Compatibility> {
|
|
9
|
+
}
|
|
10
|
+
export declare const Compatibility: Schema.Struct<{
|
|
11
|
+
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
12
|
+
/** Require every assistant message to include its reasoning field, even when empty. */
|
|
13
|
+
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
14
|
+
readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
|
|
15
|
+
readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
16
|
+
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
17
|
+
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
18
|
+
/** Request usage in the stream with `stream_options.include_usage`. Defaults to true. */
|
|
19
|
+
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
20
|
+
/** Prompt-cache marker syntax the endpoint accepts. Overrides the route default; both send `cache_control`, and `alibaba` skips tool definitions. */
|
|
21
|
+
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
22
|
+
/** Supports Anthropic's thinking-prefix mismatch controls. Overrides model-ID detection. */
|
|
23
|
+
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
24
|
+
/** Supports per-message effort updates. Overrides model-ID detection. */
|
|
25
|
+
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
26
|
+
}>;
|
|
27
|
+
export interface ProviderCompatibility extends Schema.Schema.Type<typeof ProviderCompatibility> {
|
|
28
|
+
}
|
|
29
|
+
export declare const ProviderCompatibility: Schema.Struct<{
|
|
30
|
+
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
31
|
+
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
32
|
+
readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
|
|
33
|
+
readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
34
|
+
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
35
|
+
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
36
|
+
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
37
|
+
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schema, Struct } from "effect";
|
|
2
|
+
import { optional } from "./schema.js";
|
|
3
|
+
export const ReasoningField = Schema.Union([
|
|
4
|
+
Schema.Literals(["reasoning", "reasoning_content", "reasoning_text"]),
|
|
5
|
+
Schema.String,
|
|
6
|
+
]).annotate({ identifier: "Model.ReasoningField" });
|
|
7
|
+
export const MaxTokensField = Schema.Literals(["max_completion_tokens", "max_tokens"]).annotate({
|
|
8
|
+
identifier: "Model.MaxTokensField",
|
|
9
|
+
});
|
|
10
|
+
export const CacheFormat = Schema.Literals(["anthropic", "alibaba"]).annotate({ identifier: "Model.CacheFormat" });
|
|
11
|
+
export const Compatibility = Schema.Struct({
|
|
12
|
+
reasoningField: ReasoningField.pipe(optional),
|
|
13
|
+
/** Require every assistant message to include its reasoning field, even when empty. */
|
|
14
|
+
requireReasoning: Schema.Boolean.pipe(optional),
|
|
15
|
+
maxTokensField: MaxTokensField.pipe(optional),
|
|
16
|
+
requireFinishReason: Schema.Boolean.pipe(optional),
|
|
17
|
+
requireAssistantAfterTool: Schema.Boolean.pipe(optional),
|
|
18
|
+
supportsPromptCacheKey: Schema.Boolean.pipe(optional),
|
|
19
|
+
/** Request usage in the stream with `stream_options.include_usage`. Defaults to true. */
|
|
20
|
+
streamUsage: Schema.Boolean.pipe(optional),
|
|
21
|
+
/** Prompt-cache marker syntax the endpoint accepts. Overrides the route default; both send `cache_control`, and `alibaba` skips tool definitions. */
|
|
22
|
+
cacheFormat: CacheFormat.pipe(optional),
|
|
23
|
+
/** Supports Anthropic's thinking-prefix mismatch controls. Overrides model-ID detection. */
|
|
24
|
+
supportsThinkingBlockBinding: Schema.Boolean.pipe(optional),
|
|
25
|
+
/** Supports per-message effort updates. Overrides model-ID detection. */
|
|
26
|
+
supportsEffortUpdates: Schema.Boolean.pipe(optional),
|
|
27
|
+
}).annotate({ identifier: "Model.Compatibility" });
|
|
28
|
+
export const ProviderCompatibility = Schema.Struct(Struct.omit(Compatibility.fields, ["supportsThinkingBlockBinding", "supportsEffortUpdates"])).annotate({ identifier: "Provider.Compatibility" });
|
package/dist/model.d.ts
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
export * as Model from "./model.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Provider } from "./provider.js";
|
|
4
|
+
import { Compatibility, MaxTokensField, ReasoningField } from "./model-compatibility.js";
|
|
5
|
+
export declare const ID: Schema.brand<Schema.String, "Model.ID">;
|
|
6
|
+
export type ID = typeof ID.Type;
|
|
7
|
+
export declare const Event: {
|
|
8
|
+
Updated: Schema.Struct<{
|
|
9
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
11
|
+
};
|
|
12
|
+
readonly created: Schema.Finite;
|
|
13
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14
|
+
readonly type: Schema.Literal<"model.updated">;
|
|
15
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
16
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
18
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
19
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
20
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
21
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
22
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
23
|
+
}>, never, never>;
|
|
24
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
25
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
26
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
27
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
28
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
29
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
30
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
31
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
32
|
+
}>, never, never>;
|
|
33
|
+
}>>, never, never>;
|
|
34
|
+
readonly data: Schema.Struct<{}>;
|
|
35
|
+
}> & {
|
|
36
|
+
type: "model.updated";
|
|
37
|
+
durability: "ephemeral";
|
|
38
|
+
durable: undefined;
|
|
39
|
+
data: Schema.Struct<{}>;
|
|
40
|
+
};
|
|
41
|
+
Definitions: readonly [Schema.Struct<{
|
|
42
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
43
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
44
|
+
};
|
|
45
|
+
readonly created: Schema.Finite;
|
|
46
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
47
|
+
readonly type: Schema.Literal<"model.updated">;
|
|
48
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
49
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
50
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
51
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
52
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
53
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
54
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
55
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
56
|
+
}>, never, never>;
|
|
57
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
58
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
59
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
60
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
61
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
62
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
63
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
64
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
65
|
+
}>, never, never>;
|
|
66
|
+
}>>, never, never>;
|
|
67
|
+
readonly data: Schema.Struct<{}>;
|
|
68
|
+
}> & {
|
|
69
|
+
type: "model.updated";
|
|
70
|
+
durability: "ephemeral";
|
|
71
|
+
durable: undefined;
|
|
72
|
+
data: Schema.Struct<{}>;
|
|
73
|
+
}];
|
|
74
|
+
};
|
|
75
|
+
export declare const VariantID: Schema.brand<Schema.String, "Model.VariantID">;
|
|
76
|
+
export type VariantID = typeof VariantID.Type;
|
|
77
|
+
export declare const Ref: Schema.Struct<{
|
|
78
|
+
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
|
79
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
80
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
81
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
82
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
83
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
84
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
85
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
86
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
87
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
88
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
89
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
90
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
91
|
+
};
|
|
92
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
93
|
+
}> & {
|
|
94
|
+
parse: (input: string) => {
|
|
95
|
+
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
96
|
+
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
97
|
+
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export interface Ref extends Schema.Schema.Type<typeof Ref> {
|
|
101
|
+
}
|
|
102
|
+
export { Compatibility, MaxTokensField, ReasoningField };
|
|
103
|
+
export declare const Family: Schema.brand<Schema.String, "Model.Family">;
|
|
104
|
+
export type Family = typeof Family.Type;
|
|
105
|
+
export declare const Settings: Schema.StructWithRest<Schema.Struct<{
|
|
106
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
107
|
+
readonly type: Schema.Literal<"summary">;
|
|
108
|
+
}>, Schema.Struct<{
|
|
109
|
+
readonly type: Schema.Literal<"native">;
|
|
110
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
111
|
+
readonly type: Schema.Literal<"summary">;
|
|
112
|
+
}>, Schema.Struct<{
|
|
113
|
+
readonly type: Schema.Literal<"native">;
|
|
114
|
+
}>]>>, never, never>;
|
|
115
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
116
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>;
|
|
117
|
+
export type Settings = typeof Settings.Type;
|
|
118
|
+
export declare const Overlays: {
|
|
119
|
+
settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
120
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
121
|
+
readonly type: Schema.Literal<"summary">;
|
|
122
|
+
}>, Schema.Struct<{
|
|
123
|
+
readonly type: Schema.Literal<"native">;
|
|
124
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
125
|
+
readonly type: Schema.Literal<"summary">;
|
|
126
|
+
}>, Schema.Struct<{
|
|
127
|
+
readonly type: Schema.Literal<"native">;
|
|
128
|
+
}>]>>, never, never>;
|
|
129
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
130
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
131
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
132
|
+
readonly type: Schema.Literal<"summary">;
|
|
133
|
+
}>, Schema.Struct<{
|
|
134
|
+
readonly type: Schema.Literal<"native">;
|
|
135
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
136
|
+
readonly type: Schema.Literal<"summary">;
|
|
137
|
+
}>, Schema.Struct<{
|
|
138
|
+
readonly type: Schema.Literal<"native">;
|
|
139
|
+
}>]>>, never, never>;
|
|
140
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
141
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
142
|
+
headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
143
|
+
body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
144
|
+
};
|
|
145
|
+
export interface Capabilities extends Schema.Schema.Type<typeof Capabilities> {
|
|
146
|
+
}
|
|
147
|
+
export declare const Capabilities: Schema.Struct<{
|
|
148
|
+
readonly tools: Schema.Boolean;
|
|
149
|
+
readonly input: Schema.$Array<Schema.String>;
|
|
150
|
+
readonly output: Schema.$Array<Schema.String>;
|
|
151
|
+
/** Whether the model accepts a sampling temperature. Unknown when unset. */
|
|
152
|
+
readonly temperature: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
153
|
+
}> & {
|
|
154
|
+
default: () => {
|
|
155
|
+
tools: true;
|
|
156
|
+
input: string[];
|
|
157
|
+
output: string[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export interface Cost extends Schema.Schema.Type<typeof Cost> {
|
|
161
|
+
}
|
|
162
|
+
export declare const Cost: Schema.Struct<{
|
|
163
|
+
readonly tier: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
164
|
+
readonly type: Schema.tag<"context">;
|
|
165
|
+
readonly size: Schema.Int;
|
|
166
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
167
|
+
readonly type: Schema.tag<"context">;
|
|
168
|
+
readonly size: Schema.Int;
|
|
169
|
+
}>>, never, never>;
|
|
170
|
+
readonly input: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
171
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
172
|
+
};
|
|
173
|
+
readonly output: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
174
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
175
|
+
};
|
|
176
|
+
readonly cache: Schema.Struct<{
|
|
177
|
+
readonly read: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
178
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
179
|
+
};
|
|
180
|
+
readonly write: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
181
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
182
|
+
};
|
|
183
|
+
}>;
|
|
184
|
+
}>;
|
|
185
|
+
export interface Variant extends Schema.Schema.Type<typeof Variant> {
|
|
186
|
+
}
|
|
187
|
+
export declare const Variant: Schema.Struct<{
|
|
188
|
+
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
189
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
190
|
+
readonly type: Schema.Literal<"summary">;
|
|
191
|
+
}>, Schema.Struct<{
|
|
192
|
+
readonly type: Schema.Literal<"native">;
|
|
193
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
194
|
+
readonly type: Schema.Literal<"summary">;
|
|
195
|
+
}>, Schema.Struct<{
|
|
196
|
+
readonly type: Schema.Literal<"native">;
|
|
197
|
+
}>]>>, never, never>;
|
|
198
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
199
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
200
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
201
|
+
readonly type: Schema.Literal<"summary">;
|
|
202
|
+
}>, Schema.Struct<{
|
|
203
|
+
readonly type: Schema.Literal<"native">;
|
|
204
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
205
|
+
readonly type: Schema.Literal<"summary">;
|
|
206
|
+
}>, Schema.Struct<{
|
|
207
|
+
readonly type: Schema.Literal<"native">;
|
|
208
|
+
}>]>>, never, never>;
|
|
209
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
210
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
211
|
+
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
212
|
+
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
213
|
+
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
214
|
+
}>;
|
|
215
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
216
|
+
}
|
|
217
|
+
export declare const Info: Schema.Struct<{
|
|
218
|
+
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
219
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
220
|
+
readonly type: Schema.Literal<"summary">;
|
|
221
|
+
}>, Schema.Struct<{
|
|
222
|
+
readonly type: Schema.Literal<"native">;
|
|
223
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
224
|
+
readonly type: Schema.Literal<"summary">;
|
|
225
|
+
}>, Schema.Struct<{
|
|
226
|
+
readonly type: Schema.Literal<"native">;
|
|
227
|
+
}>]>>, never, never>;
|
|
228
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
229
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
230
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
231
|
+
readonly type: Schema.Literal<"summary">;
|
|
232
|
+
}>, Schema.Struct<{
|
|
233
|
+
readonly type: Schema.Literal<"native">;
|
|
234
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
235
|
+
readonly type: Schema.Literal<"summary">;
|
|
236
|
+
}>, Schema.Struct<{
|
|
237
|
+
readonly type: Schema.Literal<"native">;
|
|
238
|
+
}>]>>, never, never>;
|
|
239
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
240
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
241
|
+
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
242
|
+
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
243
|
+
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
|
244
|
+
readonly modelID: Schema.brand<Schema.String, "Model.ID">;
|
|
245
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
246
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
247
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
248
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
249
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
250
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
251
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
252
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
253
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
254
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
255
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
256
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
257
|
+
};
|
|
258
|
+
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
|
|
259
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
260
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
261
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
262
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
263
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
264
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
265
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
266
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
267
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
268
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
269
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
270
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
|
|
271
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
272
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
273
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
274
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
275
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
276
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
277
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
278
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
279
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
280
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
281
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
282
|
+
}>, never, never>;
|
|
283
|
+
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
|
|
284
|
+
readonly name: Schema.String;
|
|
285
|
+
readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
286
|
+
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
287
|
+
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
288
|
+
readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
|
|
289
|
+
readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
290
|
+
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
291
|
+
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
292
|
+
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
293
|
+
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
294
|
+
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
295
|
+
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
296
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
297
|
+
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
298
|
+
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
299
|
+
readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
|
|
300
|
+
readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
301
|
+
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
302
|
+
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
303
|
+
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
304
|
+
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
305
|
+
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
306
|
+
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
307
|
+
}>>, never, never>;
|
|
308
|
+
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
309
|
+
readonly capabilities: Schema.Struct<{
|
|
310
|
+
readonly tools: Schema.Boolean;
|
|
311
|
+
readonly input: Schema.$Array<Schema.String>;
|
|
312
|
+
readonly output: Schema.$Array<Schema.String>;
|
|
313
|
+
/** Whether the model accepts a sampling temperature. Unknown when unset. */
|
|
314
|
+
readonly temperature: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
315
|
+
}> & {
|
|
316
|
+
default: () => {
|
|
317
|
+
tools: true;
|
|
318
|
+
input: string[];
|
|
319
|
+
output: string[];
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly variants: Schema.$Array<Schema.Struct<{
|
|
323
|
+
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
324
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
325
|
+
readonly type: Schema.Literal<"summary">;
|
|
326
|
+
}>, Schema.Struct<{
|
|
327
|
+
readonly type: Schema.Literal<"native">;
|
|
328
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
329
|
+
readonly type: Schema.Literal<"summary">;
|
|
330
|
+
}>, Schema.Struct<{
|
|
331
|
+
readonly type: Schema.Literal<"native">;
|
|
332
|
+
}>]>>, never, never>;
|
|
333
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
334
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
335
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
336
|
+
readonly type: Schema.Literal<"summary">;
|
|
337
|
+
}>, Schema.Struct<{
|
|
338
|
+
readonly type: Schema.Literal<"native">;
|
|
339
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
340
|
+
readonly type: Schema.Literal<"summary">;
|
|
341
|
+
}>, Schema.Struct<{
|
|
342
|
+
readonly type: Schema.Literal<"native">;
|
|
343
|
+
}>]>>, never, never>;
|
|
344
|
+
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
345
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
346
|
+
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
347
|
+
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
348
|
+
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
349
|
+
}>>;
|
|
350
|
+
readonly time: Schema.Struct<{
|
|
351
|
+
readonly released: Schema.Finite;
|
|
352
|
+
}>;
|
|
353
|
+
readonly cost: Schema.$Array<Schema.Struct<{
|
|
354
|
+
readonly tier: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
355
|
+
readonly type: Schema.tag<"context">;
|
|
356
|
+
readonly size: Schema.Int;
|
|
357
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
358
|
+
readonly type: Schema.tag<"context">;
|
|
359
|
+
readonly size: Schema.Int;
|
|
360
|
+
}>>, never, never>;
|
|
361
|
+
readonly input: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
362
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
363
|
+
};
|
|
364
|
+
readonly output: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
365
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
366
|
+
};
|
|
367
|
+
readonly cache: Schema.Struct<{
|
|
368
|
+
readonly read: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
369
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
370
|
+
};
|
|
371
|
+
readonly write: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
372
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
373
|
+
};
|
|
374
|
+
}>;
|
|
375
|
+
}>>;
|
|
376
|
+
readonly status: Schema.Literals<readonly ["alpha", "beta", "deprecated", "active"]>;
|
|
377
|
+
readonly enabled: Schema.Boolean;
|
|
378
|
+
readonly limit: Schema.Struct<{
|
|
379
|
+
readonly context: Schema.Int;
|
|
380
|
+
readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
381
|
+
readonly output: Schema.Int;
|
|
382
|
+
}>;
|
|
383
|
+
}> & {
|
|
384
|
+
default: (providerID: Provider.ID, id: ID) => {
|
|
385
|
+
id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
386
|
+
modelID: string & import("effect/Brand").Brand<"Model.ID">;
|
|
387
|
+
providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
388
|
+
name: string & import("effect/Brand").Brand<"Model.ID">;
|
|
389
|
+
capabilities: {
|
|
390
|
+
tools: true;
|
|
391
|
+
input: string[];
|
|
392
|
+
output: string[];
|
|
393
|
+
};
|
|
394
|
+
variants: never[];
|
|
395
|
+
time: {
|
|
396
|
+
released: number;
|
|
397
|
+
};
|
|
398
|
+
cost: never[];
|
|
399
|
+
status: "active";
|
|
400
|
+
enabled: true;
|
|
401
|
+
limit: {
|
|
402
|
+
context: number;
|
|
403
|
+
output: number;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|