@opencode/schema 2.0.4 → 2.0.6
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/event-manifest.d.ts +64 -0
- package/dist/event-manifest.js +2 -1
- package/dist/filesystem.d.ts +5 -0
- package/dist/filesystem.js +4 -1
- package/dist/location-event.d.ts +68 -0
- package/dist/location-event.js +5 -0
- package/package.json +1 -1
package/dist/event-manifest.d.ts
CHANGED
|
@@ -4,6 +4,38 @@ import { Durable } from "./durable-event-manifest.js";
|
|
|
4
4
|
import { Event } from "./event.js";
|
|
5
5
|
import { SessionEvent } from "./session-event.js";
|
|
6
6
|
export declare const ServerDefinitions: readonly [Schema.Struct<{
|
|
7
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
8
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
9
|
+
};
|
|
10
|
+
readonly created: Schema.Finite;
|
|
11
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
12
|
+
readonly type: Schema.Literal<"location.shutdown">;
|
|
13
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
14
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
16
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
17
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
18
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
19
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
20
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
21
|
+
}>, never, never>;
|
|
22
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
23
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
24
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
25
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
26
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
27
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
28
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
29
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
30
|
+
}>, never, never>;
|
|
31
|
+
}>>, never, never>;
|
|
32
|
+
readonly data: Schema.Struct<{}>;
|
|
33
|
+
}> & {
|
|
34
|
+
type: "location.shutdown";
|
|
35
|
+
durability: "ephemeral";
|
|
36
|
+
durable: undefined;
|
|
37
|
+
data: Schema.Struct<{}>;
|
|
38
|
+
}, Schema.Struct<{
|
|
7
39
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
8
40
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
9
41
|
};
|
|
@@ -6186,6 +6218,38 @@ export declare const isServer: (event: {
|
|
|
6186
6218
|
readonly type: string;
|
|
6187
6219
|
}) => event is ServerEvent;
|
|
6188
6220
|
export declare const Definitions: readonly [Schema.Struct<{
|
|
6221
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6222
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6223
|
+
};
|
|
6224
|
+
readonly created: Schema.Finite;
|
|
6225
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
6226
|
+
readonly type: Schema.Literal<"location.shutdown">;
|
|
6227
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
6228
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6229
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6230
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6231
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6232
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6233
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6234
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6235
|
+
}>, never, never>;
|
|
6236
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
6237
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6238
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6239
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6240
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6241
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
6242
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6243
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6244
|
+
}>, never, never>;
|
|
6245
|
+
}>>, never, never>;
|
|
6246
|
+
readonly data: Schema.Struct<{}>;
|
|
6247
|
+
}> & {
|
|
6248
|
+
type: "location.shutdown";
|
|
6249
|
+
durability: "ephemeral";
|
|
6250
|
+
durable: undefined;
|
|
6251
|
+
data: Schema.Struct<{}>;
|
|
6252
|
+
}, Schema.Struct<{
|
|
6189
6253
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6190
6254
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6191
6255
|
};
|
package/dist/event-manifest.js
CHANGED
|
@@ -13,6 +13,7 @@ import { InstallationEvent } from "./installation-event.js";
|
|
|
13
13
|
import { Integration } from "./integration.js";
|
|
14
14
|
import { LegacyEventV1 } from "./legacy-event.js";
|
|
15
15
|
import { LspEvent } from "./lsp-event.js";
|
|
16
|
+
import { LocationEvent } from "./location-event.js";
|
|
16
17
|
import { McpEvent } from "./mcp-event.js";
|
|
17
18
|
import { Model } from "./model.js";
|
|
18
19
|
import { ModelsDev } from "./models-dev.js";
|
|
@@ -36,7 +37,7 @@ import { WorkspaceEvent } from "./workspace-event.js";
|
|
|
36
37
|
import { WorktreeEvent } from "./worktree-event.js";
|
|
37
38
|
import { WebSearch } from "./websearch.js";
|
|
38
39
|
const coreDefinitions = Event.inventory(...SessionEvent.Definitions);
|
|
39
|
-
const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Credential.Event.Definitions, ...Integration.Event.Definitions, ...Provider.Event.Definitions, ...Model.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
|
|
40
|
+
const foundationDefinitions = Event.inventory(...LocationEvent.Definitions, ...ModelsDev.Event.Definitions, ...Credential.Event.Definitions, ...Integration.Event.Definitions, ...Provider.Event.Definitions, ...Model.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
|
|
40
41
|
const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...PersistentPty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
|
|
41
42
|
export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
|
|
42
43
|
// Current events the TUI consumes from the public stream.
|
package/dist/filesystem.d.ts
CHANGED
|
@@ -116,3 +116,8 @@ declare const FindInput_base: Schema.Class<FindInput, Schema.Struct<{
|
|
|
116
116
|
}>, {}>;
|
|
117
117
|
export declare class FindInput extends FindInput_base {
|
|
118
118
|
}
|
|
119
|
+
export interface Write extends Schema.Schema.Type<typeof Write> {
|
|
120
|
+
}
|
|
121
|
+
export declare const Write: Schema.Struct<{
|
|
122
|
+
readonly path: Schema.brand<Schema.String, "AbsolutePath">;
|
|
123
|
+
}>;
|
package/dist/filesystem.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as FileSystem from "./filesystem.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { optional } from "./schema.js";
|
|
4
4
|
import { ephemeral, inventory } from "./event.js";
|
|
5
|
-
import { NonNegativeInt, PositiveInt, RelativePath } from "./schema.js";
|
|
5
|
+
import { AbsolutePath, NonNegativeInt, PositiveInt, RelativePath } from "./schema.js";
|
|
6
6
|
const Changed = ephemeral({
|
|
7
7
|
type: "filesystem.changed",
|
|
8
8
|
schema: {
|
|
@@ -33,3 +33,6 @@ export class FindInput extends Schema.Class("FileSystem.FindInput")({
|
|
|
33
33
|
limit: PositiveInt.pipe(optional),
|
|
34
34
|
}) {
|
|
35
35
|
}
|
|
36
|
+
export const Write = Schema.Struct({
|
|
37
|
+
path: AbsolutePath,
|
|
38
|
+
}).annotate({ identifier: "FileSystem.Write" });
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export * as LocationEvent from "./location-event.js";
|
|
2
|
+
/** The location's cached services were shut down; clients must revalidate its reads. */
|
|
3
|
+
export declare const Shutdown: import("effect/Schema").Struct<{
|
|
4
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
5
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6
|
+
};
|
|
7
|
+
readonly created: import("effect/Schema").Finite;
|
|
8
|
+
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>;
|
|
9
|
+
readonly type: import("effect/Schema").Literal<"location.shutdown">;
|
|
10
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
11
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
12
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
13
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
15
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
16
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
17
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
18
|
+
}>, never, never>;
|
|
19
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
20
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
21
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
22
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
23
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
24
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
25
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
26
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
27
|
+
}>, never, never>;
|
|
28
|
+
}>>, never, never>;
|
|
29
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
30
|
+
}> & {
|
|
31
|
+
type: "location.shutdown";
|
|
32
|
+
durability: "ephemeral";
|
|
33
|
+
durable: undefined;
|
|
34
|
+
data: import("effect/Schema").Struct<{}>;
|
|
35
|
+
};
|
|
36
|
+
export declare const Definitions: readonly [import("effect/Schema").Struct<{
|
|
37
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
38
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
39
|
+
};
|
|
40
|
+
readonly created: import("effect/Schema").Finite;
|
|
41
|
+
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>;
|
|
42
|
+
readonly type: import("effect/Schema").Literal<"location.shutdown">;
|
|
43
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
44
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
45
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
46
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
47
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
48
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
49
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
50
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
51
|
+
}>, never, never>;
|
|
52
|
+
}>>>, import("effect/Schema").optionalKey<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
|
+
}>>, never, never>;
|
|
62
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
63
|
+
}> & {
|
|
64
|
+
type: "location.shutdown";
|
|
65
|
+
durability: "ephemeral";
|
|
66
|
+
durable: undefined;
|
|
67
|
+
data: import("effect/Schema").Struct<{}>;
|
|
68
|
+
}];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as LocationEvent from "./location-event.js";
|
|
2
|
+
import { ephemeral, inventory } from "./event.js";
|
|
3
|
+
/** The location's cached services were shut down; clients must revalidate its reads. */
|
|
4
|
+
export const Shutdown = ephemeral({ type: "location.shutdown", schema: {} });
|
|
5
|
+
export const Definitions = inventory(Shutdown);
|