Open History to see the last commit
1import * as Schema from "effect/Schema";
2
3import { TrimmedNonEmptyString } from "./baseSchemas.ts";
4
5export const ProviderApprovalPolicy = Schema.Literals([
6 "untrusted",
7 "on-failure",
8 "on-request",
9 "never",
10]);
11export type ProviderApprovalPolicy = typeof ProviderApprovalPolicy.Type;
12
13export const ProviderSandboxMode = Schema.Literals([
14 "read-only",
15 "workspace-write",
16 "danger-full-access",
17]);
18export type ProviderSandboxMode = typeof ProviderSandboxMode.Type;
19
20export const RuntimeMode = Schema.Literals([
21 "approval-required",
22 "auto-accept-edits",
23 "auto",
24 "full-access",
25]);
26export type RuntimeMode = typeof RuntimeMode.Type;
27export const DEFAULT_RUNTIME_MODE: RuntimeMode = "full-access";
28
29export const ProviderInteractionMode = Schema.Literals(["default", "plan"]);
30export type ProviderInteractionMode = typeof ProviderInteractionMode.Type;
31export const DEFAULT_PROVIDER_INTERACTION_MODE: ProviderInteractionMode = "default";
32
33export const ProviderRequestKind = Schema.Literals([
34 "command",
35 "file-read",
36 "file-change",
37 "mcp-elicitation",
38]);
39export type ProviderRequestKind = typeof ProviderRequestKind.Type;
40
41export const AssistantDeliveryMode = Schema.Literals(["buffered", "streaming"]);
42export type AssistantDeliveryMode = typeof AssistantDeliveryMode.Type;
43
44export const ProviderApprovalDecision = Schema.Literals([
45 "accept",
46 "acceptForSession",
47 "acceptAlways",
48 "decline",
49 "cancel",
50]);
51export type ProviderApprovalDecision = typeof ProviderApprovalDecision.Type;
52
53export const ProviderApprovalOption = Schema.Struct({
54 decision: ProviderApprovalDecision,
55 label: TrimmedNonEmptyString,
56});
57export type ProviderApprovalOption = typeof ProviderApprovalOption.Type;
58
59export const ProviderUserInputAnswers = Schema.Record(Schema.String, Schema.Unknown);
60export type ProviderUserInputAnswers = typeof ProviderUserInputAnswers.Type;