Skip to content

Claude's answers, rendered: Markdown, math, charts and diagrams drawn in the Claude Code terminal. Independent project, not affiliated with Anthropic.

TypeScript claude-code-mod

Docs: the Typst root of a compile, and the two new sh tests

razorback169e137a7157ee
diff --git a/docs/development.md b/docs/development.md
index 56048d5..b9847ad 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -14,6 +14,8 @@ sh tests/cache-sh-test.sh # the cache folder sweep (CACHE_SH) in sh, dash a
sh tests/fonts-sh-test.sh # the copy of a font out of a terminal's program (PROGRAM_FONTS_SH and _PL) with perl
sh tests/bold-sh-test.sh # the fake bold of md.typ (term-bold=0) with the real Typst and Monaco (skips with no Monaco)
sh tests/code-sh-test.sh # code blocks of md.typ (width, header, copy button mark, row grid) with the real Typst (skips with no typst)
+sh tests/root-sh-test.sh # the Typst root of a compile (STAGE_SH): answer code reads no other file, with the real Typst (its compiles skip with no typst)
+sh tests/check-sh-test.sh # the skill's check.sh: a private cache folder, and a block reads no other file (skips with no Typst 0.15)
claude plugin validate .
```
diff --git a/docs/limitations.md b/docs/limitations.md
index bc117bc..1c976f6 100644
--- a/docs/limitations.md
+++ b/docs/limitations.md
@@ -54,7 +54,7 @@
- **Short summaries** between tool calls stay as text.
- **Plan approval:** a mod cannot draw the Claude Code approval dialog, so the mod shows its own question. That question can have 4 options at most. Thus it has no option to keep planning (use Type something or Esc). The edit option cannot use a terminal editor (vim, nano), because a mod has no terminal. On Linux, it uses only the GUI editors that can wait until you close the file (refer to [Linux](install.md#linux)), not `xdg-open`. Where an organization manages Claude Code, `classic.PermissionRequest` hooks of a plugin that you install do not run. Then the Claude Code dialog shows after the mod's question.
- **Typst blocks:** `#page`, `#pagebreak` and `#set page` are errors. A package that is not in the mod cannot be downloaded (the network is blocked for Typst), so its block shows as code.
-- **Security:** Typst runs with `--root /`, so a Typst block can read any file that you can read and draw it in the picture. Nothing leaves the computer.
+- **Security:** each compile of an answer has a Typst root of its own: a private folder with only the template, the theme and the answer's Markdown images. So a Typst block cannot read other files (`read`, `include` or `image` of another path is an error, and the block shows as code). Nothing leaves the computer.
- **The look is close to VS Code, not exact:** Typst does not use CSS. Raw HTML in Markdown is shown in a simple form or dropped. Loose lists have tight spacing (with `/iui grid on`, the items of a loose list have a gap of one row).
- **A picture that the terminal dropped from its image memory** (after many large pictures) is not sent again when you scroll back to it.
- **Over ssh**, the mod cannot read the terminal's config on your computer. So it uses the metrics of the theme's code font (Menlo on macOS) for the text size, and `auto` uses `COLORFGBG` if ssh sends it. Else `auto` is dark. The mod does not use the OS appearance of the remote computer. Pages are shorter, so that each one is at most 4096 pixels tall. In tmux or screen on the remote computer, no pictures show.