@kilocode/schema 0.0.0-stage → 0.0.0-v2-9
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 +179 -0
- package/dist/agent.js +45 -0
- package/dist/command.d.ts +76 -0
- package/dist/command.js +13 -0
- package/dist/config/agent.d.ts +42 -0
- package/dist/config/agent.js +21 -0
- package/dist/config/command.d.ts +28 -0
- package/dist/config/command.js +13 -0
- package/dist/config/compaction.d.ts +14 -0
- package/dist/config/compaction.js +13 -0
- package/dist/config/experimental.d.ts +20 -0
- package/dist/config/experimental.js +27 -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 +20 -0
- package/dist/config/mcp.js +15 -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 +392 -0
- package/dist/config/provider.js +109 -0
- package/dist/config/reference.d.ts +21 -0
- package/dist/config/reference.js +18 -0
- package/dist/config/shell.d.ts +9 -0
- package/dist/config/shell.js +7 -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 +13 -0
- package/dist/config/worktree.d.ts +7 -0
- package/dist/config/worktree.js +7 -0
- package/dist/config.d.ts +182 -0
- package/dist/config.js +135 -0
- package/dist/connection.d.ts +79 -0
- package/dist/connection.js +25 -0
- package/dist/credential-legacy.d.ts +54 -0
- package/dist/credential-legacy.js +19 -0
- package/dist/credential.d.ts +255 -0
- package/dist/credential.js +56 -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 +12865 -0
- package/dist/event-manifest.js +48 -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 +123 -0
- package/dist/filesystem.js +38 -0
- package/dist/form.d.ts +1438 -0
- package/dist/form.js +128 -0
- package/dist/identifier.d.ts +4 -0
- package/dist/identifier.js +25 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +41 -0
- package/dist/installation-event.d.ts +149 -0
- package/dist/installation-event.js +16 -0
- package/dist/instruction-entry.d.ts +29 -0
- package/dist/instruction-entry.js +26 -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 +2410 -0
- package/dist/integration.js +91 -0
- package/dist/kilocode/gateway.d.ts +975 -0
- package/dist/kilocode/gateway.js +328 -0
- package/dist/kilocode/handshake.d.ts +36 -0
- package/dist/kilocode/handshake.js +29 -0
- package/dist/kilocode/marketplace.d.ts +593 -0
- package/dist/kilocode/marketplace.js +122 -0
- package/dist/kilocode/provider-usage.d.ts +371 -0
- package/dist/kilocode/provider-usage.js +60 -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-event.d.ts +68 -0
- package/dist/location-event.js +5 -0
- package/dist/location.d.ts +56 -0
- package/dist/location.js +28 -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 +145 -0
- package/dist/mcp.js +120 -0
- package/dist/model-compatibility.d.ts +38 -0
- package/dist/model-compatibility.js +28 -0
- package/dist/model.d.ts +406 -0
- package/dist/model.js +115 -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 +22 -0
- package/dist/permission-saved.js +16 -0
- package/dist/permission-v1.d.ts +1 -0
- package/dist/permission-v1.js +1 -0
- package/dist/permission.d.ts +302 -0
- package/dist/permission.js +46 -0
- package/dist/persistent-pty.d.ts +539 -0
- package/dist/persistent-pty.js +55 -0
- package/dist/plugin.d.ts +132 -0
- package/dist/plugin.js +37 -0
- package/dist/project-id.d.ts +5 -0
- package/dist/project-id.js +3 -0
- package/dist/project.d.ts +270 -0
- package/dist/project.js +47 -0
- package/dist/prompt-input.d.ts +110 -0
- package/dist/prompt-input.js +21 -0
- package/dist/prompt.d.ts +297 -0
- package/dist/prompt.js +61 -0
- package/dist/provider.d.ts +275 -0
- package/dist/provider.js +66 -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.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/rpc.d.ts +111 -0
- package/dist/rpc.js +9 -0
- package/dist/schema.d.ts +11 -0
- package/dist/schema.js +17 -0
- package/dist/server-event.d.ts +132 -0
- package/dist/server-event.js +5 -0
- package/dist/session-error.d.ts +16 -0
- package/dist/session-error.js +11 -0
- package/dist/session-event.d.ts +21417 -0
- package/dist/session-event.js +565 -0
- package/dist/session-fork.d.ts +16 -0
- package/dist/session-fork.js +7 -0
- package/dist/session-id.d.ts +5 -0
- package/dist/session-id.js +6 -0
- package/dist/session-inbox.d.ts +756 -0
- package/dist/session-inbox.js +47 -0
- package/dist/session-legacy.d.ts +7 -0
- package/dist/session-legacy.js +118 -0
- package/dist/session-message.d.ts +2049 -0
- package/dist/session-message.js +234 -0
- package/dist/session-metadata.d.ts +8 -0
- package/dist/session-metadata.js +9 -0
- package/dist/session-revert.d.ts +896 -0
- package/dist/session-revert.js +63 -0
- package/dist/session-stats.d.ts +186 -0
- package/dist/session-stats.js +53 -0
- package/dist/session-status-event.d.ts +291 -0
- package/dist/session-status-event.js +45 -0
- package/dist/session-transfer.d.ts +910 -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 +320 -0
- package/dist/session.js +116 -0
- package/dist/shell.d.ts +386 -0
- package/dist/shell.js +61 -0
- package/dist/skill.d.ts +130 -0
- package/dist/skill.js +47 -0
- package/dist/snapshot.d.ts +4 -0
- package/dist/snapshot.js +3 -0
- package/dist/token-usage.d.ts +14 -0
- package/dist/token-usage.js +14 -0
- package/dist/tool.d.ts +78 -0
- package/dist/tool.js +22 -0
- package/dist/tui-event.d.ts +307 -0
- package/dist/tui-event.js +52 -0
- package/dist/v1/filesystem.d.ts +78 -0
- package/dist/v1/filesystem.js +8 -0
- package/dist/v1/legacy-event.d.ts +104 -0
- package/dist/v1/legacy-event.js +15 -0
- package/dist/v1/permission.d.ts +306 -0
- package/dist/v1/permission.js +41 -0
- package/dist/v1/session.d.ts +6977 -0
- package/dist/v1/session.js +531 -0
- package/dist/vcs-event.d.ts +76 -0
- package/dist/vcs-event.js +11 -0
- package/dist/vcs.d.ts +36 -0
- package/dist/vcs.js +24 -0
- package/dist/websearch.d.ts +108 -0
- package/dist/websearch.js +33 -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 +14 -0
- package/dist/workspace.d.ts +15 -0
- package/dist/workspace.js +14 -0
- package/dist/worktree-event.d.ts +153 -0
- package/dist/worktree-event.js +18 -0
- package/dist/worktree.d.ts +282 -0
- package/dist/worktree.js +83 -0
- package/package.json +42 -4
- package/README.md +0 -3
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
export * as SessionMessage from "./session-message.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { optional } from "./schema.js";
|
|
4
|
+
import { Content } from "./tool.js";
|
|
5
|
+
import { Location } from "./location.js";
|
|
6
|
+
import { Model } from "./model.js";
|
|
7
|
+
import { Project } from "./project.js";
|
|
8
|
+
import { Prompt } from "./prompt.js";
|
|
9
|
+
import { DateTimeUtcFromMillis, PositiveInt, RelativePath, statics } from "./schema.js";
|
|
10
|
+
import { ascending } from "./identifier.js";
|
|
11
|
+
import { Shell as ShellSchema } from "./shell.js";
|
|
12
|
+
import { FinishReason } from "./llm.js";
|
|
13
|
+
import { SessionError } from "./session-error.js";
|
|
14
|
+
import { Agent } from "./agent.js";
|
|
15
|
+
import { Skill as SkillSchema } from "./skill.js";
|
|
16
|
+
import { Money } from "./money.js";
|
|
17
|
+
import { Snapshot } from "./snapshot.js";
|
|
18
|
+
import { TokenUsage } from "./token-usage.js";
|
|
19
|
+
export const ID = Schema.String.check(Schema.isStartingWith("msg_")).pipe(Schema.brand("Session.Message.ID"), Schema.annotate({ identifier: "Session.Message.ID" }), statics((schema) => ({
|
|
20
|
+
create: () => schema.make("msg_" + ascending()),
|
|
21
|
+
fromEvent: (eventID) => schema.make(eventID.replace(/^evt_/, "msg_")),
|
|
22
|
+
})));
|
|
23
|
+
const Base = {
|
|
24
|
+
id: ID,
|
|
25
|
+
metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
|
|
26
|
+
time: Schema.Struct({ created: DateTimeUtcFromMillis }),
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Provider-owned replay data, keyed by the producing provider's metadata fields and echoed back verbatim. A tool's
|
|
30
|
+
* result data is merged into its call data, so adapters must not reuse a key with a different value across the two.
|
|
31
|
+
*/
|
|
32
|
+
export const Native = Schema.Record(Schema.String, Schema.Unknown).annotate({
|
|
33
|
+
identifier: "Session.Message.Native",
|
|
34
|
+
});
|
|
35
|
+
export const AgentSelected = Schema.Struct({
|
|
36
|
+
...Base,
|
|
37
|
+
type: Schema.tag("agent-switched"),
|
|
38
|
+
agent: Agent.ID,
|
|
39
|
+
previous: Agent.ID.pipe(optional),
|
|
40
|
+
}).annotate({ identifier: "Session.Message.AgentSelected" });
|
|
41
|
+
export const ModelSelected = Schema.Struct({
|
|
42
|
+
...Base,
|
|
43
|
+
type: Schema.tag("model-switched"),
|
|
44
|
+
model: Model.Ref,
|
|
45
|
+
previous: Model.Ref.pipe(optional),
|
|
46
|
+
}).annotate({ identifier: "Session.Message.ModelSelected" });
|
|
47
|
+
export const LocationSwitched = Schema.Struct({
|
|
48
|
+
...Base,
|
|
49
|
+
type: Schema.tag("location-switched"),
|
|
50
|
+
location: Location.Ref,
|
|
51
|
+
projectID: Project.ID.pipe(optional),
|
|
52
|
+
subpath: RelativePath.pipe(optional),
|
|
53
|
+
previous: Schema.Struct({
|
|
54
|
+
location: Location.Ref,
|
|
55
|
+
projectID: Project.ID.pipe(optional),
|
|
56
|
+
subpath: RelativePath.pipe(optional),
|
|
57
|
+
}).pipe(optional),
|
|
58
|
+
}).annotate({ identifier: "Session.Message.LocationSwitched" });
|
|
59
|
+
export const User = Schema.Struct({
|
|
60
|
+
...Base,
|
|
61
|
+
text: Prompt.fields.text,
|
|
62
|
+
files: Prompt.fields.files,
|
|
63
|
+
agents: Prompt.fields.agents,
|
|
64
|
+
skills: Prompt.fields.skills,
|
|
65
|
+
type: Schema.tag("user"),
|
|
66
|
+
}).annotate({ identifier: "Session.Message.User" });
|
|
67
|
+
export const Synthetic = Schema.Struct({
|
|
68
|
+
...Base,
|
|
69
|
+
text: Schema.String,
|
|
70
|
+
description: Schema.String.pipe(optional),
|
|
71
|
+
type: Schema.tag("synthetic"),
|
|
72
|
+
}).annotate({ identifier: "Session.Message.Synthetic" });
|
|
73
|
+
export const System = Schema.Struct({
|
|
74
|
+
...Base,
|
|
75
|
+
type: Schema.tag("system"),
|
|
76
|
+
/** The model-facing update text, frozen at emit time. */
|
|
77
|
+
text: Schema.String,
|
|
78
|
+
/** A short human-readable summary for transcript display. */
|
|
79
|
+
description: Schema.String.pipe(optional),
|
|
80
|
+
}).annotate({ identifier: "Session.Message.System" });
|
|
81
|
+
export const Skill = Schema.Struct({
|
|
82
|
+
...Base,
|
|
83
|
+
type: Schema.tag("skill"),
|
|
84
|
+
skill: SkillSchema.ID,
|
|
85
|
+
name: SkillSchema.Name,
|
|
86
|
+
text: Schema.String,
|
|
87
|
+
}).annotate({ identifier: "Session.Message.Skill" });
|
|
88
|
+
export const Shell = Schema.Struct({
|
|
89
|
+
...Base,
|
|
90
|
+
type: Schema.tag("shell"),
|
|
91
|
+
shellID: ShellSchema.ID,
|
|
92
|
+
command: Schema.String,
|
|
93
|
+
status: ShellSchema.Status,
|
|
94
|
+
exit: Schema.Number.pipe(optional),
|
|
95
|
+
output: ShellSchema.Output.pipe(optional),
|
|
96
|
+
time: Schema.Struct({
|
|
97
|
+
created: DateTimeUtcFromMillis,
|
|
98
|
+
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
99
|
+
}),
|
|
100
|
+
}).annotate({ identifier: "Session.Message.Shell" });
|
|
101
|
+
export const ToolStateStreaming = Schema.Struct({
|
|
102
|
+
status: Schema.tag("streaming"),
|
|
103
|
+
input: Schema.String,
|
|
104
|
+
}).annotate({ identifier: "Session.Message.ToolState.Streaming" });
|
|
105
|
+
export const ToolStateRunning = Schema.Struct({
|
|
106
|
+
status: Schema.tag("running"),
|
|
107
|
+
input: Schema.Record(Schema.String, Schema.Unknown),
|
|
108
|
+
metadata: Schema.Record(Schema.String, Schema.Json),
|
|
109
|
+
}).annotate({ identifier: "Session.Message.ToolState.Running" });
|
|
110
|
+
export const ToolStateCompleted = Schema.Struct({
|
|
111
|
+
status: Schema.tag("completed"),
|
|
112
|
+
input: Schema.Record(Schema.String, Schema.Unknown),
|
|
113
|
+
content: Schema.NonEmptyArray(Content),
|
|
114
|
+
metadata: Schema.Record(Schema.String, Schema.Json).pipe(optional),
|
|
115
|
+
}).annotate({ identifier: "Session.Message.ToolState.Completed" });
|
|
116
|
+
export const ToolStateError = Schema.Struct({
|
|
117
|
+
status: Schema.tag("error"),
|
|
118
|
+
input: Schema.Record(Schema.String, Schema.Unknown),
|
|
119
|
+
error: SessionError.Error,
|
|
120
|
+
content: Schema.NonEmptyArray(Content).pipe(optional),
|
|
121
|
+
metadata: Schema.Record(Schema.String, Schema.Json).pipe(optional),
|
|
122
|
+
}).annotate({ identifier: "Session.Message.ToolState.Error" });
|
|
123
|
+
export const ToolState = Schema.Union([ToolStateStreaming, ToolStateRunning, ToolStateCompleted, ToolStateError]).pipe(Schema.toTaggedUnion("status"));
|
|
124
|
+
export const AssistantTool = Schema.Struct({
|
|
125
|
+
type: Schema.tag("tool"),
|
|
126
|
+
id: Schema.String,
|
|
127
|
+
name: Schema.String,
|
|
128
|
+
executed: Schema.Boolean.pipe(optional),
|
|
129
|
+
native: Native.pipe(optional),
|
|
130
|
+
state: ToolState,
|
|
131
|
+
time: Schema.Struct({
|
|
132
|
+
created: DateTimeUtcFromMillis,
|
|
133
|
+
ran: DateTimeUtcFromMillis.pipe(optional),
|
|
134
|
+
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
135
|
+
}),
|
|
136
|
+
}).annotate({ identifier: "Session.Message.Assistant.Tool" });
|
|
137
|
+
export const AssistantText = Schema.Struct({
|
|
138
|
+
type: Schema.tag("text"),
|
|
139
|
+
text: Schema.String,
|
|
140
|
+
native: Native.pipe(optional),
|
|
141
|
+
}).annotate({ identifier: "Session.Message.Assistant.Text" });
|
|
142
|
+
export const AssistantReasoning = Schema.Struct({
|
|
143
|
+
type: Schema.tag("reasoning"),
|
|
144
|
+
text: Schema.String,
|
|
145
|
+
native: Native.pipe(optional),
|
|
146
|
+
time: Schema.Struct({
|
|
147
|
+
created: DateTimeUtcFromMillis,
|
|
148
|
+
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
149
|
+
}).pipe(optional),
|
|
150
|
+
}).annotate({ identifier: "Session.Message.Assistant.Reasoning" });
|
|
151
|
+
export const AssistantContent = Schema.Union([AssistantText, AssistantReasoning, AssistantTool]).pipe(Schema.toTaggedUnion("type"));
|
|
152
|
+
export const AssistantContentEncoded = Schema.toEncoded(AssistantContent).annotate({
|
|
153
|
+
identifier: "Session.Message.AssistantContent.Encoded",
|
|
154
|
+
});
|
|
155
|
+
export const AssistantRetry = Schema.Struct({
|
|
156
|
+
attempt: PositiveInt,
|
|
157
|
+
at: DateTimeUtcFromMillis,
|
|
158
|
+
error: SessionError.Error,
|
|
159
|
+
}).annotate({ identifier: "Session.Message.Assistant.Retry" });
|
|
160
|
+
export const Assistant = Schema.Struct({
|
|
161
|
+
...Base,
|
|
162
|
+
type: Schema.tag("assistant"),
|
|
163
|
+
agent: Agent.ID,
|
|
164
|
+
model: Model.Ref,
|
|
165
|
+
content: AssistantContent.pipe(Schema.Array),
|
|
166
|
+
snapshot: Schema.Struct({
|
|
167
|
+
start: Snapshot.ID.pipe(optional),
|
|
168
|
+
end: Snapshot.ID.pipe(optional),
|
|
169
|
+
files: Schema.Array(RelativePath).pipe(optional),
|
|
170
|
+
}).pipe(optional),
|
|
171
|
+
finish: FinishReason.pipe(optional),
|
|
172
|
+
rawFinish: Schema.String.pipe(optional),
|
|
173
|
+
/** Step-level native data, such as a provider's reason for blocking a response. */
|
|
174
|
+
native: Native.pipe(optional),
|
|
175
|
+
cost: Money.USD.pipe(optional),
|
|
176
|
+
tokens: TokenUsage.Info.pipe(optional),
|
|
177
|
+
error: SessionError.Error.pipe(optional),
|
|
178
|
+
retry: AssistantRetry.pipe(optional),
|
|
179
|
+
time: Schema.Struct({
|
|
180
|
+
created: DateTimeUtcFromMillis,
|
|
181
|
+
/** When the provider response body ended, before tool settlement. */
|
|
182
|
+
streamed: DateTimeUtcFromMillis.pipe(optional),
|
|
183
|
+
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
184
|
+
}),
|
|
185
|
+
}).annotate({ identifier: "Session.Message.Assistant" });
|
|
186
|
+
const CompactionBase = { type: Schema.tag("compaction"), ...Base };
|
|
187
|
+
/** Usage of the compaction request itself, not the size of the resulting context. */
|
|
188
|
+
const CompactionUsage = {
|
|
189
|
+
cost: Money.USD.pipe(optional),
|
|
190
|
+
tokens: TokenUsage.Info.pipe(optional),
|
|
191
|
+
};
|
|
192
|
+
export const CompactionRunning = Schema.Struct({
|
|
193
|
+
...CompactionBase,
|
|
194
|
+
status: Schema.tag("running"),
|
|
195
|
+
reason: Schema.Literals(["auto", "manual"]),
|
|
196
|
+
summary: Schema.String,
|
|
197
|
+
}).annotate({ identifier: "Session.Message.Compaction.Running" });
|
|
198
|
+
export const CompactionCompleted = Schema.Struct({
|
|
199
|
+
...CompactionBase,
|
|
200
|
+
status: Schema.tag("completed"),
|
|
201
|
+
reason: Schema.Literals(["auto", "manual"]),
|
|
202
|
+
model: Model.Ref.pipe(optional),
|
|
203
|
+
/** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
|
|
204
|
+
native: Native.pipe(optional),
|
|
205
|
+
summary: Schema.String,
|
|
206
|
+
...CompactionUsage,
|
|
207
|
+
}).annotate({ identifier: "Session.Message.Compaction.Completed" });
|
|
208
|
+
export const CompactionFailed = Schema.Struct({
|
|
209
|
+
...CompactionBase,
|
|
210
|
+
status: Schema.tag("failed"),
|
|
211
|
+
reason: Schema.Literals(["auto", "manual"]),
|
|
212
|
+
error: SessionError.Error,
|
|
213
|
+
...CompactionUsage,
|
|
214
|
+
}).annotate({ identifier: "Session.Message.Compaction.Failed" });
|
|
215
|
+
export const Compaction = Schema.Union([CompactionRunning, CompactionCompleted, CompactionFailed]).pipe(Schema.toTaggedUnion("status"), Schema.annotate({ identifier: "Session.Message.Compaction" }));
|
|
216
|
+
export const Idle = Schema.Struct({
|
|
217
|
+
...Base,
|
|
218
|
+
type: Schema.tag("idle"),
|
|
219
|
+
outcome: Schema.Literals(["succeeded", "failed", "interrupted"]),
|
|
220
|
+
error: SessionError.Error.pipe(optional),
|
|
221
|
+
}).annotate({ identifier: "Session.Message.Idle" });
|
|
222
|
+
export const Info = Schema.Union([
|
|
223
|
+
AgentSelected,
|
|
224
|
+
ModelSelected,
|
|
225
|
+
LocationSwitched,
|
|
226
|
+
User,
|
|
227
|
+
Synthetic,
|
|
228
|
+
System,
|
|
229
|
+
Skill,
|
|
230
|
+
Shell,
|
|
231
|
+
Assistant,
|
|
232
|
+
Compaction,
|
|
233
|
+
Idle,
|
|
234
|
+
]).annotate({ identifier: "Session.Message.Info" });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Host-supplied session annotations, durable and opaque to core. Keys are
|
|
4
|
+
* arbitrary; values must be JSON-serializable. Children and forks inherit
|
|
5
|
+
* the parent's current metadata unless the creator supplies its own.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SessionMetadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
8
|
+
export type SessionMetadata = typeof SessionMetadata.Type;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Host-supplied session annotations, durable and opaque to core. Keys are
|
|
4
|
+
* arbitrary; values must be JSON-serializable. Children and forks inherit
|
|
5
|
+
* the parent's current metadata unless the creator supplies its own.
|
|
6
|
+
*/
|
|
7
|
+
export const SessionMetadata = Schema.Record(Schema.String, Schema.Json).annotate({
|
|
8
|
+
identifier: "Session.Metadata",
|
|
9
|
+
});
|