feat(ext): single callable binding, provider v2 CLI, capability handlers, stdlib aliases
Implements RFC-EXT-0001 PR-00..PR-07 first pass: - CallSiteKey/CallBindingTable + one frontend binding pass; runtime dispatch by identity - prepare composition root shared by check/run/inspect/Analysis; exact plugin reconciliation - provider.json v2 --provider/--allow-provider worker CLI with fail-closed verification - capability handler registry with real fs.read and audit - verified stdlib public aliases replace print_override/AST scan - docs: specs, ADR-0054/0055/0057/0058, README, CI/release gates, evidence PR-04 extension selection/lock v4 and final frozen-binary evidence remain.
This commit is contained in:
1 parent
9aa536c2c9
commit
1f6fd644a0
54 files changed
+8710
-828
No files matched your search
+16
-1
@@ -1,5 +1,20 @@
|
||||
{
|
||||
"name": "marqdo-stdlib",
|
||||
"version": "0.1.0",
|
||||
"digest": "sha256:b94f1a48ca6619689584aca3af7befac64ac9fdb7ea7c0a9ccb491df8df226b8"
|
||||
"digest": "sha256:5407d3665ba2fe105820d0f1af5efaafa10c277a69eb819c3225719813c8c713",
|
||||
"public_aliases": [
|
||||
{
|
||||
"public_names": [
|
||||
"print",
|
||||
"打印"
|
||||
],
|
||||
"target_module": "io.mq.md",
|
||||
"target_function": "写值",
|
||||
"expected_signature": "params(值)",
|
||||
"effects": [
|
||||
"host"
|
||||
]
|
||||
}
|
||||
],
|
||||
"aliases_digest": "sha256:5f513c0fdbb3c1e9829be3c9fa23a2d1e89cb8510073fb5eb1e8e2f5265a83bb"
|
||||
}
|
||||
+15
-15
@@ -1,38 +1,38 @@
|
||||
---
|
||||
import:
|
||||
fs: "std:fs/file"
|
||||
fs_lib: "std:fs/file"
|
||||
---
|
||||
|
||||
# @exec fs
|
||||
|
||||
## main
|
||||
|
||||
**创建 = fs.创建目录("out")**
|
||||
**创建 = fs_lib.创建目录("out")**
|
||||
|
||||
**写入 = fs.写文本("out/fs-a.txt", "你好\n")**
|
||||
**写入 = fs_lib.写文本("out/fs-a.txt", "你好\n")**
|
||||
|
||||
**存在 = fs.存在("out/fs-a.txt")**
|
||||
**存在 = fs_lib.存在("out/fs-a.txt")**
|
||||
|
||||
**元数据 = fs.元数据("out/fs-a.txt")**
|
||||
**元数据 = fs_lib.元数据("out/fs-a.txt")**
|
||||
|
||||
**列表 = fs.列出目录("out")**
|
||||
**列表 = fs_lib.列出目录("out")**
|
||||
|
||||
**是文件 = fs.是文件("out/fs-a.txt")**
|
||||
**是文件 = fs_lib.是文件("out/fs-a.txt")**
|
||||
|
||||
**是目录 = fs.是目录("out")**
|
||||
**是目录 = fs_lib.是目录("out")**
|
||||
|
||||
**重命名 = fs.重命名("out/fs-a.txt", "out/fs-b.txt")**
|
||||
**重命名 = fs_lib.重命名("out/fs-a.txt", "out/fs-b.txt")**
|
||||
|
||||
**读取 = fs.读文本("out/fs-b.txt")**
|
||||
**读取 = fs_lib.读文本("out/fs-b.txt")**
|
||||
|
||||
**追加 = fs.追加文本("out/fs-b.txt", "世界\n")**
|
||||
**追加 = fs_lib.追加文本("out/fs-b.txt", "世界\n")**
|
||||
|
||||
**片段 = fs.读取片段("out/fs-b.txt", 0, 100)**
|
||||
**片段 = fs_lib.读取片段("out/fs-b.txt", 0, 100)**
|
||||
|
||||
**遍历 = fs.遍历("out")**
|
||||
**遍历 = fs_lib.遍历("out")**
|
||||
|
||||
**删除 = fs.删除("out/fs-b.txt")**
|
||||
**删除 = fs_lib.删除("out/fs-b.txt")**
|
||||
|
||||
**删除目录 = fs.删除("out")**
|
||||
**删除目录 = fs_lib.删除("out")**
|
||||
|
||||
`return [创建.ok, 写入.value.count, 存在.value, 元数据.value.kind, 元数据.value.size, 列表.value, 是文件.value, 是目录.value, 重命名.ok, 读取.value, 追加.value, 片段.value, 遍历.value, 删除.ok, 删除目录.ok]`
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import:
|
||||
table: "std:data/table"
|
||||
table_lib: "std:data/table"
|
||||
---
|
||||
|
||||
# @exec table
|
||||
@@ -9,22 +9,22 @@ import:
|
||||
|
||||
**数据 = 表(["名称", "分数"], [["甲", 87], ["乙", 92], ["丙", 71]])**
|
||||
|
||||
**选择 = table.选择列(数据, 1)**
|
||||
**选择 = table_lib.选择列(数据, 1)**
|
||||
|
||||
**过滤 = table.过滤数值大于(数据, 1, 80)**
|
||||
**过滤 = table_lib.过滤数值大于(数据, 1, 80)**
|
||||
|
||||
**排序 = table.排序(数据, 1)**
|
||||
**排序 = table_lib.排序(数据, 1)**
|
||||
|
||||
**追加 = table.追加行(数据, ["丁", 65])**
|
||||
**追加 = table_lib.追加行(数据, ["丁", 65])**
|
||||
|
||||
**设置 = table.设置单元格(数据, 0, 1, 99)**
|
||||
**设置 = table_lib.设置单元格(数据, 0, 1, 99)**
|
||||
|
||||
**左 = 表(["名称", "分数"], [["甲", 87], ["乙", 92]])**
|
||||
|
||||
**右 = 表(["名称", "等级"], [["乙", "A"], ["甲", "B"]])**
|
||||
|
||||
**连接 = table.连接(左, 右, 0, 0)**
|
||||
**连接 = table_lib.连接(左, 右, 0, 0)**
|
||||
|
||||
**分组 = table.分组(表(["类别", "值"], [["a", 1], ["b", 2], ["a", 3]]), 0, 1)**
|
||||
**分组 = table_lib.分组(表(["类别", "值"], [["a", 1], ["b", 2], ["a", 3]]), 0, 1)**
|
||||
|
||||
`return [选择, 过滤, 排序, 追加, 设置, 连接, 分组, 数据, table.转GFM(数据)]`
|
||||
`return [选择, 过滤, 排序, 追加, 设置, 连接, 分组, 数据, table_lib.转GFM(数据)]`
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import:
|
||||
text: "std:text"
|
||||
text_lib: "std:text"
|
||||
---
|
||||
|
||||
# @exec text
|
||||
@@ -9,6 +9,6 @@ import:
|
||||
|
||||
**内存 = memory.new(1, 1)**
|
||||
|
||||
**长度 = text.utf8编码("é", 内存, 0)**
|
||||
**长度 = text_lib.utf8编码("é", 内存, 0)**
|
||||
|
||||
`return [长度, 内存[0], 内存[1]]`
|
||||
Reference in new issue
Block a user