@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,140 @@
|
|
|
1
|
+
export * as Reference from "./reference.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const Event: {
|
|
4
|
+
Updated: Schema.Struct<{
|
|
5
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
7
|
+
};
|
|
8
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
9
|
+
readonly type: Schema.Literal<"reference.updated">;
|
|
10
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
11
|
+
readonly aggregateID: Schema.String;
|
|
12
|
+
readonly seq: Schema.Int;
|
|
13
|
+
readonly version: Schema.Int;
|
|
14
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
15
|
+
readonly aggregateID: Schema.String;
|
|
16
|
+
readonly seq: Schema.Int;
|
|
17
|
+
readonly version: Schema.Int;
|
|
18
|
+
}>>, never, never>;
|
|
19
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
20
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
21
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
22
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
23
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
24
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
25
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
26
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
27
|
+
}>, never, never>;
|
|
28
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
29
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
30
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
31
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
32
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
33
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
34
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
35
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
36
|
+
}>, never, never>;
|
|
37
|
+
}>>, never, never>;
|
|
38
|
+
readonly data: Schema.Struct<{}>;
|
|
39
|
+
}> & {
|
|
40
|
+
data: Schema.Struct<{}>;
|
|
41
|
+
durable?: {
|
|
42
|
+
readonly version: number;
|
|
43
|
+
readonly aggregate: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
type: "reference.updated";
|
|
46
|
+
};
|
|
47
|
+
Definitions: readonly [Schema.Struct<{
|
|
48
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
49
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
50
|
+
};
|
|
51
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
52
|
+
readonly type: Schema.Literal<"reference.updated">;
|
|
53
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
54
|
+
readonly aggregateID: Schema.String;
|
|
55
|
+
readonly seq: Schema.Int;
|
|
56
|
+
readonly version: Schema.Int;
|
|
57
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
58
|
+
readonly aggregateID: Schema.String;
|
|
59
|
+
readonly seq: Schema.Int;
|
|
60
|
+
readonly version: Schema.Int;
|
|
61
|
+
}>>, never, never>;
|
|
62
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
63
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
64
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
65
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
66
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
67
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
68
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
69
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
70
|
+
}>, never, never>;
|
|
71
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
72
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
73
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
74
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
75
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
76
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
77
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
78
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
79
|
+
}>, never, never>;
|
|
80
|
+
}>>, never, never>;
|
|
81
|
+
readonly data: Schema.Struct<{}>;
|
|
82
|
+
}> & {
|
|
83
|
+
data: Schema.Struct<{}>;
|
|
84
|
+
durable?: {
|
|
85
|
+
readonly version: number;
|
|
86
|
+
readonly aggregate: string;
|
|
87
|
+
} | undefined;
|
|
88
|
+
type: "reference.updated";
|
|
89
|
+
}];
|
|
90
|
+
};
|
|
91
|
+
export interface LocalSource extends Schema.Schema.Type<typeof LocalSource> {
|
|
92
|
+
}
|
|
93
|
+
export declare const LocalSource: Schema.Struct<{
|
|
94
|
+
readonly type: Schema.Literal<"local">;
|
|
95
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
96
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
97
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
98
|
+
}>;
|
|
99
|
+
export interface GitSource extends Schema.Schema.Type<typeof GitSource> {
|
|
100
|
+
}
|
|
101
|
+
export declare const GitSource: Schema.Struct<{
|
|
102
|
+
readonly type: Schema.Literal<"git">;
|
|
103
|
+
readonly repository: Schema.String;
|
|
104
|
+
readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
105
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
106
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const Source: Schema.Union<readonly [Schema.Struct<{
|
|
109
|
+
readonly type: Schema.Literal<"local">;
|
|
110
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
111
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
112
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
113
|
+
}>, Schema.Struct<{
|
|
114
|
+
readonly type: Schema.Literal<"git">;
|
|
115
|
+
readonly repository: Schema.String;
|
|
116
|
+
readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
117
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
118
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
119
|
+
}>]>;
|
|
120
|
+
export type Source = typeof Source.Type;
|
|
121
|
+
declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
122
|
+
readonly name: Schema.String;
|
|
123
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
124
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
125
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
126
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
127
|
+
readonly type: Schema.Literal<"local">;
|
|
128
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
129
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
130
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
131
|
+
}>, Schema.Struct<{
|
|
132
|
+
readonly type: Schema.Literal<"git">;
|
|
133
|
+
readonly repository: Schema.String;
|
|
134
|
+
readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
135
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
136
|
+
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
137
|
+
}>]>;
|
|
138
|
+
}>, {}>;
|
|
139
|
+
export declare class Info extends Info_base {
|
|
140
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * as Reference from "./reference.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { define, inventory } from "./event.js";
|
|
5
|
+
import { AbsolutePath } from "./schema.js";
|
|
6
|
+
const Updated = define({ type: "reference.updated", schema: {} });
|
|
7
|
+
export const Event = { Updated, Definitions: inventory(Updated) };
|
|
8
|
+
export const LocalSource = Schema.Struct({
|
|
9
|
+
type: Schema.Literal("local"),
|
|
10
|
+
path: AbsolutePath,
|
|
11
|
+
description: Schema.String.pipe(optional),
|
|
12
|
+
hidden: Schema.Boolean.pipe(optional),
|
|
13
|
+
}).annotate({ identifier: "Reference.LocalSource" });
|
|
14
|
+
export const GitSource = Schema.Struct({
|
|
15
|
+
type: Schema.Literal("git"),
|
|
16
|
+
repository: Schema.String,
|
|
17
|
+
branch: Schema.String.pipe(optional),
|
|
18
|
+
description: Schema.String.pipe(optional),
|
|
19
|
+
hidden: Schema.Boolean.pipe(optional),
|
|
20
|
+
}).annotate({ identifier: "Reference.GitSource" });
|
|
21
|
+
export const Source = Schema.Union([LocalSource, GitSource])
|
|
22
|
+
.pipe(Schema.toTaggedUnion("type"))
|
|
23
|
+
.annotate({ identifier: "Reference.Source" });
|
|
24
|
+
export class Info extends Schema.Class("Reference.Info")({
|
|
25
|
+
name: Schema.String,
|
|
26
|
+
path: AbsolutePath,
|
|
27
|
+
description: Schema.String.pipe(optional),
|
|
28
|
+
hidden: Schema.Boolean.pipe(optional),
|
|
29
|
+
source: Source,
|
|
30
|
+
}) {
|
|
31
|
+
}
|
package/dist/revert.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * as Revert from "./revert.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const FileDiff: Schema.Struct<{
|
|
4
|
+
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
5
|
+
readonly status: Schema.Literals<readonly ["added", "modified", "deleted"]>;
|
|
6
|
+
readonly additions: Schema.Int;
|
|
7
|
+
readonly deletions: Schema.Int;
|
|
8
|
+
readonly patch: Schema.String;
|
|
9
|
+
}>;
|
|
10
|
+
export interface FileDiff extends Schema.Schema.Type<typeof FileDiff> {
|
|
11
|
+
}
|
|
12
|
+
export declare const State: Schema.Struct<{
|
|
13
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
14
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
15
|
+
};
|
|
16
|
+
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
17
|
+
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
18
|
+
readonly diff: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
19
|
+
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
20
|
+
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
21
|
+
readonly status: Schema.Literals<readonly ["added", "modified", "deleted"]>;
|
|
22
|
+
readonly additions: Schema.Int;
|
|
23
|
+
readonly deletions: Schema.Int;
|
|
24
|
+
readonly patch: Schema.String;
|
|
25
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
26
|
+
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
27
|
+
readonly status: Schema.Literals<readonly ["added", "modified", "deleted"]>;
|
|
28
|
+
readonly additions: Schema.Int;
|
|
29
|
+
readonly deletions: Schema.Int;
|
|
30
|
+
readonly patch: Schema.String;
|
|
31
|
+
}>>>, never, never>;
|
|
32
|
+
}>;
|
|
33
|
+
export interface State extends Schema.Schema.Type<typeof State> {
|
|
34
|
+
}
|
package/dist/revert.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * as Revert from "./revert.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { NonNegativeInt, RelativePath } from "./schema.js";
|
|
5
|
+
import { SessionMessage } from "./session-message.js";
|
|
6
|
+
export const FileDiff = Schema.Struct({
|
|
7
|
+
path: RelativePath,
|
|
8
|
+
status: Schema.Literals(["added", "modified", "deleted"]),
|
|
9
|
+
additions: NonNegativeInt,
|
|
10
|
+
deletions: NonNegativeInt,
|
|
11
|
+
patch: Schema.String,
|
|
12
|
+
}).annotate({ identifier: "File.Diff" });
|
|
13
|
+
export const State = Schema.Struct({
|
|
14
|
+
messageID: SessionMessage.ID,
|
|
15
|
+
partID: Schema.String.pipe(optional),
|
|
16
|
+
snapshot: Schema.String.pipe(optional),
|
|
17
|
+
diff: Schema.String.pipe(optional),
|
|
18
|
+
files: Schema.Array(FileDiff).pipe(optional),
|
|
19
|
+
}).annotate({ identifier: "Revert.State" });
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const PositiveInt: Schema.Int;
|
|
3
|
+
export declare const NonNegativeInt: Schema.Int;
|
|
4
|
+
export declare const RelativePath: Schema.brand<Schema.String, "RelativePath">;
|
|
5
|
+
export type RelativePath = typeof RelativePath.Type;
|
|
6
|
+
export declare const AbsolutePath: Schema.brand<Schema.String, "AbsolutePath">;
|
|
7
|
+
export type AbsolutePath = typeof AbsolutePath.Type;
|
|
8
|
+
export declare const optional: <S extends Schema.Top>(schema: S) => Schema.decodeTo<Schema.optional<Schema.toType<S>>, Schema.optionalKey<S>, never, never>;
|
|
9
|
+
export declare const statics: <S extends object, M extends Record<string, unknown>>(methods: (schema: S) => M) => (schema: S) => S & M;
|
|
10
|
+
export declare const DateTimeUtcFromMillis: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DateTime, Option, Schema, SchemaGetter } from "effect";
|
|
2
|
+
export const PositiveInt = Schema.Int.check(Schema.isGreaterThan(0));
|
|
3
|
+
export const NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
4
|
+
export const RelativePath = Schema.String.pipe(Schema.brand("RelativePath"));
|
|
5
|
+
export const AbsolutePath = Schema.String.pipe(Schema.brand("AbsolutePath"));
|
|
6
|
+
export const optional = (schema) => Schema.optionalKey(schema).pipe(Schema.decodeTo(Schema.optional(Schema.toType(schema)), {
|
|
7
|
+
decode: SchemaGetter.passthrough({ strict: false }),
|
|
8
|
+
encode: SchemaGetter.transformOptional(Option.filter((value) => value !== undefined)),
|
|
9
|
+
}));
|
|
10
|
+
export const statics = (methods) => (schema) => Object.assign(schema, methods(schema));
|
|
11
|
+
export const DateTimeUtcFromMillis = Schema.Finite.pipe(Schema.decodeTo(Schema.DateTimeUtc, {
|
|
12
|
+
decode: SchemaGetter.transform((value) => DateTime.makeUnsafe(value)),
|
|
13
|
+
encode: SchemaGetter.transform((value) => DateTime.toEpochMillis(value)),
|
|
14
|
+
}));
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export * as ServerEvent from "./server-event.js";
|
|
2
|
+
export declare const Connected: import("effect/Schema").Struct<{
|
|
3
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
4
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
5
|
+
};
|
|
6
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
7
|
+
readonly type: import("effect/Schema").Literal<"server.connected">;
|
|
8
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
9
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
10
|
+
readonly seq: import("effect/Schema").Int;
|
|
11
|
+
readonly version: import("effect/Schema").Int;
|
|
12
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
13
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
14
|
+
readonly seq: import("effect/Schema").Int;
|
|
15
|
+
readonly version: import("effect/Schema").Int;
|
|
16
|
+
}>>, never, never>;
|
|
17
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
18
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
19
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
20
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
21
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
22
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
23
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
24
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
25
|
+
}>, never, never>;
|
|
26
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
27
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
28
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
29
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
30
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
31
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
32
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
33
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
34
|
+
}>, never, never>;
|
|
35
|
+
}>>, never, never>;
|
|
36
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
37
|
+
}> & {
|
|
38
|
+
data: import("effect/Schema").Struct<{}>;
|
|
39
|
+
durable?: {
|
|
40
|
+
readonly version: number;
|
|
41
|
+
readonly aggregate: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
type: "server.connected";
|
|
44
|
+
};
|
|
45
|
+
export declare const Disposed: import("effect/Schema").Struct<{
|
|
46
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
47
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
48
|
+
};
|
|
49
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
50
|
+
readonly type: import("effect/Schema").Literal<"global.disposed">;
|
|
51
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
52
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
53
|
+
readonly seq: import("effect/Schema").Int;
|
|
54
|
+
readonly version: import("effect/Schema").Int;
|
|
55
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
56
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
57
|
+
readonly seq: import("effect/Schema").Int;
|
|
58
|
+
readonly version: import("effect/Schema").Int;
|
|
59
|
+
}>>, never, never>;
|
|
60
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
61
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
62
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
63
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
64
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
65
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
66
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
67
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
68
|
+
}>, never, never>;
|
|
69
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
70
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
71
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
72
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
73
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
74
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
75
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
76
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
77
|
+
}>, never, never>;
|
|
78
|
+
}>>, never, never>;
|
|
79
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
80
|
+
}> & {
|
|
81
|
+
data: import("effect/Schema").Struct<{}>;
|
|
82
|
+
durable?: {
|
|
83
|
+
readonly version: number;
|
|
84
|
+
readonly aggregate: string;
|
|
85
|
+
} | undefined;
|
|
86
|
+
type: "global.disposed";
|
|
87
|
+
};
|
|
88
|
+
export declare const Definitions: readonly [import("effect/Schema").Struct<{
|
|
89
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
90
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
91
|
+
};
|
|
92
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
93
|
+
readonly type: import("effect/Schema").Literal<"server.connected">;
|
|
94
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
95
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
96
|
+
readonly seq: import("effect/Schema").Int;
|
|
97
|
+
readonly version: import("effect/Schema").Int;
|
|
98
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
99
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
100
|
+
readonly seq: import("effect/Schema").Int;
|
|
101
|
+
readonly version: import("effect/Schema").Int;
|
|
102
|
+
}>>, never, never>;
|
|
103
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
104
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
105
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
106
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
107
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
108
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
109
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
110
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
111
|
+
}>, never, never>;
|
|
112
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
113
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
114
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
115
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
116
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
117
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
118
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
119
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
120
|
+
}>, never, never>;
|
|
121
|
+
}>>, never, never>;
|
|
122
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
123
|
+
}> & {
|
|
124
|
+
data: import("effect/Schema").Struct<{}>;
|
|
125
|
+
durable?: {
|
|
126
|
+
readonly version: number;
|
|
127
|
+
readonly aggregate: string;
|
|
128
|
+
} | undefined;
|
|
129
|
+
type: "server.connected";
|
|
130
|
+
}, import("effect/Schema").Struct<{
|
|
131
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
132
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
133
|
+
};
|
|
134
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
135
|
+
readonly type: import("effect/Schema").Literal<"global.disposed">;
|
|
136
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
137
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
138
|
+
readonly seq: import("effect/Schema").Int;
|
|
139
|
+
readonly version: import("effect/Schema").Int;
|
|
140
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
141
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
142
|
+
readonly seq: import("effect/Schema").Int;
|
|
143
|
+
readonly version: import("effect/Schema").Int;
|
|
144
|
+
}>>, never, never>;
|
|
145
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
146
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
147
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
148
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
149
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
150
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
151
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
152
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
153
|
+
}>, never, never>;
|
|
154
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
155
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
156
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
157
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
158
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
159
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
160
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
161
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
162
|
+
}>, never, never>;
|
|
163
|
+
}>>, never, never>;
|
|
164
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
165
|
+
}> & {
|
|
166
|
+
data: import("effect/Schema").Struct<{}>;
|
|
167
|
+
durable?: {
|
|
168
|
+
readonly version: number;
|
|
169
|
+
readonly aggregate: string;
|
|
170
|
+
} | undefined;
|
|
171
|
+
type: "global.disposed";
|
|
172
|
+
}];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as ServerEvent from "./server-event.js";
|
|
2
|
+
import { Event } from "./event.js";
|
|
3
|
+
export const Connected = Event.define({ type: "server.connected", schema: {} });
|
|
4
|
+
export const Disposed = Event.define({ type: "global.disposed", schema: {} });
|
|
5
|
+
export const Definitions = Event.inventory(Connected, Disposed);
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export * as SessionCompactionEvent from "./session-compaction-event.js";
|
|
2
|
+
export declare const Compacted: import("effect/Schema").Struct<{
|
|
3
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
4
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
5
|
+
};
|
|
6
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
7
|
+
readonly type: import("effect/Schema").Literal<"session.compacted">;
|
|
8
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
9
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
10
|
+
readonly seq: import("effect/Schema").Int;
|
|
11
|
+
readonly version: import("effect/Schema").Int;
|
|
12
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
13
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
14
|
+
readonly seq: import("effect/Schema").Int;
|
|
15
|
+
readonly version: import("effect/Schema").Int;
|
|
16
|
+
}>>, never, never>;
|
|
17
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
18
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
19
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
20
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
21
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
22
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
23
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
24
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
25
|
+
}>, never, never>;
|
|
26
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
27
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
28
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
29
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
30
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
31
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
32
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
33
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
34
|
+
}>, never, never>;
|
|
35
|
+
}>>, never, never>;
|
|
36
|
+
readonly data: import("effect/Schema").Struct<{
|
|
37
|
+
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
38
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
39
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
}> & {
|
|
43
|
+
data: import("effect/Schema").Struct<{
|
|
44
|
+
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
45
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
46
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
durable?: {
|
|
50
|
+
readonly version: number;
|
|
51
|
+
readonly aggregate: string;
|
|
52
|
+
} | undefined;
|
|
53
|
+
type: "session.compacted";
|
|
54
|
+
};
|
|
55
|
+
export declare const Definitions: readonly [import("effect/Schema").Struct<{
|
|
56
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
57
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
58
|
+
};
|
|
59
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
60
|
+
readonly type: import("effect/Schema").Literal<"session.compacted">;
|
|
61
|
+
readonly durable: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
62
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
63
|
+
readonly seq: import("effect/Schema").Int;
|
|
64
|
+
readonly version: import("effect/Schema").Int;
|
|
65
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
66
|
+
readonly aggregateID: import("effect/Schema").String;
|
|
67
|
+
readonly seq: import("effect/Schema").Int;
|
|
68
|
+
readonly version: import("effect/Schema").Int;
|
|
69
|
+
}>>, never, never>;
|
|
70
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
71
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
72
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
73
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
74
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
75
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/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
|
+
}>, never, never>;
|
|
79
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
80
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
81
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "WorkspaceV2.ID"> & {
|
|
82
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
83
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
84
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/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
|
+
}>, never, never>;
|
|
88
|
+
}>>, never, never>;
|
|
89
|
+
readonly data: import("effect/Schema").Struct<{
|
|
90
|
+
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
91
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
92
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
93
|
+
};
|
|
94
|
+
}>;
|
|
95
|
+
}> & {
|
|
96
|
+
data: import("effect/Schema").Struct<{
|
|
97
|
+
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
98
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
99
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
durable?: {
|
|
103
|
+
readonly version: number;
|
|
104
|
+
readonly aggregate: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
type: "session.compacted";
|
|
107
|
+
}];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * as SessionCompactionEvent from "./session-compaction-event.js";
|
|
2
|
+
import { Event } from "./event.js";
|
|
3
|
+
import { SessionID } from "./session-id.js";
|
|
4
|
+
export const Compacted = Event.define({
|
|
5
|
+
type: "session.compacted",
|
|
6
|
+
schema: {
|
|
7
|
+
sessionID: SessionID,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export const Definitions = Event.inventory(Compacted);
|