@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,346 @@
|
|
|
1
|
+
export * as Permission from "./permission.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
4
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
5
|
+
};
|
|
6
|
+
export type ID = typeof ID.Type;
|
|
7
|
+
export declare const Source: Schema.Union<readonly [Schema.Struct<{
|
|
8
|
+
readonly type: Schema.Literal<"tool">;
|
|
9
|
+
readonly messageID: Schema.String;
|
|
10
|
+
readonly callID: Schema.String;
|
|
11
|
+
}>]>;
|
|
12
|
+
export type Source = typeof Source.Type;
|
|
13
|
+
export declare const Request: Schema.Struct<{
|
|
14
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
15
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
16
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
17
|
+
};
|
|
18
|
+
readonly action: Schema.String;
|
|
19
|
+
readonly resources: Schema.$Array<Schema.String>;
|
|
20
|
+
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
21
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
22
|
+
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
23
|
+
readonly type: Schema.Literal<"tool">;
|
|
24
|
+
readonly messageID: Schema.String;
|
|
25
|
+
readonly callID: Schema.String;
|
|
26
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
27
|
+
readonly type: Schema.Literal<"tool">;
|
|
28
|
+
readonly messageID: Schema.String;
|
|
29
|
+
readonly callID: Schema.String;
|
|
30
|
+
}>]>>, never, never>;
|
|
31
|
+
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
32
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export interface Request extends Schema.Schema.Type<typeof Request> {
|
|
36
|
+
}
|
|
37
|
+
export declare const Reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
38
|
+
export type Reply = typeof Reply.Type;
|
|
39
|
+
export declare const Event: {
|
|
40
|
+
Asked: Schema.Struct<{
|
|
41
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
42
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
43
|
+
};
|
|
44
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
45
|
+
readonly type: Schema.Literal<"permission.v2.asked">;
|
|
46
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
47
|
+
readonly aggregateID: Schema.String;
|
|
48
|
+
readonly seq: Schema.Int;
|
|
49
|
+
readonly version: Schema.Int;
|
|
50
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
51
|
+
readonly aggregateID: Schema.String;
|
|
52
|
+
readonly seq: Schema.Int;
|
|
53
|
+
readonly version: Schema.Int;
|
|
54
|
+
}>>, never, never>;
|
|
55
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
56
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
57
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
58
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
59
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
60
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
61
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
62
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
63
|
+
}>, never, never>;
|
|
64
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
65
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
66
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
67
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
68
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
69
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
70
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
71
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
72
|
+
}>, never, never>;
|
|
73
|
+
}>>, never, never>;
|
|
74
|
+
readonly data: Schema.Struct<{
|
|
75
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
76
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
77
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
78
|
+
};
|
|
79
|
+
readonly action: Schema.String;
|
|
80
|
+
readonly resources: Schema.$Array<Schema.String>;
|
|
81
|
+
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
82
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
83
|
+
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
84
|
+
readonly type: Schema.Literal<"tool">;
|
|
85
|
+
readonly messageID: Schema.String;
|
|
86
|
+
readonly callID: Schema.String;
|
|
87
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
88
|
+
readonly type: Schema.Literal<"tool">;
|
|
89
|
+
readonly messageID: Schema.String;
|
|
90
|
+
readonly callID: Schema.String;
|
|
91
|
+
}>]>>, never, never>;
|
|
92
|
+
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
93
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
94
|
+
};
|
|
95
|
+
}>;
|
|
96
|
+
}> & {
|
|
97
|
+
data: Schema.Struct<{
|
|
98
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
99
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
100
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
101
|
+
};
|
|
102
|
+
readonly action: Schema.String;
|
|
103
|
+
readonly resources: Schema.$Array<Schema.String>;
|
|
104
|
+
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
105
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
106
|
+
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
107
|
+
readonly type: Schema.Literal<"tool">;
|
|
108
|
+
readonly messageID: Schema.String;
|
|
109
|
+
readonly callID: Schema.String;
|
|
110
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
111
|
+
readonly type: Schema.Literal<"tool">;
|
|
112
|
+
readonly messageID: Schema.String;
|
|
113
|
+
readonly callID: Schema.String;
|
|
114
|
+
}>]>>, never, never>;
|
|
115
|
+
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
116
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
117
|
+
};
|
|
118
|
+
}>;
|
|
119
|
+
durable?: {
|
|
120
|
+
readonly version: number;
|
|
121
|
+
readonly aggregate: string;
|
|
122
|
+
} | undefined;
|
|
123
|
+
type: "permission.v2.asked";
|
|
124
|
+
};
|
|
125
|
+
Replied: Schema.Struct<{
|
|
126
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
127
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
128
|
+
};
|
|
129
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
130
|
+
readonly type: Schema.Literal<"permission.v2.replied">;
|
|
131
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
132
|
+
readonly aggregateID: Schema.String;
|
|
133
|
+
readonly seq: Schema.Int;
|
|
134
|
+
readonly version: Schema.Int;
|
|
135
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
136
|
+
readonly aggregateID: Schema.String;
|
|
137
|
+
readonly seq: Schema.Int;
|
|
138
|
+
readonly version: Schema.Int;
|
|
139
|
+
}>>, never, never>;
|
|
140
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
141
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
142
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
143
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
144
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
145
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
146
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
147
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
148
|
+
}>, never, never>;
|
|
149
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
150
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
151
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
152
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
153
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
154
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
155
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
156
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
157
|
+
}>, never, never>;
|
|
158
|
+
}>>, never, never>;
|
|
159
|
+
readonly data: Schema.Struct<{
|
|
160
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
161
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
162
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
163
|
+
};
|
|
164
|
+
readonly requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
165
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
166
|
+
};
|
|
167
|
+
readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
168
|
+
}>;
|
|
169
|
+
}> & {
|
|
170
|
+
data: Schema.Struct<{
|
|
171
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
172
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
173
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
174
|
+
};
|
|
175
|
+
readonly requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
176
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
177
|
+
};
|
|
178
|
+
readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
179
|
+
}>;
|
|
180
|
+
durable?: {
|
|
181
|
+
readonly version: number;
|
|
182
|
+
readonly aggregate: string;
|
|
183
|
+
} | undefined;
|
|
184
|
+
type: "permission.v2.replied";
|
|
185
|
+
};
|
|
186
|
+
Definitions: readonly [Schema.Struct<{
|
|
187
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
188
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
189
|
+
};
|
|
190
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
191
|
+
readonly type: Schema.Literal<"permission.v2.asked">;
|
|
192
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
193
|
+
readonly aggregateID: Schema.String;
|
|
194
|
+
readonly seq: Schema.Int;
|
|
195
|
+
readonly version: Schema.Int;
|
|
196
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
197
|
+
readonly aggregateID: Schema.String;
|
|
198
|
+
readonly seq: Schema.Int;
|
|
199
|
+
readonly version: Schema.Int;
|
|
200
|
+
}>>, never, never>;
|
|
201
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
202
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
203
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
204
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
205
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
206
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
207
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
208
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
209
|
+
}>, never, never>;
|
|
210
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
211
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
212
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<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
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
216
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
217
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
218
|
+
}>, never, never>;
|
|
219
|
+
}>>, never, never>;
|
|
220
|
+
readonly data: Schema.Struct<{
|
|
221
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
222
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
223
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
224
|
+
};
|
|
225
|
+
readonly action: Schema.String;
|
|
226
|
+
readonly resources: Schema.$Array<Schema.String>;
|
|
227
|
+
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
228
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
229
|
+
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
230
|
+
readonly type: Schema.Literal<"tool">;
|
|
231
|
+
readonly messageID: Schema.String;
|
|
232
|
+
readonly callID: Schema.String;
|
|
233
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
234
|
+
readonly type: Schema.Literal<"tool">;
|
|
235
|
+
readonly messageID: Schema.String;
|
|
236
|
+
readonly callID: Schema.String;
|
|
237
|
+
}>]>>, never, never>;
|
|
238
|
+
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
239
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
240
|
+
};
|
|
241
|
+
}>;
|
|
242
|
+
}> & {
|
|
243
|
+
data: Schema.Struct<{
|
|
244
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
245
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
246
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
247
|
+
};
|
|
248
|
+
readonly action: Schema.String;
|
|
249
|
+
readonly resources: Schema.$Array<Schema.String>;
|
|
250
|
+
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
251
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
252
|
+
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
253
|
+
readonly type: Schema.Literal<"tool">;
|
|
254
|
+
readonly messageID: Schema.String;
|
|
255
|
+
readonly callID: Schema.String;
|
|
256
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
257
|
+
readonly type: Schema.Literal<"tool">;
|
|
258
|
+
readonly messageID: Schema.String;
|
|
259
|
+
readonly callID: Schema.String;
|
|
260
|
+
}>]>>, never, never>;
|
|
261
|
+
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
262
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
263
|
+
};
|
|
264
|
+
}>;
|
|
265
|
+
durable?: {
|
|
266
|
+
readonly version: number;
|
|
267
|
+
readonly aggregate: string;
|
|
268
|
+
} | undefined;
|
|
269
|
+
type: "permission.v2.asked";
|
|
270
|
+
}, Schema.Struct<{
|
|
271
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
272
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
273
|
+
};
|
|
274
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
275
|
+
readonly type: Schema.Literal<"permission.v2.replied">;
|
|
276
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
277
|
+
readonly aggregateID: Schema.String;
|
|
278
|
+
readonly seq: Schema.Int;
|
|
279
|
+
readonly version: Schema.Int;
|
|
280
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
281
|
+
readonly aggregateID: Schema.String;
|
|
282
|
+
readonly seq: Schema.Int;
|
|
283
|
+
readonly version: Schema.Int;
|
|
284
|
+
}>>, never, never>;
|
|
285
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
286
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
287
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
288
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
289
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
290
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
291
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
292
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
293
|
+
}>, never, never>;
|
|
294
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
295
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
296
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
297
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
298
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
299
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
300
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
301
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
302
|
+
}>, never, never>;
|
|
303
|
+
}>>, never, never>;
|
|
304
|
+
readonly data: Schema.Struct<{
|
|
305
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
306
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
307
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
308
|
+
};
|
|
309
|
+
readonly requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
310
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
311
|
+
};
|
|
312
|
+
readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
313
|
+
}>;
|
|
314
|
+
}> & {
|
|
315
|
+
data: Schema.Struct<{
|
|
316
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
317
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
318
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
319
|
+
};
|
|
320
|
+
readonly requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
321
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
322
|
+
};
|
|
323
|
+
readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
324
|
+
}>;
|
|
325
|
+
durable?: {
|
|
326
|
+
readonly version: number;
|
|
327
|
+
readonly aggregate: string;
|
|
328
|
+
} | undefined;
|
|
329
|
+
type: "permission.v2.replied";
|
|
330
|
+
}];
|
|
331
|
+
};
|
|
332
|
+
export declare const Effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
333
|
+
export type Effect = typeof Effect.Type;
|
|
334
|
+
export interface Rule extends Schema.Schema.Type<typeof Rule> {
|
|
335
|
+
}
|
|
336
|
+
export declare const Rule: Schema.Struct<{
|
|
337
|
+
readonly action: Schema.String;
|
|
338
|
+
readonly resource: Schema.String;
|
|
339
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
340
|
+
}>;
|
|
341
|
+
export declare const Ruleset: Schema.$Array<Schema.Struct<{
|
|
342
|
+
readonly action: Schema.String;
|
|
343
|
+
readonly resource: Schema.String;
|
|
344
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
345
|
+
}>>;
|
|
346
|
+
export type Ruleset = typeof Ruleset.Type;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export * as Permission from "./permission.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { define, inventory } from "./event.js";
|
|
5
|
+
import { ascending } from "./identifier.js";
|
|
6
|
+
import { SessionID } from "./session-id.js";
|
|
7
|
+
import { statics } from "./schema.js";
|
|
8
|
+
export const ID = Schema.String.check(Schema.isStartsWith("per")).pipe(Schema.brand("PermissionV2.ID"), statics((schema) => ({ create: (id) => schema.make(id ?? "per_" + ascending()) })));
|
|
9
|
+
export const Source = Schema.Union([
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
type: Schema.Literal("tool"),
|
|
12
|
+
messageID: Schema.String,
|
|
13
|
+
callID: Schema.String,
|
|
14
|
+
}),
|
|
15
|
+
]).annotate({ identifier: "PermissionV2.Source" });
|
|
16
|
+
const RequestFields = {
|
|
17
|
+
sessionID: SessionID,
|
|
18
|
+
action: Schema.String,
|
|
19
|
+
resources: Schema.Array(Schema.String),
|
|
20
|
+
save: Schema.Array(Schema.String).pipe(optional),
|
|
21
|
+
metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
|
|
22
|
+
source: Source.pipe(optional),
|
|
23
|
+
};
|
|
24
|
+
export const Request = Schema.Struct({
|
|
25
|
+
id: ID,
|
|
26
|
+
...RequestFields,
|
|
27
|
+
}).annotate({ identifier: "PermissionV2.Request" });
|
|
28
|
+
export const Reply = Schema.Literals(["once", "always", "reject"]).annotate({ identifier: "PermissionV2.Reply" });
|
|
29
|
+
const Asked = define({ type: "permission.v2.asked", schema: Request.fields });
|
|
30
|
+
const Replied = define({
|
|
31
|
+
type: "permission.v2.replied",
|
|
32
|
+
schema: {
|
|
33
|
+
sessionID: SessionID,
|
|
34
|
+
requestID: ID,
|
|
35
|
+
reply: Reply,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
export const Event = { Asked, Replied, Definitions: inventory(Asked, Replied) };
|
|
39
|
+
export const Effect = Schema.Literals(["allow", "deny", "ask"]).annotate({ identifier: "PermissionV2.Effect" });
|
|
40
|
+
export const Rule = Schema.Struct({
|
|
41
|
+
action: Schema.String,
|
|
42
|
+
resource: Schema.String,
|
|
43
|
+
effect: Effect,
|
|
44
|
+
}).annotate({ identifier: "PermissionV2.Rule" });
|
|
45
|
+
export const Ruleset = Schema.Array(Rule).annotate({ identifier: "PermissionV2.Ruleset" });
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export * as Plugin from "./plugin.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ID: Schema.brand<Schema.String, "Plugin.ID">;
|
|
4
|
+
export type ID = typeof ID.Type;
|
|
5
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
6
|
+
}
|
|
7
|
+
export declare const Info: Schema.Struct<{
|
|
8
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const Event: {
|
|
11
|
+
Added: Schema.Struct<{
|
|
12
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
13
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
14
|
+
};
|
|
15
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
16
|
+
readonly type: Schema.Literal<"plugin.added">;
|
|
17
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
18
|
+
readonly aggregateID: Schema.String;
|
|
19
|
+
readonly seq: Schema.Int;
|
|
20
|
+
readonly version: Schema.Int;
|
|
21
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
22
|
+
readonly aggregateID: Schema.String;
|
|
23
|
+
readonly seq: Schema.Int;
|
|
24
|
+
readonly version: Schema.Int;
|
|
25
|
+
}>>, never, never>;
|
|
26
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
27
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
28
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<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
|
+
}>>, Schema.optionalKey<Schema.brand<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
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
36
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
37
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
38
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
39
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
40
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
41
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
42
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
43
|
+
}>, never, never>;
|
|
44
|
+
}>>, never, never>;
|
|
45
|
+
readonly data: Schema.Struct<{
|
|
46
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
47
|
+
}>;
|
|
48
|
+
}> & {
|
|
49
|
+
data: Schema.Struct<{
|
|
50
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
51
|
+
}>;
|
|
52
|
+
durable?: {
|
|
53
|
+
readonly version: number;
|
|
54
|
+
readonly aggregate: string;
|
|
55
|
+
} | undefined;
|
|
56
|
+
type: "plugin.added";
|
|
57
|
+
};
|
|
58
|
+
Definitions: readonly [Schema.Struct<{
|
|
59
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
60
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
61
|
+
};
|
|
62
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
63
|
+
readonly type: Schema.Literal<"plugin.added">;
|
|
64
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
65
|
+
readonly aggregateID: Schema.String;
|
|
66
|
+
readonly seq: Schema.Int;
|
|
67
|
+
readonly version: Schema.Int;
|
|
68
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
69
|
+
readonly aggregateID: Schema.String;
|
|
70
|
+
readonly seq: Schema.Int;
|
|
71
|
+
readonly version: Schema.Int;
|
|
72
|
+
}>>, never, never>;
|
|
73
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
74
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
75
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
76
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
77
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
78
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
79
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
80
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
81
|
+
}>, never, never>;
|
|
82
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
83
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
84
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
85
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
86
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
87
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
88
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
89
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
90
|
+
}>, never, never>;
|
|
91
|
+
}>>, never, never>;
|
|
92
|
+
readonly data: Schema.Struct<{
|
|
93
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
94
|
+
}>;
|
|
95
|
+
}> & {
|
|
96
|
+
data: Schema.Struct<{
|
|
97
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
98
|
+
}>;
|
|
99
|
+
durable?: {
|
|
100
|
+
readonly version: number;
|
|
101
|
+
readonly aggregate: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
type: "plugin.added";
|
|
104
|
+
}];
|
|
105
|
+
};
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * as Plugin from "./plugin.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { define, inventory } from "./event.js";
|
|
4
|
+
export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"));
|
|
5
|
+
export const Info = Schema.Struct({
|
|
6
|
+
id: ID,
|
|
7
|
+
}).annotate({ identifier: "Plugin.Info" });
|
|
8
|
+
const Added = define({
|
|
9
|
+
type: "plugin.added",
|
|
10
|
+
schema: { id: ID },
|
|
11
|
+
});
|
|
12
|
+
export const Event = { Added, Definitions: inventory(Added) };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * as ProjectCopy from "./project-copy.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const StrategyID: Schema.brand<Schema.Trim, "ProjectCopy.StrategyID">;
|
|
4
|
+
export type StrategyID = typeof StrategyID.Type;
|
|
5
|
+
export declare const CreateInput: Schema.Struct<{
|
|
6
|
+
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
7
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
8
|
+
};
|
|
9
|
+
readonly strategy: Schema.brand<Schema.Trim, "ProjectCopy.StrategyID">;
|
|
10
|
+
readonly sourceDirectory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
11
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
12
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
13
|
+
}>;
|
|
14
|
+
export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
|
|
15
|
+
}
|
|
16
|
+
export declare const RemoveInput: Schema.Struct<{
|
|
17
|
+
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
18
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
19
|
+
};
|
|
20
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
21
|
+
readonly force: Schema.Boolean;
|
|
22
|
+
}>;
|
|
23
|
+
export interface RemoveInput extends Schema.Schema.Type<typeof RemoveInput> {
|
|
24
|
+
}
|
|
25
|
+
export declare const Copy: Schema.Struct<{
|
|
26
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
27
|
+
}>;
|
|
28
|
+
export interface Copy extends Schema.Schema.Type<typeof Copy> {
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * as ProjectCopy from "./project-copy.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { ProjectID } from "./project-id.js";
|
|
5
|
+
import { AbsolutePath } from "./schema.js";
|
|
6
|
+
export const StrategyID = Schema.Trim.pipe(Schema.check(Schema.isNonEmpty()), Schema.brand("ProjectCopy.StrategyID"));
|
|
7
|
+
export const CreateInput = Schema.Struct({
|
|
8
|
+
projectID: ProjectID,
|
|
9
|
+
strategy: StrategyID,
|
|
10
|
+
sourceDirectory: AbsolutePath,
|
|
11
|
+
directory: AbsolutePath,
|
|
12
|
+
name: optional(Schema.String),
|
|
13
|
+
}).annotate({ identifier: "ProjectCopy.CreateInput" });
|
|
14
|
+
export const RemoveInput = Schema.Struct({
|
|
15
|
+
projectID: ProjectID,
|
|
16
|
+
directory: AbsolutePath,
|
|
17
|
+
force: Schema.Boolean,
|
|
18
|
+
}).annotate({ identifier: "ProjectCopy.RemoveInput" });
|
|
19
|
+
export const Copy = Schema.Struct({
|
|
20
|
+
directory: AbsolutePath,
|
|
21
|
+
}).annotate({ identifier: "ProjectCopy.Copy" });
|