feat: consolidate local-first mnote web runtime

This commit is contained in:
lix-2026
2026-05-28 22:01:44 +08:00
parent 7354807ee9
commit 39b9a0183a
154 changed files with 13591 additions and 12728 deletions
@@ -2,7 +2,7 @@ use crate::app::AppState;
use crate::context::RequestContext;
use crate::error::WebError;
use crate::hermes_tools::ToolCallInput;
use crate::routes::command_support::execute_runtime_command_via_convex_with_artifacts;
use crate::routes::command_support::execute_runtime_command_via_legacy_cloud_with_artifacts;
use crate::routes::ensure_local_workspace_access;
use bridge_runtime::{
RuntimeActorWire, RuntimeCommandEnvelopeWire, RuntimeSourceWire, RuntimeTargetWire,
@@ -225,7 +225,7 @@ async fn create_artifact_node(
dry_run: false,
validate_only: false,
};
let execution = execute_runtime_command_via_convex_with_artifacts(
let execution = execute_runtime_command_via_legacy_cloud_with_artifacts(
&state,
context,
workspace_id.as_deref(),
@@ -6,7 +6,7 @@ use crate::hermes_tools::doc::{
required_arg,
};
use crate::hermes_tools::ToolCallInput;
use crate::routes::command_support::execute_runtime_command_via_convex_with_artifacts;
use crate::routes::command_support::execute_runtime_command_via_legacy_cloud_with_artifacts;
use bridge_runtime::{
apply_editor_command_to_legacy_content, RuntimeActorWire, RuntimeCommandEnvelopeWire,
RuntimeSourceWire, RuntimeTargetWire,
@@ -1147,7 +1147,7 @@ async fn execute_page_body_save(
dry_run: false,
validate_only: false,
};
let execution = execute_runtime_command_via_convex_with_artifacts(
let execution = execute_runtime_command_via_legacy_cloud_with_artifacts(
&state,
context,
workspace_id.as_deref(),
@@ -1221,7 +1221,7 @@ pub(crate) async fn execute_page_body_save_from_aggregate(
dry_run: false,
validate_only: false,
};
let execution = execute_runtime_command_via_convex_with_artifacts(
let execution = execute_runtime_command_via_legacy_cloud_with_artifacts(
&state,
context,
workspace_id.as_deref(),
@@ -1703,6 +1703,8 @@ pub async fn doc_markdown_edit(
source_kind: core_protocol::WorkspaceSourceKind::LocalFolder,
root_uri: root_uri.to_string(),
expected_file_version,
write_intent_id: Some("intent:ai:mnote.doc.markdown_edit".into()),
save_operation_id: None,
base_content_hash: None,
content_format: "editorBlocks".into(),
content: next_content,
@@ -1774,7 +1776,7 @@ pub async fn doc_markdown_edit(
validate_only: false,
};
let execution =
crate::routes::command_support::execute_runtime_command_via_convex_with_artifacts(
crate::routes::command_support::execute_runtime_command_via_legacy_cloud_with_artifacts(
state,
context,
workspace_id.as_deref(),
@@ -2,7 +2,7 @@ use crate::app::AppState;
use crate::context::RequestContext;
use crate::error::WebError;
use crate::hermes_tools::ToolCallInput;
use crate::routes::command_support::execute_runtime_command_via_convex_with_artifacts;
use crate::routes::command_support::execute_runtime_command_via_legacy_cloud_with_artifacts;
use crate::routes::web_shell::build_page_aggregate_snapshot;
use bridge_runtime::{
RuntimeActorWire, RuntimeCommandEnvelopeWire, RuntimeSourceWire, RuntimeTargetWire,
@@ -211,6 +211,8 @@ async fn page_command(
source_kind: core_protocol::WorkspaceSourceKind::LocalFolder,
root_uri: root_uri.clone(),
expected_file_version: input.arg_string("expectedFileVersion"),
write_intent_id: Some("intent:ai:mnote.page.save".into()),
save_operation_id: None,
base_content_hash: input.arg_string("baseContentHash"),
content_format: "editorBlocks".into(),
content,
@@ -304,7 +306,7 @@ async fn page_command(
dry_run: false,
validate_only: false,
};
let execution = execute_runtime_command_via_convex_with_artifacts(
let execution = execute_runtime_command_via_legacy_cloud_with_artifacts(
&state,
context,
workspace_id.as_deref(),