@opencode-ai/schema 0.0.0-dev-17471

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.
Files changed (193) hide show
  1. package/dist/agent.d.ts +164 -0
  2. package/dist/agent.js +46 -0
  3. package/dist/ai.d.ts +4 -0
  4. package/dist/ai.js +5 -0
  5. package/dist/catalog.d.ts +69 -0
  6. package/dist/catalog.js +4 -0
  7. package/dist/command.d.ts +124 -0
  8. package/dist/command.js +19 -0
  9. package/dist/config/agent.d.ts +42 -0
  10. package/dist/config/agent.js +20 -0
  11. package/dist/config/command.d.ts +27 -0
  12. package/dist/config/command.js +12 -0
  13. package/dist/config/compaction.d.ts +14 -0
  14. package/dist/config/compaction.js +13 -0
  15. package/dist/config/experimental.d.ts +17 -0
  16. package/dist/config/experimental.js +16 -0
  17. package/dist/config/formatter.d.ts +11 -0
  18. package/dist/config/formatter.js +11 -0
  19. package/dist/config/lsp.d.ts +20 -0
  20. package/dist/config/lsp.js +16 -0
  21. package/dist/config/mcp.d.ts +18 -0
  22. package/dist/config/mcp.js +14 -0
  23. package/dist/config/media.d.ts +15 -0
  24. package/dist/config/media.js +14 -0
  25. package/dist/config/model.d.ts +18 -0
  26. package/dist/config/model.js +28 -0
  27. package/dist/config/plugin.d.ts +11 -0
  28. package/dist/config/plugin.js +10 -0
  29. package/dist/config/policy.d.ts +10 -0
  30. package/dist/config/policy.js +8 -0
  31. package/dist/config/provider.d.ts +106 -0
  32. package/dist/config/provider.js +62 -0
  33. package/dist/config/reference.d.ts +21 -0
  34. package/dist/config/reference.js +18 -0
  35. package/dist/config/tool-output.d.ts +8 -0
  36. package/dist/config/tool-output.js +8 -0
  37. package/dist/config/warming.d.ts +10 -0
  38. package/dist/config/warming.js +16 -0
  39. package/dist/config/watcher.d.ts +7 -0
  40. package/dist/config/watcher.js +7 -0
  41. package/dist/config/websearch.d.ts +9 -0
  42. package/dist/config/websearch.js +8 -0
  43. package/dist/config.d.ts +175 -0
  44. package/dist/config.js +136 -0
  45. package/dist/connection.d.ts +28 -0
  46. package/dist/connection.js +15 -0
  47. package/dist/credential.d.ts +38 -0
  48. package/dist/credential.js +25 -0
  49. package/dist/durable-event-manifest.d.ts +3 -0
  50. package/dist/durable-event-manifest.js +5 -0
  51. package/dist/event-log.d.ts +14 -0
  52. package/dist/event-log.js +17 -0
  53. package/dist/event-manifest.d.ts +11372 -0
  54. package/dist/event-manifest.js +45 -0
  55. package/dist/event.d.ts +142 -0
  56. package/dist/event.js +110 -0
  57. package/dist/file-diff.d.ts +21 -0
  58. package/dist/file-diff.js +18 -0
  59. package/dist/filesystem-v1.d.ts +1 -0
  60. package/dist/filesystem-v1.js +1 -0
  61. package/dist/filesystem.d.ts +118 -0
  62. package/dist/filesystem.js +35 -0
  63. package/dist/form.d.ts +1259 -0
  64. package/dist/form.js +120 -0
  65. package/dist/ide-event.d.ts +76 -0
  66. package/dist/ide-event.js +10 -0
  67. package/dist/identifier.d.ts +3 -0
  68. package/dist/identifier.js +24 -0
  69. package/dist/index.d.ts +39 -0
  70. package/dist/index.js +39 -0
  71. package/dist/installation-event.d.ts +149 -0
  72. package/dist/installation-event.js +16 -0
  73. package/dist/instruction-entry.d.ts +23 -0
  74. package/dist/instruction-entry.js +22 -0
  75. package/dist/instruction.d.ts +13 -0
  76. package/dist/instruction.js +8 -0
  77. package/dist/integration-id.d.ts +5 -0
  78. package/dist/integration-id.js +3 -0
  79. package/dist/integration.d.ts +1675 -0
  80. package/dist/integration.js +87 -0
  81. package/dist/legacy-event.d.ts +1 -0
  82. package/dist/legacy-event.js +1 -0
  83. package/dist/llm.d.ts +4 -0
  84. package/dist/llm.js +3 -0
  85. package/dist/location.d.ts +37 -0
  86. package/dist/location.js +22 -0
  87. package/dist/lsp-event.d.ts +67 -0
  88. package/dist/lsp-event.js +4 -0
  89. package/dist/mcp-event.d.ts +222 -0
  90. package/dist/mcp-event.js +24 -0
  91. package/dist/mcp.d.ts +138 -0
  92. package/dist/mcp.js +111 -0
  93. package/dist/model.d.ts +186 -0
  94. package/dist/model.js +104 -0
  95. package/dist/models-dev.d.ts +69 -0
  96. package/dist/models-dev.js +7 -0
  97. package/dist/money.d.ts +10 -0
  98. package/dist/money.js +5 -0
  99. package/dist/permission-saved.d.ts +18 -0
  100. package/dist/permission-saved.js +12 -0
  101. package/dist/permission-v1.d.ts +1 -0
  102. package/dist/permission-v1.js +1 -0
  103. package/dist/permission.d.ts +306 -0
  104. package/dist/permission.js +45 -0
  105. package/dist/plugin.d.ts +150 -0
  106. package/dist/plugin.js +16 -0
  107. package/dist/project-id.d.ts +5 -0
  108. package/dist/project-id.js +3 -0
  109. package/dist/project.d.ts +241 -0
  110. package/dist/project.js +37 -0
  111. package/dist/prompt-input.d.ts +143 -0
  112. package/dist/prompt-input.js +25 -0
  113. package/dist/prompt.d.ts +297 -0
  114. package/dist/prompt.js +61 -0
  115. package/dist/provider.d.ts +60 -0
  116. package/dist/provider.js +42 -0
  117. package/dist/pty-ticket.d.ts +8 -0
  118. package/dist/pty-ticket.js +7 -0
  119. package/dist/pty.d.ts +462 -0
  120. package/dist/pty.js +43 -0
  121. package/dist/question-v1.d.ts +1 -0
  122. package/dist/question-v1.js +1 -0
  123. package/dist/question.d.ts +15 -0
  124. package/dist/question.js +15 -0
  125. package/dist/reference.d.ts +120 -0
  126. package/dist/reference.js +30 -0
  127. package/dist/schema.d.ts +10 -0
  128. package/dist/schema.js +14 -0
  129. package/dist/server-event.d.ts +132 -0
  130. package/dist/server-event.js +5 -0
  131. package/dist/session-compaction-event.d.ts +87 -0
  132. package/dist/session-compaction-event.js +10 -0
  133. package/dist/session-error.d.ts +9 -0
  134. package/dist/session-error.js +8 -0
  135. package/dist/session-event.d.ts +17994 -0
  136. package/dist/session-event.js +499 -0
  137. package/dist/session-fork.d.ts +26 -0
  138. package/dist/session-fork.js +11 -0
  139. package/dist/session-id.d.ts +6 -0
  140. package/dist/session-id.js +10 -0
  141. package/dist/session-inbox.d.ts +748 -0
  142. package/dist/session-inbox.js +47 -0
  143. package/dist/session-message.d.ts +1512 -0
  144. package/dist/session-message.js +209 -0
  145. package/dist/session-revert.d.ts +480 -0
  146. package/dist/session-revert.js +63 -0
  147. package/dist/session-status-event.d.ts +299 -0
  148. package/dist/session-status-event.js +43 -0
  149. package/dist/session-transfer.d.ts +744 -0
  150. package/dist/session-transfer.js +8 -0
  151. package/dist/session-v1.d.ts +1 -0
  152. package/dist/session-v1.js +1 -0
  153. package/dist/session.d.ts +218 -0
  154. package/dist/session.js +45 -0
  155. package/dist/shell.d.ts +381 -0
  156. package/dist/shell.js +58 -0
  157. package/dist/skill.d.ts +133 -0
  158. package/dist/skill.js +48 -0
  159. package/dist/snapshot.d.ts +4 -0
  160. package/dist/snapshot.js +3 -0
  161. package/dist/token-usage.d.ts +13 -0
  162. package/dist/token-usage.js +11 -0
  163. package/dist/tool.d.ts +74 -0
  164. package/dist/tool.js +22 -0
  165. package/dist/tui-event.d.ts +307 -0
  166. package/dist/tui-event.js +53 -0
  167. package/dist/v1/filesystem.d.ts +78 -0
  168. package/dist/v1/filesystem.js +8 -0
  169. package/dist/v1/legacy-event.d.ts +108 -0
  170. package/dist/v1/legacy-event.js +15 -0
  171. package/dist/v1/permission.d.ts +316 -0
  172. package/dist/v1/permission.js +41 -0
  173. package/dist/v1/question.d.ts +444 -0
  174. package/dist/v1/question.js +57 -0
  175. package/dist/v1/session.d.ts +7657 -0
  176. package/dist/v1/session.js +535 -0
  177. package/dist/vcs-event.d.ts +76 -0
  178. package/dist/vcs-event.js +11 -0
  179. package/dist/vcs.d.ts +26 -0
  180. package/dist/vcs.js +17 -0
  181. package/dist/websearch.d.ts +108 -0
  182. package/dist/websearch.js +31 -0
  183. package/dist/workspace-event.d.ts +247 -0
  184. package/dist/workspace-event.js +25 -0
  185. package/dist/workspace-id.d.ts +6 -0
  186. package/dist/workspace-id.js +16 -0
  187. package/dist/workspace.d.ts +9 -0
  188. package/dist/workspace.js +5 -0
  189. package/dist/worktree-event.d.ts +153 -0
  190. package/dist/worktree-event.js +18 -0
  191. package/dist/worktree.d.ts +255 -0
  192. package/dist/worktree.js +61 -0
  193. package/package.json +42 -0
