stdlib: 新增 kvlang/reflect,networld 下沉 edit/shell/python(Part of #170) - #344
Merged
Merged
Conversation
把「agent 工具」这类能力从上层项目下沉到语言 stdlib: - **kvlang/reflect**(新):kvlang 自省。fnlist(name) 枚举 /lib/<name> 下的 能力名;分类看 xvalue 的 langtype(三轴正交 ref/storetype/langtype), 不靠名字猜——用 xv·parselangtype 拿基名(剥 [dims] 与 "def ")。 - **networld/edit**(新):文件改写语义(read 行号窗口视图 / write 覆盖写…), 与 fs 分工——fs 管字节与只读检索,edit 管改写。 - **networld/shell、networld/python**(新):跑 shell / python3 取 stdout, 实现在 networld/proc·exec 之上。 - **networld/fs**:改写的部分移出(→ edit),只留字节与只读检索。 - string.kv / kvlangbrief:配套补充。 Part of #170 Co-Authored-By: Claude Code <noreply@anthropic.com>
- rwir_xvalue.c:新增 xv_write_slot——写第 i 个写参槽(原 kvlangBuiltinWriteResult 只写 writes[0]),支撑多输出。 - runtime-rs:注册 networld/fs·rename、networld/fs·isutf8 两个 rwir。 - rwir_string / rwir_vthread / myrwircaps / rwir_internal.h:配套调整。 Part of #170 Co-Authored-By: Claude Code <noreply@anthropic.com>
- 新增 13-stdlib/kvlang/(reflect)、13-stdlib/string/08-lang、
14-networld/{12-edit,13-shell,14-python}
- 07-lib/walk_lib、14-networld/11-fs-text 跟随调整
Part of #170
Co-Authored-By: Claude Code <noreply@anthropic.com>
fnlist 是客观自省:只跳过 def langtype(形参 / 返回槽),def rwir、普通 常量与 init 入口都保留。原期望漏了 init(每个 lib 都有),导致 shm/fs 两个 job 各 FAIL:1。本地复跑 PASS。 Co-Authored-By: Claude Code <noreply@anthropic.com>
值与同名目录可以共存(kvspace/tutorial-durable/10-dir-file-coexist.sh), 此时列举会同时给出裸名 X 与目录名 X/(或 X·)—— 它们是两个实体, **后端不去重**(fs 发两条、redis 视场景而定,无统一规则)。 故在 stdlib 收口:新增 kvspace·members(path) -> (names, n),裸名后面 紧跟同名 X/(X·)时只保留带目录标记的那条(名字取 X/)。需要「这层 有哪些名字」的自省/遍历类调用方一律用它: - reflect·fnlist 改走 members(不再自己猜孪生) - walk_lib 同上(移除本地的去重猜测) - 01-reflect 期望随之调整 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
把「agent 工具」这类能力从上层项目(byteseek)下沉到语言 stdlib。
1.
stdlib/kvlang/reflect(新)—— kvlang 自省fnlist(name)枚举/lib/<name>下的能力名。分类看 xvalue 的 langtype(三轴正交ref/storetype/langtype),不靠名字猜——用xv·parselangtype拿基名(剥[dims]与def前缀)。2.
stdlib/networld拆分 + 下沉networld/fsnetworld/edit(新)networld/shell(新)networld/proc·exec上)networld/python(新)python3 -c取 stdout(同上)3. runtime 配套
rwir_xvalue.c:xv_write_slot—— 写第 i 个写参槽(原kvlangBuiltinWriteResult只写writes[0]),支撑多输出networld/fs·rename、networld/fs·isutf8rwir_string/rwir_vthread/myrwircaps/rwir_internal.h配套4. tutorial
新增
13-stdlib/kvlang/01-reflect、13-stdlib/string/08-lang、14-networld/{12-edit,13-shell,14-python};07-lib/walk_lib、14-networld/11-fs-text跟随调整。Part of #170
🤖 Generated with Claude Code