@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.
- package/dist/agent.d.ts +164 -0
- package/dist/agent.js +46 -0
- package/dist/ai.d.ts +4 -0
- package/dist/ai.js +5 -0
- package/dist/catalog.d.ts +69 -0
- package/dist/catalog.js +4 -0
- package/dist/command.d.ts +124 -0
- package/dist/command.js +19 -0
- package/dist/config/agent.d.ts +42 -0
- package/dist/config/agent.js +20 -0
- package/dist/config/command.d.ts +27 -0
- package/dist/config/command.js +12 -0
- package/dist/config/compaction.d.ts +14 -0
- package/dist/config/compaction.js +13 -0
- package/dist/config/experimental.d.ts +17 -0
- package/dist/config/experimental.js +16 -0
- package/dist/config/formatter.d.ts +11 -0
- package/dist/config/formatter.js +11 -0
- package/dist/config/lsp.d.ts +20 -0
- package/dist/config/lsp.js +16 -0
- package/dist/config/mcp.d.ts +18 -0
- package/dist/config/mcp.js +14 -0
- package/dist/config/media.d.ts +15 -0
- package/dist/config/media.js +14 -0
- package/dist/config/model.d.ts +18 -0
- package/dist/config/model.js +28 -0
- package/dist/config/plugin.d.ts +11 -0
- package/dist/config/plugin.js +10 -0
- package/dist/config/policy.d.ts +10 -0
- package/dist/config/policy.js +8 -0
- package/dist/config/provider.d.ts +106 -0
- package/dist/config/provider.js +62 -0
- package/dist/config/reference.d.ts +21 -0
- package/dist/config/reference.js +18 -0
- package/dist/config/tool-output.d.ts +8 -0
- package/dist/config/tool-output.js +8 -0
- package/dist/config/warming.d.ts +10 -0
- package/dist/config/warming.js +16 -0
- package/dist/config/watcher.d.ts +7 -0
- package/dist/config/watcher.js +7 -0
- package/dist/config/websearch.d.ts +9 -0
- package/dist/config/websearch.js +8 -0
- package/dist/config.d.ts +175 -0
- package/dist/config.js +136 -0
- package/dist/connection.d.ts +28 -0
- package/dist/connection.js +15 -0
- package/dist/credential.d.ts +38 -0
- package/dist/credential.js +25 -0
- package/dist/durable-event-manifest.d.ts +3 -0
- package/dist/durable-event-manifest.js +5 -0
- package/dist/event-log.d.ts +14 -0
- package/dist/event-log.js +17 -0
- package/dist/event-manifest.d.ts +11372 -0
- package/dist/event-manifest.js +45 -0
- package/dist/event.d.ts +142 -0
- package/dist/event.js +110 -0
- package/dist/file-diff.d.ts +21 -0
- package/dist/file-diff.js +18 -0
- package/dist/filesystem-v1.d.ts +1 -0
- package/dist/filesystem-v1.js +1 -0
- package/dist/filesystem.d.ts +118 -0
- package/dist/filesystem.js +35 -0
- package/dist/form.d.ts +1259 -0
- package/dist/form.js +120 -0
- package/dist/ide-event.d.ts +76 -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 +39 -0
- package/dist/index.js +39 -0
- package/dist/installation-event.d.ts +149 -0
- package/dist/installation-event.js +16 -0
- package/dist/instruction-entry.d.ts +23 -0
- package/dist/instruction-entry.js +22 -0
- package/dist/instruction.d.ts +13 -0
- package/dist/instruction.js +8 -0
- package/dist/integration-id.d.ts +5 -0
- package/dist/integration-id.js +3 -0
- package/dist/integration.d.ts +1675 -0
- package/dist/integration.js +87 -0
- package/dist/legacy-event.d.ts +1 -0
- package/dist/legacy-event.js +1 -0
- package/dist/llm.d.ts +4 -0
- package/dist/llm.js +3 -0
- package/dist/location.d.ts +37 -0
- package/dist/location.js +22 -0
- package/dist/lsp-event.d.ts +67 -0
- package/dist/lsp-event.js +4 -0
- package/dist/mcp-event.d.ts +222 -0
- package/dist/mcp-event.js +24 -0
- package/dist/mcp.d.ts +138 -0
- package/dist/mcp.js +111 -0
- package/dist/model.d.ts +186 -0
- package/dist/model.js +104 -0
- package/dist/models-dev.d.ts +69 -0
- package/dist/models-dev.js +7 -0
- package/dist/money.d.ts +10 -0
- package/dist/money.js +5 -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 +306 -0
- package/dist/permission.js +45 -0
- package/dist/plugin.d.ts +150 -0
- package/dist/plugin.js +16 -0
- package/dist/project-id.d.ts +5 -0
- package/dist/project-id.js +3 -0
- package/dist/project.d.ts +241 -0
- package/dist/project.js +37 -0
- package/dist/prompt-input.d.ts +143 -0
- package/dist/prompt-input.js +25 -0
- package/dist/prompt.d.ts +297 -0
- package/dist/prompt.js +61 -0
- package/dist/provider.d.ts +60 -0
- package/dist/provider.js +42 -0
- package/dist/pty-ticket.d.ts +8 -0
- package/dist/pty-ticket.js +7 -0
- package/dist/pty.d.ts +462 -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 +15 -0
- package/dist/question.js +15 -0
- package/dist/reference.d.ts +120 -0
- package/dist/reference.js +30 -0
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +14 -0
- package/dist/server-event.d.ts +132 -0
- package/dist/server-event.js +5 -0
- package/dist/session-compaction-event.d.ts +87 -0
- package/dist/session-compaction-event.js +10 -0
- package/dist/session-error.d.ts +9 -0
- package/dist/session-error.js +8 -0
- package/dist/session-event.d.ts +17994 -0
- package/dist/session-event.js +499 -0
- package/dist/session-fork.d.ts +26 -0
- package/dist/session-fork.js +11 -0
- package/dist/session-id.d.ts +6 -0
- package/dist/session-id.js +10 -0
- package/dist/session-inbox.d.ts +748 -0
- package/dist/session-inbox.js +47 -0
- package/dist/session-message.d.ts +1512 -0
- package/dist/session-message.js +209 -0
- package/dist/session-revert.d.ts +480 -0
- package/dist/session-revert.js +63 -0
- package/dist/session-status-event.d.ts +299 -0
- package/dist/session-status-event.js +43 -0
- package/dist/session-transfer.d.ts +744 -0
- package/dist/session-transfer.js +8 -0
- package/dist/session-v1.d.ts +1 -0
- package/dist/session-v1.js +1 -0
- package/dist/session.d.ts +218 -0
- package/dist/session.js +45 -0
- package/dist/shell.d.ts +381 -0
- package/dist/shell.js +58 -0
- package/dist/skill.d.ts +133 -0
- package/dist/skill.js +48 -0
- package/dist/snapshot.d.ts +4 -0
- package/dist/snapshot.js +3 -0
- package/dist/token-usage.d.ts +13 -0
- package/dist/token-usage.js +11 -0
- package/dist/tool.d.ts +74 -0
- package/dist/tool.js +22 -0
- package/dist/tui-event.d.ts +307 -0
- package/dist/tui-event.js +53 -0
- package/dist/v1/filesystem.d.ts +78 -0
- package/dist/v1/filesystem.js +8 -0
- package/dist/v1/legacy-event.d.ts +108 -0
- package/dist/v1/legacy-event.js +15 -0
- package/dist/v1/permission.d.ts +316 -0
- package/dist/v1/permission.js +41 -0
- package/dist/v1/question.d.ts +444 -0
- package/dist/v1/question.js +57 -0
- package/dist/v1/session.d.ts +7657 -0
- package/dist/v1/session.js +535 -0
- package/dist/vcs-event.d.ts +76 -0
- package/dist/vcs-event.js +11 -0
- package/dist/vcs.d.ts +26 -0
- package/dist/vcs.js +17 -0
- package/dist/websearch.d.ts +108 -0
- package/dist/websearch.js +31 -0
- package/dist/workspace-event.d.ts +247 -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 +153 -0
- package/dist/worktree-event.js +18 -0
- package/dist/worktree.d.ts +255 -0
- package/dist/worktree.js +61 -0
- package/package.json +42 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as SessionTransfer from "./session-transfer.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Session } from "./session.js";
|
|
4
|
+
import { SessionMessage } from "./session-message.js";
|
|
5
|
+
export const Data = Schema.Struct({
|
|
6
|
+
info: Session.Info,
|
|
7
|
+
messages: Schema.Array(SessionMessage.Info),
|
|
8
|
+
}).annotate({ identifier: "SessionTransfer.Data" });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./v1/session.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./v1/session.js";
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
export * as Session from "./session.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { SessionEvent } from "./session-event.js";
|
|
4
|
+
import { SessionID } from "./session-id.js";
|
|
5
|
+
import { Revert } from "./session-revert.js";
|
|
6
|
+
import { SessionFork } from "./session-fork.js";
|
|
7
|
+
export declare const ID: Schema.brand<Schema.String, "SessionID"> & {
|
|
8
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
9
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10
|
+
};
|
|
11
|
+
export type ID = SessionID;
|
|
12
|
+
export declare const Event: typeof SessionEvent;
|
|
13
|
+
export { Revert };
|
|
14
|
+
export declare const ForkBoundary: Schema.Union<readonly [Schema.Struct<{
|
|
15
|
+
readonly type: Schema.Literal<"before">;
|
|
16
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
17
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
18
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
19
|
+
};
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly type: Schema.Literal<"through">;
|
|
22
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
23
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
24
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
25
|
+
};
|
|
26
|
+
}>]>;
|
|
27
|
+
export type ForkBoundary = SessionFork.Boundary;
|
|
28
|
+
export declare const ForkRequestBoundary: Schema.Union<readonly [Schema.Struct<{
|
|
29
|
+
readonly type: Schema.Literal<"before">;
|
|
30
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
31
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
32
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
33
|
+
};
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly type: Schema.Literal<"through">;
|
|
36
|
+
}>]>;
|
|
37
|
+
export type ForkRequestBoundary = SessionFork.RequestBoundary;
|
|
38
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
39
|
+
}
|
|
40
|
+
export declare const Info: Schema.Struct<{
|
|
41
|
+
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
42
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
43
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
44
|
+
};
|
|
45
|
+
readonly parentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
46
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
47
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
48
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
49
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
50
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
51
|
+
}>, never, never>;
|
|
52
|
+
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
53
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
54
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
55
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
56
|
+
};
|
|
57
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
58
|
+
readonly type: Schema.Literal<"before">;
|
|
59
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
60
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
61
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
62
|
+
};
|
|
63
|
+
}>, Schema.Struct<{
|
|
64
|
+
readonly type: Schema.Literal<"through">;
|
|
65
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
66
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
67
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
68
|
+
};
|
|
69
|
+
}>]>;
|
|
70
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
71
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
72
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
73
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
74
|
+
};
|
|
75
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
76
|
+
readonly type: Schema.Literal<"before">;
|
|
77
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
78
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
79
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
80
|
+
};
|
|
81
|
+
}>, Schema.Struct<{
|
|
82
|
+
readonly type: Schema.Literal<"through">;
|
|
83
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
84
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
85
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
86
|
+
};
|
|
87
|
+
}>]>;
|
|
88
|
+
}>>, never, never>;
|
|
89
|
+
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
90
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
91
|
+
};
|
|
92
|
+
readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
|
|
93
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
94
|
+
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
|
95
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
96
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
97
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
98
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
99
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
100
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
101
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
102
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
103
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
104
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
105
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
106
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
107
|
+
};
|
|
108
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
109
|
+
}> & {
|
|
110
|
+
parse: (input: string) => {
|
|
111
|
+
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
112
|
+
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
113
|
+
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
114
|
+
};
|
|
115
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
116
|
+
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
|
117
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
118
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
119
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
120
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
121
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
122
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
123
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
124
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
125
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
126
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
127
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
128
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
129
|
+
};
|
|
130
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
131
|
+
}> & {
|
|
132
|
+
parse: (input: string) => {
|
|
133
|
+
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
134
|
+
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
135
|
+
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
136
|
+
};
|
|
137
|
+
}>, never, never>;
|
|
138
|
+
readonly cost: Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
139
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
140
|
+
};
|
|
141
|
+
readonly tokens: Schema.Struct<{
|
|
142
|
+
readonly input: Schema.Finite;
|
|
143
|
+
readonly output: Schema.Finite;
|
|
144
|
+
readonly reasoning: Schema.Finite;
|
|
145
|
+
readonly cache: Schema.Struct<{
|
|
146
|
+
readonly read: Schema.Finite;
|
|
147
|
+
readonly write: Schema.Finite;
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
readonly time: Schema.Struct<{
|
|
151
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
152
|
+
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
153
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
|
|
154
|
+
}>;
|
|
155
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
156
|
+
readonly location: Schema.Struct<{
|
|
157
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
158
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
159
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
160
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
161
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
162
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
163
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
164
|
+
}>, never, never>;
|
|
165
|
+
}>;
|
|
166
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
167
|
+
readonly revert: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
168
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
169
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
170
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
171
|
+
};
|
|
172
|
+
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
173
|
+
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
174
|
+
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
175
|
+
readonly file: Schema.String;
|
|
176
|
+
readonly patch: Schema.String;
|
|
177
|
+
readonly additions: Schema.Int;
|
|
178
|
+
readonly deletions: Schema.Int;
|
|
179
|
+
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
180
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
181
|
+
readonly file: Schema.String;
|
|
182
|
+
readonly patch: Schema.String;
|
|
183
|
+
readonly additions: Schema.Int;
|
|
184
|
+
readonly deletions: Schema.Int;
|
|
185
|
+
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
186
|
+
}>>>, never, never>;
|
|
187
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
188
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
189
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
190
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
191
|
+
};
|
|
192
|
+
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
193
|
+
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
194
|
+
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
195
|
+
readonly file: Schema.String;
|
|
196
|
+
readonly patch: Schema.String;
|
|
197
|
+
readonly additions: Schema.Int;
|
|
198
|
+
readonly deletions: Schema.Int;
|
|
199
|
+
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
200
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
201
|
+
readonly file: Schema.String;
|
|
202
|
+
readonly patch: Schema.String;
|
|
203
|
+
readonly additions: Schema.Int;
|
|
204
|
+
readonly deletions: Schema.Int;
|
|
205
|
+
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
206
|
+
}>>>, never, never>;
|
|
207
|
+
}>>, never, never>;
|
|
208
|
+
}>;
|
|
209
|
+
export declare const ListAnchor: Schema.Struct<{
|
|
210
|
+
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
211
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
212
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
213
|
+
};
|
|
214
|
+
readonly time: Schema.Finite;
|
|
215
|
+
readonly direction: Schema.Literals<readonly ["previous", "next"]>;
|
|
216
|
+
}>;
|
|
217
|
+
export interface ListAnchor extends Schema.Schema.Type<typeof ListAnchor> {
|
|
218
|
+
}
|
package/dist/session.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export * as Session from "./session.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Agent } from "./agent.js";
|
|
4
|
+
import { Location } from "./location.js";
|
|
5
|
+
import { Model } from "./model.js";
|
|
6
|
+
import { Project } from "./project.js";
|
|
7
|
+
import { DateTimeUtcFromMillis, optional, RelativePath } from "./schema.js";
|
|
8
|
+
import { SessionEvent } from "./session-event.js";
|
|
9
|
+
import { SessionID } from "./session-id.js";
|
|
10
|
+
import { Money } from "./money.js";
|
|
11
|
+
import { TokenUsage } from "./token-usage.js";
|
|
12
|
+
import { Revert } from "./session-revert.js";
|
|
13
|
+
import { SessionFork } from "./session-fork.js";
|
|
14
|
+
export const ID = SessionID;
|
|
15
|
+
export const Event = SessionEvent;
|
|
16
|
+
export { Revert };
|
|
17
|
+
export const ForkBoundary = SessionFork.Boundary;
|
|
18
|
+
export const ForkRequestBoundary = SessionFork.RequestBoundary;
|
|
19
|
+
export const Info = Schema.Struct({
|
|
20
|
+
id: ID,
|
|
21
|
+
parentID: ID.pipe(optional),
|
|
22
|
+
fork: Schema.Struct({
|
|
23
|
+
sessionID: ID,
|
|
24
|
+
boundary: ForkBoundary,
|
|
25
|
+
}).pipe(optional),
|
|
26
|
+
projectID: Project.ID,
|
|
27
|
+
agent: Agent.ID.pipe(optional),
|
|
28
|
+
model: Model.Ref.pipe(optional),
|
|
29
|
+
cost: Money.USD,
|
|
30
|
+
tokens: TokenUsage.Info,
|
|
31
|
+
time: Schema.Struct({
|
|
32
|
+
created: DateTimeUtcFromMillis,
|
|
33
|
+
updated: DateTimeUtcFromMillis,
|
|
34
|
+
archived: DateTimeUtcFromMillis.pipe(optional),
|
|
35
|
+
}),
|
|
36
|
+
title: Schema.String.pipe(optional),
|
|
37
|
+
location: Location.Ref,
|
|
38
|
+
subpath: RelativePath.pipe(optional),
|
|
39
|
+
revert: Revert.pipe(optional),
|
|
40
|
+
}).annotate({ identifier: "Session.Info" });
|
|
41
|
+
export const ListAnchor = Schema.Struct({
|
|
42
|
+
id: ID,
|
|
43
|
+
time: Schema.Finite,
|
|
44
|
+
direction: Schema.Literals(["previous", "next"]),
|
|
45
|
+
}).annotate({ identifier: "Session.ListAnchor" });
|