feat(markdown,value): record code span delimiters, inert-executable code and profile refinements

- md code nodes now carry `ticks` (delimiter length) so executable payload
  offsets inside code spans map back to exact source bytes instead of pointing
  at backticks; this keeps diagnostics precise for mixed text/code payloads.
- value: add the markdown.inert_executable warning code and a small clippy fix,
  without changing the wire format.
- spec: document the code-span tick metadata, declare strikethrough lazy, and
  make the inert-execution warning explicit for nodes outside any function.
- workspace dependencies: add unicode-ident (grammar) and glob (capability
  path patterns) for the frontend/host layers.

Tests: 15 markdown + 10 value + 2 span tests pass; fmt/clippy clean.
This commit is contained in:
cflmy committed 2026-11-20 10:36:07 +08:00
1 parent 4db6e6afd6
commit 62a9af05fd
9 files changed
+34 -15

No files matched your search

+3
View File
@@ -8,6 +8,9 @@ use serde::{Deserialize, Serialize};
pub mod codes {
/// A Markdown AST node occupies an executable position but has an invalid shape.
pub const MARKDOWN_INVALID_CONSTRUCT: &str = "markdown.invalid_construct";
/// A node that would be executable appears outside any function body and is
/// therefore inert document content.
pub const MARKDOWN_INERT_EXECUTABLE: &str = "markdown.inert_executable";
/// Front matter is malformed or appears somewhere other than the document start.
pub const FRONTMATTER_INVALID: &str = "frontmatter.invalid";
/// An executable payload failed to parse as an expression or statement.
+1 -1
View File
@@ -172,7 +172,7 @@ fn decode(json: &Json, depth: usize, limits: &WireLimits) -> Result<Value, WireE
let type_tag = obj
.get("type")
.and_then(Json::as_str)
.ok_or_else(|| WireError::MissingField("type"))?;
.ok_or(WireError::MissingField("type"))?;
let require = |field: &'static str| obj.get(field).ok_or(WireError::MissingField(field));
match type_tag {
"unit" => Ok(Value::Unit),