Keep output/error on opencode file_search items
Failed read/grep/glob tools projected only {status: failed, pattern} —
the provider's error message was unrecoverable from projections, and
successful outputs were dropped too (audit plan #12, thread 3029dc85
item prt_f15692f3). The file_search contract gains optional output and
error fields; the OpenCode adapter maps part.state.output/error by
terminal status.
App-verified with a real OpenCode agent: a successful package.json read
projects the content in output, and a read of a nonexistent file
projects status failed with error "File not found: ...".
Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
7177ae1264
commit
cf23cc1dd1
2 files changed
+12
No files matched your search
@@ -827,6 +827,8 @@ export const OrchestrationV2TurnItem = Schema.Union([
|
||||
type: Schema.Literal("file_search"),
|
||||
pattern: Schema.optional(Schema.String),
|
||||
results: Schema.optional(Schema.Array(OrchestrationV2FileSearchResult)),
|
||||
output: Schema.optional(Schema.String),
|
||||
error: Schema.optional(Schema.String),
|
||||
}),
|
||||
Schema.Struct({
|
||||
...OrchestrationV2TurnItemBaseFields,
|
||||
@@ -1421,6 +1423,8 @@ export const OrchestrationV2TurnItemJson = Schema.Union([
|
||||
type: Schema.Literal("file_search"),
|
||||
pattern: Schema.optional(Schema.String),
|
||||
results: Schema.optional(Schema.Array(OrchestrationV2FileSearchResult)),
|
||||
output: Schema.optional(Schema.String),
|
||||
error: Schema.optional(Schema.String),
|
||||
}),
|
||||
Schema.Struct({
|
||||
...OrchestrationV2TurnItemJsonBaseFields,
|
||||
|
||||
Reference in new issue
Block a user