release: v2.3.0 Foreign Strong session/handle/replay/arity
Opaque session handles, affine close, replay_check vs oracle journal, table arity refuse, and Ω∈V_safe gate for the Strong foreign narrative. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
82c8d78fd3
commit
142ab523d6
31 files changed
+827
-57
No files matched your search
@@ -199,6 +199,7 @@ const API_ROUTES: &[(&str, ApiRoute)] = &[
|
||||
("/api/session/snapshot/export", ApiRoute::Notebook(notebook_api::api_export_snapshot)),
|
||||
("/api/session/snapshot/import", ApiRoute::Notebook(notebook_api::api_import_snapshot)),
|
||||
("/api/session/snapshot/replay", ApiRoute::Notebook(notebook_api::api_replay_snapshot)),
|
||||
("/api/session/snapshot/replay_check", ApiRoute::Notebook(notebook_api::api_replay_check)),
|
||||
("/api/session/plan/assign", ApiRoute::Notebook(notebook_api::api_plan_assign)),
|
||||
("/api/session/plan/add", ApiRoute::Notebook(notebook_api::api_plan_add)),
|
||||
("/api/session/plan/remove", ApiRoute::Notebook(notebook_api::api_plan_remove)),
|
||||
@@ -216,6 +217,7 @@ const API_ROUTES: &[(&str, ApiRoute)] = &[
|
||||
("/api/session/state/push", ApiRoute::Notebook(notebook_api::api_state_push)),
|
||||
("/api/session/state/pull", ApiRoute::Notebook(notebook_api::api_state_pull)),
|
||||
("/api/session/journal", ApiRoute::Notebook(notebook_api::api_journal)),
|
||||
("/api/session/oracle_journal", ApiRoute::Notebook(notebook_api::api_oracle_journal)),
|
||||
("/api/debug/start", ApiRoute::Notebook(debug_api::api_debug_start)),
|
||||
("/api/debug/continue", ApiRoute::Action(crate::debug::DebugAction::Continue)),
|
||||
("/api/debug/step", ApiRoute::Action(crate::debug::DebugAction::Step)),
|
||||
|
||||
@@ -208,6 +208,16 @@ pub fn api_replay_snapshot(root: &Path, body: &str) -> serde_json::Value {
|
||||
with_session(root, body, "replay", |s| s.replay_snapshot(&snapshot))
|
||||
}
|
||||
|
||||
pub fn api_replay_check(root: &Path, body: &str) -> serde_json::Value {
|
||||
let v = body_value(body);
|
||||
let snapshot = v.get("snapshot").cloned().unwrap_or(serde_json::Value::Null);
|
||||
let snapshot = match json_to_value(&snapshot) {
|
||||
Ok(v) => v,
|
||||
Err(e) => return err(e),
|
||||
};
|
||||
with_session(root, body, "replay_check", |s| s.replay_check(&snapshot))
|
||||
}
|
||||
|
||||
pub fn api_clear_cell(root: &Path, body: &str) -> serde_json::Value {
|
||||
let v = body_value(body);
|
||||
let cell = v.get("cell").and_then(|x| x.as_str()).unwrap_or("");
|
||||
@@ -352,6 +362,10 @@ pub fn api_journal(root: &Path, body: &str) -> serde_json::Value {
|
||||
with_session(root, body, "journal", |s| Ok(s.journal_json()))
|
||||
}
|
||||
|
||||
pub fn api_oracle_journal(root: &Path, body: &str) -> serde_json::Value {
|
||||
with_session(root, body, "oracle_journal", |s| Ok(s.oracle_journal_json()))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
@@ -542,6 +542,7 @@ fn value_kind_label(v: &crate::value::Value) -> String {
|
||||
Value::Num(_) => "num".into(),
|
||||
Value::Text(_) => "text".into(),
|
||||
Value::Secret(_) => "secret".into(),
|
||||
Value::Handle(_) => "handle".into(),
|
||||
Value::Formula(crate::formula::Expr::Matrix { rows, .. }) => {
|
||||
format!("formula · {}×{}", rows.len(), rows.first().map(|r| r.len()).unwrap_or(0))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user