@opencode-ai/schema 0.0.0-next-16226 → 0.0.0-next-16230
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/websearch.d.ts +108 -0
- package/dist/websearch.js +31 -0
- package/package.json +1 -1
package/dist/event-manifest.d.ts
CHANGED
|
@@ -6904,6 +6904,38 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
|
|
|
6904
6904
|
};
|
|
6905
6905
|
readonly sessionID: Schema.String;
|
|
6906
6906
|
}>;
|
|
6907
|
+
}, Schema.Struct<{
|
|
6908
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6909
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6910
|
+
};
|
|
6911
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
6912
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
6913
|
+
readonly type: Schema.Literal<"websearch.updated">;
|
|
6914
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
6915
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6916
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6917
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6918
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6919
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6920
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6921
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6922
|
+
}>, never, never>;
|
|
6923
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
6924
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6925
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6926
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6927
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6928
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6929
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6930
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6931
|
+
}>, never, never>;
|
|
6932
|
+
}>>, never, never>;
|
|
6933
|
+
readonly data: Schema.Struct<{}>;
|
|
6934
|
+
}> & {
|
|
6935
|
+
type: "websearch.updated";
|
|
6936
|
+
durability: "ephemeral";
|
|
6937
|
+
durable: undefined;
|
|
6938
|
+
data: Schema.Struct<{}>;
|
|
6907
6939
|
}, Schema.Struct<{
|
|
6908
6940
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6909
6941
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -15028,6 +15060,38 @@ export declare const Definitions: readonly [Schema.Struct<{
|
|
|
15028
15060
|
};
|
|
15029
15061
|
readonly sessionID: Schema.String;
|
|
15030
15062
|
}>;
|
|
15063
|
+
}, Schema.Struct<{
|
|
15064
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
15065
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
15066
|
+
};
|
|
15067
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
15068
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
15069
|
+
readonly type: Schema.Literal<"websearch.updated">;
|
|
15070
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
15071
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15072
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
15073
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15074
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15075
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
15076
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15077
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15078
|
+
}>, never, never>;
|
|
15079
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
15080
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15081
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
15082
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15083
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15084
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
15085
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15086
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
15087
|
+
}>, never, never>;
|
|
15088
|
+
}>>, never, never>;
|
|
15089
|
+
readonly data: Schema.Struct<{}>;
|
|
15090
|
+
}> & {
|
|
15091
|
+
type: "websearch.updated";
|
|
15092
|
+
durability: "ephemeral";
|
|
15093
|
+
durable: undefined;
|
|
15094
|
+
data: Schema.Struct<{}>;
|
|
15031
15095
|
}, Schema.Struct<{
|
|
15032
15096
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
15033
15097
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
package/dist/event-manifest.js
CHANGED
|
@@ -35,11 +35,12 @@ import { TuiEvent } from "./tui-event.js";
|
|
|
35
35
|
import { VcsEvent } from "./vcs-event.js";
|
|
36
36
|
import { WorkspaceEvent } from "./workspace-event.js";
|
|
37
37
|
import { WorktreeEvent } from "./worktree-event.js";
|
|
38
|
+
import { WebSearch } from "./websearch.js";
|
|
38
39
|
const sessionV1DurableDefinitions = SessionV1.Event.Definitions.filter((definition) => definition.durability === "durable");
|
|
39
40
|
const sessionV1LiveDefinitions = SessionV1.Event.Definitions.filter((definition) => definition.durability === "ephemeral");
|
|
40
41
|
const coreDefinitions = Event.inventory(...sessionV1DurableDefinitions, ...SessionEvent.Definitions);
|
|
41
42
|
const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Integration.Event.Definitions, ...Catalog.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
|
|
42
|
-
const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...ProjectDirectories.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Question.Event.Definitions, ...Form.Event.Definitions);
|
|
43
|
+
const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...ProjectDirectories.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Question.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
|
|
43
44
|
export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
|
|
44
45
|
// Current events the TUI consumes from the public stream.
|
|
45
46
|
...SessionStatusEvent.Definitions, ...TuiEvent.Definitions, ...InstallationEvent.Definitions, ...VcsEvent.Definitions, McpEvent.StatusChanged, McpEvent.ResourcesChanged,
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { Project } from "./project.js";
|
|
|
18
18
|
export { ProjectCopy } from "./project-copy.js";
|
|
19
19
|
export { Provider } from "./provider.js";
|
|
20
20
|
export { Reference } from "./reference.js";
|
|
21
|
+
export { WebSearch } from "./websearch.js";
|
|
21
22
|
export { Session } from "./session.js";
|
|
22
23
|
export { Vcs } from "./vcs.js";
|
|
23
24
|
export { SessionPending } from "./session-pending.js";
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { Project } from "./project.js";
|
|
|
18
18
|
export { ProjectCopy } from "./project-copy.js";
|
|
19
19
|
export { Provider } from "./provider.js";
|
|
20
20
|
export { Reference } from "./reference.js";
|
|
21
|
+
export { WebSearch } from "./websearch.js";
|
|
21
22
|
export { Session } from "./session.js";
|
|
22
23
|
export { Vcs } from "./vcs.js";
|
|
23
24
|
export { SessionPending } from "./session-pending.js";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export * as WebSearch from "./websearch.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ID: Schema.brand<Schema.String, "WebSearch.ID">;
|
|
4
|
+
export type ID = typeof ID.Type;
|
|
5
|
+
export interface Provider extends Schema.Schema.Type<typeof Provider> {
|
|
6
|
+
}
|
|
7
|
+
export declare const Provider: Schema.Struct<{
|
|
8
|
+
readonly id: Schema.brand<Schema.String, "WebSearch.ID">;
|
|
9
|
+
readonly name: Schema.String;
|
|
10
|
+
}>;
|
|
11
|
+
export interface Input extends Schema.Schema.Type<typeof Input> {
|
|
12
|
+
}
|
|
13
|
+
export declare const Input: Schema.Struct<{
|
|
14
|
+
readonly query: Schema.String;
|
|
15
|
+
readonly providerID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WebSearch.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "WebSearch.ID">>, never, never>;
|
|
16
|
+
}>;
|
|
17
|
+
export type ProviderInput = Pick<Input, "query">;
|
|
18
|
+
export interface Result extends Schema.Schema.Type<typeof Result> {
|
|
19
|
+
}
|
|
20
|
+
export declare const Result: Schema.Struct<{
|
|
21
|
+
readonly url: Schema.String;
|
|
22
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
23
|
+
readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
24
|
+
readonly time: Schema.Struct<{
|
|
25
|
+
readonly published: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
declare const Response_base: Schema.Class<Response, Schema.Struct<{
|
|
29
|
+
readonly providerID: Schema.brand<Schema.String, "WebSearch.ID">;
|
|
30
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
31
|
+
readonly url: Schema.String;
|
|
32
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
33
|
+
readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
34
|
+
readonly time: Schema.Struct<{
|
|
35
|
+
readonly published: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
36
|
+
}>;
|
|
37
|
+
}>>;
|
|
38
|
+
}>, {}>;
|
|
39
|
+
export declare class Response extends Response_base {
|
|
40
|
+
}
|
|
41
|
+
export declare const Event: {
|
|
42
|
+
Updated: Schema.Struct<{
|
|
43
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
44
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
45
|
+
};
|
|
46
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
47
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
48
|
+
readonly type: Schema.Literal<"websearch.updated">;
|
|
49
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
50
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
51
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
52
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
53
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
54
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
55
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
56
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
57
|
+
}>, never, never>;
|
|
58
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
59
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
60
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
61
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
62
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
63
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
64
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
65
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
66
|
+
}>, never, never>;
|
|
67
|
+
}>>, never, never>;
|
|
68
|
+
readonly data: Schema.Struct<{}>;
|
|
69
|
+
}> & {
|
|
70
|
+
type: "websearch.updated";
|
|
71
|
+
durability: "ephemeral";
|
|
72
|
+
durable: undefined;
|
|
73
|
+
data: Schema.Struct<{}>;
|
|
74
|
+
};
|
|
75
|
+
Definitions: readonly [Schema.Struct<{
|
|
76
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
77
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
78
|
+
};
|
|
79
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
80
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
81
|
+
readonly type: Schema.Literal<"websearch.updated">;
|
|
82
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
83
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
84
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
85
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
86
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
87
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
88
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
89
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
90
|
+
}>, never, never>;
|
|
91
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
92
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
93
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
94
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
95
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
96
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
97
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
98
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
99
|
+
}>, never, never>;
|
|
100
|
+
}>>, never, never>;
|
|
101
|
+
readonly data: Schema.Struct<{}>;
|
|
102
|
+
}> & {
|
|
103
|
+
type: "websearch.updated";
|
|
104
|
+
durability: "ephemeral";
|
|
105
|
+
durable: undefined;
|
|
106
|
+
data: Schema.Struct<{}>;
|
|
107
|
+
}];
|
|
108
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * as WebSearch from "./websearch.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { ephemeral, inventory } from "./event.js";
|
|
4
|
+
import { optional } from "./schema.js";
|
|
5
|
+
export const ID = Schema.String.pipe(Schema.brand("WebSearch.ID"));
|
|
6
|
+
export const Provider = Schema.Struct({
|
|
7
|
+
id: ID,
|
|
8
|
+
name: Schema.String,
|
|
9
|
+
}).annotate({ identifier: "WebSearch.Provider" });
|
|
10
|
+
export const Input = Schema.Struct({
|
|
11
|
+
query: Schema.String,
|
|
12
|
+
providerID: ID.pipe(optional),
|
|
13
|
+
}).annotate({ identifier: "WebSearch.Input" });
|
|
14
|
+
export const Result = Schema.Struct({
|
|
15
|
+
url: Schema.String,
|
|
16
|
+
title: Schema.String.pipe(optional),
|
|
17
|
+
content: Schema.String.pipe(optional),
|
|
18
|
+
time: Schema.Struct({
|
|
19
|
+
published: Schema.Finite.pipe(optional),
|
|
20
|
+
}),
|
|
21
|
+
}).annotate({ identifier: "WebSearch.Result" });
|
|
22
|
+
export class Response extends Schema.Class("WebSearch.Response")({
|
|
23
|
+
providerID: ID,
|
|
24
|
+
results: Schema.Array(Result),
|
|
25
|
+
}) {
|
|
26
|
+
}
|
|
27
|
+
const Updated = ephemeral({
|
|
28
|
+
type: "websearch.updated",
|
|
29
|
+
schema: {},
|
|
30
|
+
});
|
|
31
|
+
export const Event = { Updated, Definitions: inventory(Updated) };
|