feat: migrate corpus to file-scoped occlusion

This commit is contained in:
cflmy committed 2026-10-23 12:45:01 +00:00
1 parent c773503938
commit aea86746e7
485 files changed
+1160 -340

No files matched your search

+15 -14
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/agent
description: Document-driven agent v2 — step / plan / run; Skill Compilation via ABI plugin (episodes → learn → llm_free).
import:
@@ -139,7 +140,7 @@ Find a human-readable call line: `CALL:<name>` or `调用:<name>` / `调用:<n
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
**t = > trim value=`line`**
**parts = > split value=`t` sep=":"**
**n = > len value=`parts`**
@@ -245,7 +246,7 @@ Structured observation for the parent developer-agent: source, named writeback s
**last_ok = None**
**last_error = None**
- [`slot`](`slots`)
- [slot](遍历 `slots` 为 `slot`)
**k = > json.get value=`slot` key="key"**
**body = > json.get value=`slot` key="body"**
1. `k` == "ok"
@@ -407,7 +408,7 @@ With `sandbox=True`, run via `## trial` first (commit on ok); host unchanged unt
**acc = > table.empty_list**
**chars = 0**
**count = 0**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `count` < `max_lines`
**ln = > len value=`line`**
**next = chars + ln**
@@ -441,7 +442,7 @@ With `sandbox=True`, run via `## trial` first (commit on ok); host unchanged unt
**acc = > table.empty_list**
**i = 0**
**chars = 0**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `i` >= `start`
**ln = > len value=`line`**
**next = chars + ln**
@@ -468,7 +469,7 @@ Drop `<!-- … -->` blocks (including marqdo-out bodies) so parent excerpts stay
**lines = > split value=`raw` sep=`nl`**
**acc = > table.empty_list**
**skip = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `skip`
**end_parts = > split value=`line` sep="-->"**
**en = > len value=`end_parts`**
@@ -719,7 +720,7 @@ Parse `ARGS:{…}` JSON line, or a bare `{…}` line after CALL.
**text = > trim value=`reply`**
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `found`
**_ = 1**
2. *
@@ -909,7 +910,7 @@ Parse READ:source|stderr|stdout|slots|skill (Chinese: 读取:…).
**text = > trim value=`reply`**
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
**t = > trim value=`line`**
**parts = > split value=`t` sep=":"**
**n = > len value=`parts`**
@@ -1005,7 +1006,7 @@ Parse NAME: id plus a triple-angle body after CALL:scratch_tool_write.
**name = None**
**body_lines = > table.empty_list**
**in_body = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `in_body`
**t = > trim value=`line`**
1. `t` == `close`
@@ -1231,7 +1232,7 @@ Bounded observation for the parent prompt (actionable, short).
**slots_brief = > table.empty_list**
1. `obs_slots`
- [`slot`](`obs_slots`)
- [slot](遍历 `obs_slots` 为 `slot`)
**sk = > json.get value=`slot` key="key"**
**sl = > json.get value=`slot` key="line"**
**sb = > json.get value=`slot` key="body"**
@@ -1296,7 +1297,7 @@ First matching DECISION / 决定 line wins (ignore later conflicting decisions i
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
1. `found`
**_ = 1**
2. *
@@ -1368,7 +1369,7 @@ Parse `SLUG: …` / `标识:…` after a soft-match REUSE decision.
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
**t = > trim value=`line`**
**parts = > split value=`t` sep=":"**
**n = > len value=`parts`**
@@ -1420,7 +1421,7 @@ Short parent prompt: REUSE+SLUG or NEW only. Candidates may include lexical `sco
**st = > json.get value=`esc` key="st"**
**lf = > json.get value=`esc` key="lf"**
**lines = > table.empty_list**
- [`t`](`tasks`)
- [t](遍历 `tasks` 为 `t`)
**slug = > json.get value=`t` key="slug"**
**title = > json.get value=`t` key="title"**
**row = slug + sep + title**
@@ -1469,7 +1470,7 @@ First `SUMMARY:` / `汇总:` / `汇总:` line body, else trimmed reply.
**lines = > split value=`text` sep=`nl`**
**found = None**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
**t = > trim value=`line`**
**parts = > split value=`t` sep=":"**
**n = > len value=`parts`**
@@ -1793,7 +1794,7 @@ Always append a `decision` event. SSE publish only when `stream=True`.
Bubble parent `complete stream=True` reasoning/deltas (and errors) into the plan event list. Skip nested `done` so plan owns the final `done`. Always merge into `events` when present; `stream` reserved for callers that also SSE-publish upstream.
- [`ev`](`from`)
- [ev](遍历 `from` 为 `ev`)
**t = > json.get value=`ev` key="type"**
1. `t` == delta
**events = > table.append list=`events` item=`ev`**
+3 -2
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/llm
description: >-
Marqdo LLM intelligence primitive — ask / stream / collect / named handles.
@@ -26,7 +27,7 @@ Collapse a stream event list to final answer text (`done.result` or `error.messa
**answer = ""**
- [ev](events)
- [ev](遍历 events 为 ev)
**t = > json.get value=`ev` key="type"**
1. `t` == "done"
**answer = > json.get value=`ev` key="result"**
@@ -357,7 +358,7 @@ Semantic stream: return the event list (use `llm.collect` to reduce to text). Om
Transport pack via `ext/ai/llm/openai` (Ollama uses the same OpenAI-compatible path). Non-stream → `{text,usage,finish}`; stream → `{events}`.
*> openai.chat_completions base_url=[base_url](self) api_key=[api_key](self) model=[model](self) prompt=`prompt` stream=`stream` echo=`echo` suffix=[suffix](self) bearer=[bearer](self)*
*> openai.chat_completions base_url=[base_url](access(self, "base_url")) api_key=[api_key](access(self, "api_key")) model=[model](access(self, "model")) prompt=`prompt` stream=`stream` echo=`echo` suffix=[suffix](access(self, "suffix")) bearer=[bearer](access(self, "bearer"))*
## complete
+ `prompt`
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/llm/ollama
description: >-
Ollama backend defaults. Transport reuses openai-compatible /v1 chat completions.
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: step-route policy (O3)
description: >
Table-driven map from step class → Adaptive Routing backend.
+14 -13
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/大模型
description: >-
Marqdo 大模型智能原语 — 提问 / 流式 / 收集 / 命名句柄。
@@ -21,15 +22,15 @@ description: >-
**answer = ""**
- [ev](事件)
**t = [type](ev)**
- [ev](遍历 事件 为 ev)
**t = [type](access(ev, "type"))**
1. `t` == "done"
**answer = [result](ev)**
**answer = [result](access(ev, "result"))**
2. `t` == "error"
**answer = [message](ev)**
**answer = [message](access(ev, "message"))**
3. `t` == "delta"
4. `t` == "text"
**chunk = [text](ev)**
**chunk = [text](access(ev, "text"))**
1. `chunk`
**answer = answer + chunk**
2. *
@@ -142,7 +143,7 @@ description: >-
**m = > 创建 模型=`模型` 基址=`基址` 密钥=`密钥`**
**r = > m.提问 提示=`p`**
*[text](r)*
*[text](access(r, "text"))*
# 大模型
+ `模型`=None
@@ -243,10 +244,10 @@ description: >-
表单元格会遮蔽 `自` / 列名,先取出字段再组结果表。
**mdl = [model](自)**
**b = [backend](自)**
**nm = [name](自)**
**tt = [total_tokens](usage)**
**mdl = [model](access(自, "model"))**
**b = [backend](access(自, "backend"))**
**nm = [name](access(自, "name"))**
**tt = [total_tokens](access(usage, "total_tokens"))**
`result` =
@@ -276,7 +277,7 @@ description: >-
+ `流式`=False
+ `打印增量`=False
*> openai.chat_completions base_url=[base_url](自) api_key=[api_key](自) model=[model](自) prompt=`提示` stream=`流式` echo=`打印增量` suffix=[suffix](自) bearer=[bearer](自)*
*> openai.chat_completions base_url=[base_url](access(自, "base_url")) api_key=[api_key](access(自, "api_key")) model=[model](access(自, "model")) prompt=`提示` stream=`流式` echo=`打印增量` suffix=[suffix](access(自, "suffix")) bearer=[bearer](access(自, "bearer"))*
## 运行
+ `提示`
@@ -285,10 +286,10 @@ description: >-
1. `流式`
**pack = > 自.完整结果 提示=`提示` 流式=True 打印增量=`打印增量`**
*[events](pack)*
*[events](access(pack, "events"))*
2. *
**pack = > 自.完整结果 提示=`提示` 流式=False 打印增量=`打印增量`**
*[text](pack)*
*[text](access(pack, "text"))*
## 聊天
+ `提示`
+2 -1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/智能体
description: 文档驱动智能体 v2 — 单步 / 多步 / 运行;技能编译经 ABI v2 agent 插件(情景 → 学习 → llm_free)。
导入:
@@ -38,7 +39,7 @@ description: 文档驱动智能体 v2 — 单步 / 多步 / 运行;技能编
**lines = > split value=`text` sep=`nl`**
**found = 空**
- [`line`](`lines`)
- [line](遍历 `lines` 为 `line`)
**t = > trim value=`line`**
**parts = > split value=`t` sep=:**
**n = > len value=`parts`**
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/ai/沙盒
description: >-
AI 试跑 CoW 工作区:打开 / 运行 / 差异 / 提交(中文面,委托英文 sandbox 模块)。
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/linalg/linalg
description: Formula-first linear algebra (English). MatExpr simplify + display; ABI plugin.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/linalg/线性代数
description: 公式优先的线性代数(中文)。矩阵表达式化简与展示;ABI 插件。
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/net/http
description: HTTP primitives surface for Web Runtime (ADR 0007). Prefer Document/Endpoint Artifacts over raw calls.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/net/url
description: URL helpers (stdlib wrappers). ADR 0007.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/quantum/quantum
description: Official quantum circuit simulator (English). Gates + circuits; ABI plugin.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/quantum/量子
description: 官方量子电路模拟(中文)。门 + 电路;ABI 插件。
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/security/oidc
description: OIDC attach helper for app handles (ADR 0007). Prefer declared auth metadata on Endpoints.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/security/rbac
description: RBAC Resource (ADR 0007).
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/_capability
description: Internal — load native web plugin once. Authors must not call this; import web = capability (ADR 0007).
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/client
description: Browser Runtime helpers (WASM bridge). Prefer lib/browser for effect tables (ADR 0007).
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/component
description: Reusable Document fragments as View node tables (ADR 0007).
import:
+4 -3
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/dom
description: DOM Artifact — Markdown/body to structure; raw HTML is escape hatch only (ADR 0007).
import:
@@ -30,10 +31,10 @@ Escape hatch — wrap a raw HTML string. Prefer Markdown / View nodes.
Render a DOM Artifact (markdown or raw) to HTML via native plugin.
> cap.load
**kind = [kind](dom)**
**kind = [kind](access(dom, "kind"))**
1. `kind` == "raw"
**html = [html](dom)**
**html = [html](access(dom, "html"))**
*html*
2. *
**text = [text](dom)**
**text = [text](access(dom, "text"))**
*> web_dom_markdown text=`text`*
+3 -2
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/page
description: Document → View. Sole compose path is render(nodes=) with unified View schema (ADR 0007).
import:
@@ -37,13 +38,13 @@ Render Document to HTML. `nodes` is the unified View table; when omitted, uses `
> cap.load
**n = nodes**
1. `n` == None
**n = [nodes](self)**
**n = [nodes](access(self, "nodes"))**
2. *
**_ = 1**
1. `n`
*> web_render_nodes page=`self` nodes=`n` db=`db`*
2. *
**body = [body](self)**
**body = [body](access(self, "body"))**
*> web_render_document page=`self` body=`body` db=`db`*
## css
+9 -8
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/route
description: Declared Endpoint / Document route registration (ADR 0007).
import:
@@ -43,19 +44,19 @@ Register this declared route on an app handle.
> cap.load
**a = app**
1. `a` == None
**a = [app](self)**
**a = [app](access(self, "app"))**
2. *
**_ = 1**
**page = [page](self)**
**fn = [fn](self)**
**page = [page](access(self, "page"))**
**fn = [fn](access(self, "fn"))**
1. `page`
**path = [path](self)**
**path = [path](access(self, "path"))**
*> web_app_route app=`a` path=`path` page=`page`*
2. `fn`
**path = [path](self)**
**method = [method](self)**
**request = [request](self)**
**response = [response](self)**
**path = [path](access(self, "path"))**
**method = [method](access(self, "method"))**
**request = [request](access(self, "request"))**
**response = [response](access(self, "response"))**
*> web_app_invoke app=`a` path=`path` method=`method` fn=`fn` body=`request` return=`response`*
3. *
*> table.put in=None at="ok" value=False*
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/web
description: >-
Web Artifact facade (ADR 0007) — page · route · serve · render · inspect · use.
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: ext/web/网页
description: >-
Web Artifact 中文 facade(ADR 0007)— 页面 · 路由 · 服务 · 渲染 · 检视 · 使用。