@@ -0,0 +1,120 @@
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 created: Schema.Finite;
9
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
10
+ readonly type: Schema.Literal<"reference.updated">;
11
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
12
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
13
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
15
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
16
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
17
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
18
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
19
+ }>, never, never>;
20
+ }>>>, Schema.optionalKey<Schema.Struct<{
21
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
22
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
23
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
24
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
25
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
26
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
27
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
28
+ }>, never, never>;
29
+ }>>, never, never>;
30
+ readonly data: Schema.Struct<{}>;
31
+ }> & {
32
+ type: "reference.updated";
33
+ durability: "ephemeral";
34
+ durable: undefined;
35
+ data: Schema.Struct<{}>;
36
+ };
37
+ Definitions: readonly [Schema.Struct<{
38
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
39
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
40
+ };
41
+ readonly created: Schema.Finite;
42
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
43
+ readonly type: Schema.Literal<"reference.updated">;
44
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
45
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
46
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
47
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
48
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
49
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
50
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
51
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
52
+ }>, never, never>;
53
+ }>>>, Schema.optionalKey<Schema.Struct<{
54
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
55
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
56
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
57
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
58
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
59
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
60
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
61
+ }>, never, never>;
62
+ }>>, never, never>;
63
+ readonly data: Schema.Struct<{}>;
64
+ }> & {
65
+ type: "reference.updated";
66
+ durability: "ephemeral";
67
+ durable: undefined;
68
+ data: Schema.Struct<{}>;
69
+ }];
70
+ };
71
+ export interface LocalSource extends Schema.Schema.Type<typeof LocalSource> {
72
+ }
73
+ export declare const LocalSource: Schema.Struct<{
74
+ readonly type: Schema.Literal<"local">;
75
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
76
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
77
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
78
+ }>;
79
+ export interface GitSource extends Schema.Schema.Type<typeof GitSource> {
80
+ }
81
+ export declare const GitSource: Schema.Struct<{
82
+ readonly type: Schema.Literal<"git">;
83
+ readonly repository: Schema.String;
84
+ readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
85
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
86
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
87
+ }>;
88
+ export declare const Source: Schema.Union<readonly [Schema.Struct<{
89
+ readonly type: Schema.Literal<"local">;
90
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
91
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
92
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
93
+ }>, Schema.Struct<{
94
+ readonly type: Schema.Literal<"git">;
95
+ readonly repository: Schema.String;
96
+ readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
97
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
98
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
99
+ }>]>;
100
+ export type Source = typeof Source.Type;
101
+ export declare const Info: Schema.Struct<{
102
+ readonly name: Schema.String;
103
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
104
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
105
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
106
+ readonly source: Schema.Union<readonly [Schema.Struct<{
107
+ readonly type: Schema.Literal<"local">;
108
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
109
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
110
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
111
+ }>, Schema.Struct<{
112
+ readonly type: Schema.Literal<"git">;
113
+ readonly repository: Schema.String;
114
+ readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
115
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
116
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
117
+ }>]>;
118
+ }>;
119
+ export interface Info extends Schema.Schema.Type<typeof Info> {
120
+ }
@@ -0,0 +1,30 @@
1
+ export * as Reference from "./reference.js";
2
+ import { Schema } from "effect";
3
+ import { optional } from "./schema.js";
4
+ import { ephemeral, inventory } from "./event.js";
5
+ import { AbsolutePath } from "./schema.js";
6
+ const Updated = ephemeral({ 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 const Info = Schema.Struct({
25
+ name: Schema.String,
26
+ path: AbsolutePath,
27
+ description: Schema.String.pipe(optional),
28
+ hidden: Schema.Boolean.pipe(optional),
29
+ source: Source,
30
+ }).annotate({ identifier: "Reference.Info" });
@@ -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,132 @@
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 created: import("effect/Schema").Finite;
7
+ 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>;
8
+ readonly type: import("effect/Schema").Literal<"server.connected">;
9
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
10
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
11
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
12
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
13
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
15
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
17
+ }>, never, never>;
18
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
19
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
20
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/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
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
24
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
25
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
26
+ }>, never, never>;
27
+ }>>, never, never>;
28
+ readonly data: import("effect/Schema").Struct<{}>;
29
+ }> & {
30
+ type: "server.connected";
31
+ durability: "ephemeral";
32
+ durable: undefined;
33
+ data: import("effect/Schema").Struct<{}>;
34
+ };
35
+ export declare const Disposed: import("effect/Schema").Struct<{
36
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
37
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
38
+ };
39
+ readonly created: import("effect/Schema").Finite;
40
+ 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>;
41
+ readonly type: import("effect/Schema").Literal<"global.disposed">;
42
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
43
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
44
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
45
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
46
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
47
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
48
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
49
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
50
+ }>, never, never>;
51
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
52
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
53
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/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
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
57
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
58
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
59
+ }>, never, never>;
60
+ }>>, never, never>;
61
+ readonly data: import("effect/Schema").Struct<{}>;
62
+ }> & {
63
+ type: "global.disposed";
64
+ durability: "ephemeral";
65
+ durable: undefined;
66
+ data: import("effect/Schema").Struct<{}>;
67
+ };
68
+ export declare const Definitions: readonly [import("effect/Schema").Struct<{
69
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
70
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
71
+ };
72
+ readonly created: import("effect/Schema").Finite;
73
+ 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>;
74
+ readonly type: import("effect/Schema").Literal<"server.connected">;
75
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
76
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
77
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
78
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
79
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
80
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
81
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
82
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
83
+ }>, never, never>;
84
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
85
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
86
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
87
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
88
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
89
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
90
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
91
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
92
+ }>, never, never>;
93
+ }>>, never, never>;
94
+ readonly data: import("effect/Schema").Struct<{}>;
95
+ }> & {
96
+ type: "server.connected";
97
+ durability: "ephemeral";
98
+ durable: undefined;
99
+ data: import("effect/Schema").Struct<{}>;
100
+ }, import("effect/Schema").Struct<{
101
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
102
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
103
+ };
104
+ readonly created: import("effect/Schema").Finite;
105
+ 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>;
106
+ readonly type: import("effect/Schema").Literal<"global.disposed">;
107
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
108
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
109
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
110
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
111
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
112
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
113
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
114
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
115
+ }>, never, never>;
116
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
117
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
118
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
119
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
120
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
121
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
122
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
123
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
124
+ }>, never, never>;
125
+ }>>, never, never>;
126
+ readonly data: import("effect/Schema").Struct<{}>;
127
+ }> & {
128
+ type: "global.disposed";
129
+ durability: "ephemeral";
130
+ durable: undefined;
131
+ data: import("effect/Schema").Struct<{}>;
132
+ }];
@@ -0,0 +1,5 @@
1
+ export * as ServerEvent from "./server-event.js";
2
+ import { Event } from "./event.js";
3
+ export const Connected = Event.ephemeral({ type: "server.connected", schema: {} });
4
+ export const Disposed = Event.ephemeral({ type: "global.disposed", schema: {} });
5
+ export const Definitions = Event.inventory(Connected, Disposed);
@@ -0,0 +1,87 @@
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 created: import("effect/Schema").Finite;
7
+ 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>;
8
+ readonly type: import("effect/Schema").Literal<"session.compacted">;
9
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
10
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
11
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
12
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
13
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
15
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
17
+ }>, never, never>;
18
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
19
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
20
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/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
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
24
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
25
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
26
+ }>, never, never>;
27
+ }>>, never, never>;
28
+ readonly data: import("effect/Schema").Struct<{
29
+ readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
30
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
31
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
32
+ };
33
+ }>;
34
+ }> & {
35
+ type: "session.compacted";
36
+ durability: "ephemeral";
37
+ durable: undefined;
38
+ data: import("effect/Schema").Struct<{
39
+ readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
40
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
41
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
42
+ };
43
+ }>;
44
+ };
45
+ export declare const Definitions: readonly [import("effect/Schema").Struct<{
46
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
47
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
48
+ };
49
+ readonly created: import("effect/Schema").Finite;
50
+ 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>;
51
+ readonly type: import("effect/Schema").Literal<"session.compacted">;
52
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
53
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
54
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
55
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
56
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
57
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
58
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
59
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
60
+ }>, never, never>;
61
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
62
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
63
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
64
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
65
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
66
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
67
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
68
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
69
+ }>, never, never>;
70
+ }>>, never, never>;
71
+ readonly data: import("effect/Schema").Struct<{
72
+ readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
73
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
74
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
75
+ };
76
+ }>;
77
+ }> & {
78
+ type: "session.compacted";
79
+ durability: "ephemeral";
80
+ durable: undefined;
81
+ data: import("effect/Schema").Struct<{
82
+ readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
83
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
84
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
85
+ };
86
+ }>;
87
+ }];
@@ -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.ephemeral({
5
+ type: "session.compacted",
6
+ schema: {
7
+ sessionID: SessionID,
8
+ },
9
+ });
10
+ export const Definitions = Event.inventory(Compacted);
@@ -0,0 +1,9 @@
1
+ export * as SessionError from "./session-error.js";
2
+ import { Schema } from "effect";
3
+ export interface Error extends Schema.Schema.Type<typeof Error> {
4
+ }
5
+ export declare const Error: Schema.Struct<{
6
+ readonly type: Schema.String;
7
+ readonly message: Schema.String;
8
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
9
+ }>;
@@ -0,0 +1,8 @@
1
+ export * as SessionError from "./session-error.js";
2
+ import { Schema } from "effect";
3
+ import { optional } from "./schema.js";
4
+ export const Error = Schema.Struct({
5
+ type: Schema.String,
6
+ message: Schema.String,
7
+ status: Schema.Int.check(Schema.isBetween({ minimum: 100, maximum: 599 })).pipe(optional),
8
+ }).annotate({ identifier: "Session.StructuredError" });