惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
博客园 - 司徒正美
A
About on SuperTechFans
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
F
Fortinet All Blogs
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
D
Docker
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
H
Help Net Security
量子位
IT之家
IT之家

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs(oc-path): add bundled plugin overview and per-kind C...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -173,6 +173,164 @@ openclaw path find 'oc://SKILL.md/Tools/*/send_email'

173173

openclaw path validate 'oc://AGENTS.md/Tools/$last/risk?session=cron-daily'

174174

```

175175176+

## Recipes by file kind

177+178+

The same five verbs work across kinds; the addressing scheme dispatches on the

179+

file extension. The examples below use the fixtures from the PR description.

180+181+

### Markdown

182+183+

```text

184+

<!-- frontmatter.md -->

185+

---

186+

name: drafter

187+

description: email drafting agent

188+

tier: core

189+

---

190+

## Tools

191+

- gh: GitHub CLI

192+

- curl: HTTP client

193+

- send_email: enabled

194+

```

195+196+

```bash

197+

$ openclaw path resolve 'oc://x.md/[frontmatter]/tier' --file frontmatter.md --human

198+

leaf @ L4: "core" (string)

199+200+

$ openclaw path resolve 'oc://x.md/tools/gh/gh' --file frontmatter.md --human

201+

leaf @ L9: "GitHub CLI" (string)

202+203+

$ openclaw path find 'oc://x.md/tools/*' --file frontmatter.md --human

204+

3 matches for oc://x.md/tools/*:

205+

oc://x.md/tools/gh → node @ L9 [md-item]

206+

oc://x.md/tools/curl → node @ L10 [md-item]

207+

oc://x.md/tools/send-email → node @ L11 [md-item]

208+

```

209+210+

The `[frontmatter]` predicate addresses the YAML frontmatter block; `tools`

211+

matches the `## Tools` heading via slug, and item leaves keep their slug form

212+

even when the source uses underscores (`send_email``send-email`).

213+214+

### JSONC

215+216+

```text

217+

// config.jsonc

218+

{

219+

"plugins": {

220+

"github": {"enabled": true, "role": "vcs"},

221+

"slack": {"enabled": false, "role": "chat"}

222+

}

223+

}

224+

```

225+226+

```bash

227+

$ openclaw path resolve 'oc://config.jsonc/plugins/github/enabled' --file config.jsonc --human

228+

leaf @ L4: "true" (boolean)

229+230+

$ openclaw path set 'oc://config.jsonc/plugins/slack/enabled' 'true' --file config.jsonc --dry-run

231+

--dry-run: would write 142 bytes to /…/config.jsonc

232+

{

233+

"plugins": {

234+

"github": {"enabled": true, "role": "vcs"},

235+

"slack": {"enabled": true, "role": "chat"}

236+

}

237+

}

238+

```

239+240+

JSONC edits go through `jsonc-parser`, so comments and whitespace survive a

241+

`set`. Run with `--dry-run` first to inspect the bytes before committing.

242+243+

### JSONL

244+245+

```text

246+

{"event":"start","userId":"u1","ts":1}

247+

{"event":"action","userId":"u1","ts":2}

248+

{"event":"end","userId":"u1","ts":3}

249+

```

250+251+

```bash

252+

$ openclaw path find 'oc://session.jsonl/[event=action]/userId' --file session.jsonl --human

253+

1 match for oc://session.jsonl/[event=action]/userId:

254+

oc://session.jsonl/L2/userId → leaf @ L2: "u1" (string)

255+256+

$ openclaw path resolve 'oc://session.jsonl/L2/ts' --file session.jsonl --human

257+

leaf @ L2: "2" (number)

258+

```

259+260+

Each line is a record. Address by predicate (`[event=action]`) when you do not

261+

know the line number, or by the canonical `LN` segment when you do.

262+263+

## Subcommand reference

264+265+

### `resolve <oc-path>`

266+267+

Read a single leaf or node. Wildcards are rejected — use `find` for those.

268+

Exits `0` on a match, `1` on a clean miss, `2` on a parse error or refused

269+

pattern.

270+271+

```bash

272+

openclaw path resolve 'oc://AGENTS.md/tools/gh/risk' --human

273+

openclaw path resolve 'oc://gateway.jsonc/server/port' --json

274+

```

275+276+

### `find <pattern>`

277+278+

Enumerate every match for a wildcard / predicate / union pattern. Exits `0`

279+

on at least one match, `1` on zero. File-slot wildcards are rejected with

280+

`OC_PATH_FILE_WILDCARD_UNSUPPORTED` — pass a concrete file (multi-file

281+

globbing is a follow-up feature).

282+283+

```bash

284+

openclaw path find 'oc://AGENTS.md/tools/**/risk'

285+

openclaw path find 'oc://session.jsonl/[event=action]/userId'

286+

openclaw path find 'oc://config.jsonc/plugins/{github,slack}/enabled'

287+

```

288+289+

### `set <oc-path> <value>`

290+291+

Write a leaf. Pair with `--dry-run` to preview the bytes that would be

292+

written without touching the file. Exits `0` on a successful write, `1` if

293+

the substrate refuses (for example, a sentinel guard hit), `2` on parse

294+

errors.

295+296+

```bash

297+

openclaw path set 'oc://gateway.jsonc/version' '2.0' --dry-run

298+

openclaw path set 'oc://gateway.jsonc/version' '2.0'

299+

openclaw path set 'oc://AGENTS.md/Tools/+gh/risk' 'low'

300+

```

301+302+

The `+key` insertion marker creates the named child if it does not already

303+

exist; `+nnn` and bare `+` work for indexed and append insertion respectively.

304+305+

### `validate <oc-path>`

306+307+

Parse-only check. No filesystem access. Useful when you want to confirm a

308+

template path is well-formed before substituting variables, or when you want

309+

the structural breakdown for debugging:

310+311+

```bash

312+

$ openclaw path validate 'oc://AGENTS.md/tools/gh' --human

313+

valid: oc://AGENTS.md/tools/gh

314+

file: AGENTS.md

315+

section: tools

316+

item: gh

317+

```

318+319+

Exits `0` when valid, `1` when invalid (with a structured `code` and

320+

`message`), `2` on argument errors.

321+322+

### `emit <file>`

323+324+

Round-trip a file through the per-kind parser and emitter. The output should

325+

be byte-identical to the input on a sound file — divergence indicates a

326+

parser bug or a sentinel hit. Useful for debugging substrate behavior on

327+

real-world inputs.

328+329+

```bash

330+

openclaw path emit ./AGENTS.md

331+

openclaw path emit ./gateway.jsonc --json

332+

```

333+176334

## Exit codes

177335178336

| Code | Meaning |