Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/mcp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func TestOpenAIFileMetadataMatchesDeclaredSchemas(t *testing.T) {
if !ok {
t.Fatalf("%s file input path %q missing from input schema", def.Name, path)
}
if property["type"] != "string" || property["format"] != "binary" {
t.Fatalf("%s file input %q must be string/binary: %#v", def.Name, path, property)
if property["type"] != "object" || property["additionalProperties"] != true {
t.Fatalf("%s file input %q must be an open object: %#v", def.Name, path, property)
}
}
if len(def.FileArgRewritePaths) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/tool/media/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func InputSchema(name string) (map[string]any, bool) {
}
return schema, true
case ToolFilePublish:
props["file"] = map[string]any{"type": "string", "format": "binary", "description": "Top-level file parameter. Connector runtimes should pass the mounted local path when available."}
props["file"] = toolcontract.OpenObject("Top-level connector file object. Connector runtimes may rewrite this object with mounted local-path metadata before the tool call reaches AgentDock.")
props["path"] = stringProp("Local file or directory path visible to this AgentDock instance. Relative paths resolve from ~/AgentDock.")
props["retention_seconds"] = boundedIntProp("Signed URL retention seconds. Zero uses the default 86400 and values are capped at 604800.", 0, int(publicartifacts.MaxRetention/time.Second))
default:
Expand Down
3 changes: 2 additions & 1 deletion internal/tool/media/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ type ViewImageRequest struct {
Crop *CropRequest `json:"crop,omitempty"`
}

// FilePublishRequest.File 是 connector 文件重写产生的动态叶子;Path 是普通本地路径入口。
// FilePublishRequest.File 是 connector 文件重写产生的动态对象;Path 是普通本地路径入口。
// File 保持 any 以兼容不同 connector 注入的文件对象形状,以及旧客户端仍可能发送的路径字符串。
type FilePublishRequest struct {
File any `json:"file,omitempty"`
Path string `json:"path,omitempty"`
Expand Down
Loading