We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6e6bdf commit 29250a0Copy full SHA for 29250a0
5 files changed
packages/opencode/src/project/vcs.ts
@@ -234,8 +234,8 @@ export const FileDiff = Schema.Struct({
234
// populates patch, but loosening matches the sibling schema so a
235
// future code path that omits it can't crash /instance/vcs/diff.
236
patch: Schema.optional(Schema.String),
237
- additions: NonNegativeInt,
238
- deletions: NonNegativeInt,
+ additions: Schema.Finite,
+ deletions: Schema.Finite,
239
status: Schema.optional(Schema.Literals(["added", "deleted", "modified"])),
240
})
241
.annotate({ identifier: "VcsFileDiff" })
@@ -244,8 +244,8 @@ export type FileDiff = Schema.Schema.Type<typeof FileDiff>
244
245
export const FileStatus = Schema.Struct({
246
file: Schema.String,
247
248
249
status: Schema.Literals(["added", "deleted", "modified"]),
250
251
.annotate({ identifier: "VcsFileStatus" })
packages/opencode/src/session/message-v2.ts
@@ -143,8 +143,8 @@ export type ReasoningPart = Types.DeepMutable<Schema.Schema.Type<typeof Reasonin
143
const filePartSourceBase = {
144
text: Schema.Struct({
145
value: Schema.String,
146
- start: NonNegativeInt,
147
- end: NonNegativeInt,
+ start: Schema.Finite,
+ end: Schema.Finite,
148
}).annotate({ identifier: "FilePartSourceText" }),
149
}
150
packages/opencode/src/session/session.ts
@@ -142,9 +142,9 @@ function sessionPath(worktree: string, cwd: string) {
142
const Summary = Schema.Struct({
- files: NonNegativeInt,
+ files: Schema.Finite,
diffs: optionalOmitUndefined(Schema.Array(Snapshot.FileDiff)),
packages/opencode/src/snapshot/index.ts
@@ -25,8 +25,8 @@ export const FileDiff = Schema.Struct({
25
// session response and broke session loading on Desktop.
26
file: Schema.optional(Schema.String),
27
28
29
30
31
32
.annotate({ identifier: "SnapshotFileDiff" })
packages/opencode/src/v2/session-event.ts
@@ -305,7 +305,7 @@ export namespace Tool {
305
306
export const RetryError = Schema.Struct({
307
message: Schema.String,
308
- statusCode: NonNegativeInt.pipe(Schema.optional),
+ statusCode: Schema.Finite.pipe(Schema.optional),
309
isRetryable: Schema.Boolean,
310
responseHeaders: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional),
311
responseBody: Schema.String.pipe(Schema.optional),
@@ -320,7 +320,7 @@ export const Retried = EventV2.define({
320
aggregate: "sessionID",
321
schema: {
322
...Base,
323
- attempt: NonNegativeInt,
+ attempt: Schema.Finite,
324
error: RetryError,
325
},
326
0 commit comments