@opencode/schema 2.0.32 → 2.1.0
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/config/experimental.d.ts +1 -0
- package/dist/config/experimental.js +3 -0
- package/dist/config/provider.d.ts +56 -52
- package/dist/credential-legacy.d.ts +54 -0
- package/dist/credential-legacy.js +19 -0
- package/dist/credential.d.ts +0 -4
- package/dist/credential.js +0 -2
- package/dist/event-manifest.d.ts +1111 -1149
- package/dist/event-manifest.js +1 -2
- package/dist/form.d.ts +213 -213
- package/dist/instruction-entry.d.ts +1 -1
- package/dist/integration.d.ts +257 -257
- package/dist/model-compatibility.d.ts +3 -0
- package/dist/model-compatibility.js +2 -0
- package/dist/model.d.ts +76 -74
- package/dist/persistent-pty.d.ts +88 -88
- package/dist/prompt-input.d.ts +3 -3
- package/dist/prompt.d.ts +28 -28
- package/dist/provider.d.ts +2 -0
- package/dist/session-event.d.ts +5729 -5723
- package/dist/session-event.js +20 -13
- package/dist/session-inbox.d.ts +20 -20
- package/dist/session-legacy.d.ts +7 -0
- package/dist/session-legacy.js +118 -0
- package/dist/session-message.d.ts +125 -268
- package/dist/session-message.js +13 -12
- package/dist/session-revert.d.ts +407 -183
- package/dist/session-transfer.d.ts +33 -83
- package/dist/session.d.ts +109 -1
- package/dist/session.js +64 -2
- package/dist/v1/permission.d.ts +8 -8
- package/dist/v1/session.d.ts +696 -696
- package/package.json +4 -4
- package/dist/session-compaction-event.d.ts +0 -87
- package/dist/session-compaction-event.js +0 -10
- package/dist/session-provider-context.d.ts +0 -54
- package/dist/session-provider-context.js +0 -17
package/dist/session-message.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * as SessionMessage from "./session-message.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { SessionProviderContext } from "./session-provider-context.js";
|
|
4
3
|
import { optional } from "./schema.js";
|
|
5
4
|
import { Content } from "./tool.js";
|
|
6
5
|
import { Location } from "./location.js";
|
|
@@ -27,8 +26,12 @@ const Base = {
|
|
|
27
26
|
metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
|
|
28
27
|
time: Schema.Struct({ created: DateTimeUtcFromMillis }),
|
|
29
28
|
};
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Provider-owned replay data, keyed by the producing provider's metadata fields and echoed back verbatim. A tool's
|
|
31
|
+
* result data is merged into its call data, so adapters must not reuse a key with a different value across the two.
|
|
32
|
+
*/
|
|
33
|
+
export const Native = Schema.Record(Schema.String, Schema.Unknown).annotate({
|
|
34
|
+
identifier: "Session.Message.Native",
|
|
32
35
|
});
|
|
33
36
|
export const AgentSelected = Schema.Struct({
|
|
34
37
|
...Base,
|
|
@@ -124,8 +127,7 @@ export const AssistantTool = Schema.Struct({
|
|
|
124
127
|
id: Schema.String,
|
|
125
128
|
name: Schema.String,
|
|
126
129
|
executed: Schema.Boolean.pipe(optional),
|
|
127
|
-
|
|
128
|
-
providerResultState: ProviderState.pipe(optional),
|
|
130
|
+
native: Native.pipe(optional),
|
|
129
131
|
state: ToolState,
|
|
130
132
|
time: Schema.Struct({
|
|
131
133
|
created: DateTimeUtcFromMillis,
|
|
@@ -136,12 +138,12 @@ export const AssistantTool = Schema.Struct({
|
|
|
136
138
|
export const AssistantText = Schema.Struct({
|
|
137
139
|
type: Schema.tag("text"),
|
|
138
140
|
text: Schema.String,
|
|
139
|
-
|
|
141
|
+
native: Native.pipe(optional),
|
|
140
142
|
}).annotate({ identifier: "Session.Message.Assistant.Text" });
|
|
141
143
|
export const AssistantReasoning = Schema.Struct({
|
|
142
144
|
type: Schema.tag("reasoning"),
|
|
143
145
|
text: Schema.String,
|
|
144
|
-
|
|
146
|
+
native: Native.pipe(optional),
|
|
145
147
|
time: Schema.Struct({
|
|
146
148
|
created: DateTimeUtcFromMillis,
|
|
147
149
|
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
@@ -169,7 +171,8 @@ export const Assistant = Schema.Struct({
|
|
|
169
171
|
}).pipe(optional),
|
|
170
172
|
finish: FinishReason.pipe(optional),
|
|
171
173
|
rawFinish: Schema.String.pipe(optional),
|
|
172
|
-
|
|
174
|
+
/** Step-level native data, such as a provider's reason for blocking a response. */
|
|
175
|
+
native: Native.pipe(optional),
|
|
173
176
|
cost: Money.USD.pipe(optional),
|
|
174
177
|
tokens: TokenUsage.Info.pipe(optional),
|
|
175
178
|
error: SessionError.Error.pipe(optional),
|
|
@@ -192,17 +195,15 @@ export const CompactionRunning = Schema.Struct({
|
|
|
192
195
|
status: Schema.tag("running"),
|
|
193
196
|
reason: Schema.Literals(["auto", "manual"]),
|
|
194
197
|
summary: Schema.String,
|
|
195
|
-
recent: Schema.String,
|
|
196
198
|
}).annotate({ identifier: "Session.Message.Compaction.Running" });
|
|
197
199
|
export const CompactionCompleted = Schema.Struct({
|
|
198
200
|
...CompactionBase,
|
|
199
201
|
status: Schema.tag("completed"),
|
|
200
202
|
reason: Schema.Literals(["auto", "manual"]),
|
|
201
203
|
model: Model.Ref.pipe(optional),
|
|
202
|
-
|
|
204
|
+
/** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
|
|
205
|
+
native: Native.pipe(optional),
|
|
203
206
|
summary: Schema.String,
|
|
204
|
-
recent: Schema.String,
|
|
205
|
-
providerContext: SessionProviderContext.Info.pipe(optional),
|
|
206
207
|
...CompactionUsage,
|
|
207
208
|
}).annotate({ identifier: "Session.Message.Compaction.Completed" });
|
|
208
209
|
export const CompactionFailed = Schema.Struct({
|