remove ocs_doc_api crate and DocApi v2 host integration

- Drop crates/ocs_doc_api from workspace and host dependency.
- Remove src/app/doc_api.rs and its module declaration.
- Strip DocApi v2 undo/dispatch plumbing from HostSession.
- Remove HostApi::doc_api_dispatch default method.
- Remove PluginRequest::DocApiRequest / PluginResponse::DocApiResponse.
- Revert plugin API version from 6 back to 5.
This commit is contained in:
Sebastian committed 2026-09-11 08:07:30 +02:00
1 parent 7d0c059b30
commit fe8397b3cb
48 files changed
+4 -14869

No files matched your search

-10
View File
@@ -138,12 +138,6 @@ pub enum PluginRequest {
GetTabId,
/// V5: ask the host for the filesystem path of the document in `tab_id`.
DocumentPath { tab_id: u64 },
/// DocApi v2 (`ocs_doc_api`): carry one bincode-serialized `DocApiEnvelope`
/// (one write op OR a read-only query batch). Appended at the end to keep
/// existing discriminants stable. The host routes this to the DocApi executor.
/// `serde_bytes` keeps the payload a single length-prefixed bulk copy (the
/// outer frame would otherwise walk it byte-by-byte).
DocApiRequest { tab_id: u64, #[serde(with = "serde_bytes")] bytes: Vec<u8> },
}
/// Responses the host sends back for `PluginRequest`.
@@ -170,10 +164,6 @@ pub enum PluginResponse {
TabId(u64),
/// V5: filesystem path of the document in the requested tab, if any.
DocumentPath(Option<std::ffi::OsString>),
/// DocApi v2 (`ocs_doc_api`): the bincode-serialized `Result<Receipt, ApiError>` answering a
/// `PluginRequest::DocApiRequest`. Appended at the end (discriminant stability).
/// `serde_bytes` keeps the payload a single length-prefixed bulk copy.
DocApiResponse { #[serde(with = "serde_bytes")] bytes: Vec<u8> },
}
/// Messages sent from the host to the plugin runner.
-4
View File
@@ -77,9 +77,5 @@ pub fn handle_plugin_request(
DocumentPath { tab_id } => PluginResponse::DocumentPath(
host.document_path(tab_id).map(|path| path.into_os_string()),
),
DocApiRequest { tab_id, bytes } => match host.doc_api_dispatch(tab_id, &bytes) {
Ok(bytes) => PluginResponse::DocApiResponse { bytes },
Err(msg) => PluginResponse::Error(msg),
},
}
}