chore: 保存剩余工作区改动并清理到干净状态
- 补 OnlyOffice callback 附件写回的 media asset bridge 适配层,并继续扩展 documents bridge/测试覆盖 - 提交当前 OMX hooks 删除与 Harness 运行状态文件更新,保留本轮任务执行轨迹 - 一并提交仓库中已跟踪的 Rust target 构建产物与相关协议桥接变更,确保工作区清零
This commit is contained in:
@@ -72,6 +72,12 @@ pub struct UpdatePageOptions {
|
||||
pub embed_default_block_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ReplaceMediaAssetStorage {
|
||||
pub asset_id: String,
|
||||
pub storage_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct SavePageContent {
|
||||
pub page_id: String,
|
||||
|
||||
@@ -6,8 +6,8 @@ pub mod tool;
|
||||
|
||||
pub use command::{
|
||||
CommandEnvelope, CreatePage, CreateWorkspace, DeleteBlock, InsertBlock, MoveBlock,
|
||||
PatchPageBlock, SavePageContent, UpdateBlock, UpdatePageOptions, UpdatePageStats,
|
||||
UpdatePageTitle,
|
||||
PatchPageBlock, ReplaceMediaAssetStorage, SavePageContent, UpdateBlock, UpdatePageOptions,
|
||||
UpdatePageStats, UpdatePageTitle,
|
||||
};
|
||||
pub use common::{
|
||||
ActorPayload, AffectedObject, ErrorDetail, ErrorPayload, OkPayload, RequestMeta, ResponseMeta,
|
||||
|
||||
@@ -22,8 +22,8 @@ mod tests {
|
||||
use super::*;
|
||||
use core_protocol::{
|
||||
command::{
|
||||
CreatePage, CreateWorkspace, PatchPageBlock, SavePageContent, UpdatePageOptions,
|
||||
UpdatePageStats, UpdatePageTitle,
|
||||
CreatePage, CreateWorkspace, PatchPageBlock, ReplaceMediaAssetStorage,
|
||||
SavePageContent, UpdatePageOptions, UpdatePageStats, UpdatePageTitle,
|
||||
},
|
||||
query::{GetPage, GetPageContent, GetPageMeta, ListSidebarDataset},
|
||||
ActorPayload, CommandEnvelope, QueryEnvelope, SourcePayload, TargetRef,
|
||||
@@ -346,6 +346,42 @@ mod tests {
|
||||
assert!(request.payload_json.contains("\"name\":\"documents.options.update\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn media_asset_writeback_command_maps_to_replace_storage_from_upload() {
|
||||
let command = CommandEnvelope {
|
||||
name: "media.assets.replace_storage".into(),
|
||||
command_id: "cmd_asset_1".into(),
|
||||
idempotency_key: Some("idem_asset".into()),
|
||||
actor: ActorPayload {
|
||||
actor_type: "service".into(),
|
||||
actor_id: "onlyoffice-callback".into(),
|
||||
session_id: Some("onlyoffice".into()),
|
||||
},
|
||||
source: SourcePayload {
|
||||
channel: "onlyoffice-callback".into(),
|
||||
client: "wolai-frontend".into(),
|
||||
},
|
||||
target: Some(TargetRef {
|
||||
workspace_id: Some("ws_1".into()),
|
||||
page_id: Some("page_1".into()),
|
||||
block_id: None,
|
||||
}),
|
||||
payload: ReplaceMediaAssetStorage {
|
||||
asset_id: "asset_1".into(),
|
||||
storage_id: "storage_1".into(),
|
||||
},
|
||||
reason: Some("ONLYOFFICE 回调写回附件".into()),
|
||||
refs: vec!["checklist:d".into()],
|
||||
dry_run: false,
|
||||
validate_only: false,
|
||||
};
|
||||
|
||||
let request = build_write_request(&demo_context(), &command).expect("write request should build");
|
||||
assert_eq!(request.function_name, "mediaAssets:replaceStorageFromUpload");
|
||||
assert_eq!(request.workspace_id.as_deref(), Some("ws_1"));
|
||||
assert!(request.payload_json.contains("\"name\":\"media.assets.replace_storage\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn document_meta_query_maps_to_documents_get_meta() {
|
||||
let query = QueryEnvelope {
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn map_command_name_to_convex(command_name: &str) -> &'static str {
|
||||
"update_block" => "blocks:update",
|
||||
"move_block" => "blocks:move",
|
||||
"delete_block" => "blocks:delete",
|
||||
"media.assets.replace_storage" => "mediaAssets:replaceStorageFromUpload",
|
||||
_ => "commands:unknown",
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user