docs(lib): narrate remaining stdlib modules (M2)

Add module intros and per-function purpose lines across EN/ZH libs, with
callable examples on the smaller modules; keep + params and host bodies intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-14 11:47:35 +08:00
1 parent 53bc3538da
commit fecaacd5be
49 files changed
+617 -21

No files matched your search

+12
View File
@@ -3,16 +3,24 @@ title: lib/foreign
description: Run bound code fences and inline sources via local interpreters
---
Run bound code fences and inline sources via local interpreters.
## set_cmd
+ `lang`
+ `cmd`
Bind interpreter command cmd for language lang.
*> host_foreign_set_cmd lang=`lang` cmd=`cmd`*
## run
+ `code`
+ `stdin`=None
Run a bound code fence value; optional stdin.
Caller: [foreign.run] code=`block`
*> host_foreign_run code=`code` stdin=`stdin`*
## run_lang
@@ -20,8 +28,12 @@ description: Run bound code fences and inline sources via local interpreters
+ `source`
+ `stdin`=None
Run source text with language lang; optional stdin.
*> host_foreign_run_lang lang=`lang` source=`source` stdin=`stdin`*
## langs
List configured foreign languages.
*> host_foreign_langs*