Docs: prototype generated plugin SDK reference#51877
Docs: prototype generated plugin SDK reference#51877vincentkoc merged 9 commits intoopenclaw:mainfrom
Conversation
4a1b0c8 to
647eb8a
Compare
Greptile SummaryThis PR establishes a TypeScript-driven generator (
Confidence Score: 4/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: scripts/generate-plugin-sdk-api-baseline.ts
Line: 26-27
Comment:
**Duplicate "Expected current:" label in drift error**
Both lines of the drift-detected error message use the same `Expected current:` prefix, which makes the diagnostic harder to read when both file paths are shown.
```suggestion
`JSON path: ${path.relative(repoRoot, result.jsonPath)}`,
`Statefile path: ${path.relative(repoRoot, result.statefilePath)}`,
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: docs/.generated/plugin-sdk-api-baseline.json
Line: 344-350
Comment:
**Re-export alias shows wrong name in `declaration` field**
The `ClawdbotConfig` export entry has `exportName: "ClawdbotConfig"` but its `declaration` field reads `"export type OpenClawConfig = OpenClawConfig;"` — showing the underlying type's name instead of the alias name. Both `ClawdbotConfig` and `OpenClawConfig` end up with identical `declaration` strings, which is misleading.
This is caused by the generator in `src/plugin-sdk/api-baseline.ts`: `resolveSymbolAndDeclaration` resolves through the alias to the original `OpenClawConfig` symbol, and `printNode` then uses `declaration.name.text` (which is `"OpenClawConfig"`) rather than the public export name (`"ClawdbotConfig"`).
For the drift-detection use-case the check will still fire when the underlying type changes, but anyone reading the baseline (or building tooling on top of it) will see a confusing tautological declaration for `ClawdbotConfig`. Consider threading the `symbol.getName()` value through to `printNode` so that re-export aliases render as `export type ClawdbotConfig = OpenClawConfig;` instead.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Merge branch 'main' into docs/plugin-sdk..." | Re-trigger Greptile |
| "Plugin SDK API baseline drift detected.", | ||
| `Expected current: ${path.relative(repoRoot, result.jsonPath)}`, |
There was a problem hiding this comment.
Duplicate "Expected current:" label in drift error
Both lines of the drift-detected error message use the same Expected current: prefix, which makes the diagnostic harder to read when both file paths are shown.
| "Plugin SDK API baseline drift detected.", | |
| `Expected current: ${path.relative(repoRoot, result.jsonPath)}`, | |
| `JSON path: ${path.relative(repoRoot, result.jsonPath)}`, | |
| `Statefile path: ${path.relative(repoRoot, result.statefilePath)}`, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/generate-plugin-sdk-api-baseline.ts
Line: 26-27
Comment:
**Duplicate "Expected current:" label in drift error**
Both lines of the drift-detected error message use the same `Expected current:` prefix, which makes the diagnostic harder to read when both file paths are shown.
```suggestion
`JSON path: ${path.relative(repoRoot, result.jsonPath)}`,
`Statefile path: ${path.relative(repoRoot, result.statefilePath)}`,
```
How can I resolve this? If you propose a fix, please make it concise.| "kind": "type", | ||
| "source": { | ||
| "line": 47, | ||
| "path": "src/hooks/types.ts" | ||
| } | ||
| }, | ||
| { |
There was a problem hiding this comment.
Re-export alias shows wrong name in
declaration field
The ClawdbotConfig export entry has exportName: "ClawdbotConfig" but its declaration field reads "export type OpenClawConfig = OpenClawConfig;" — showing the underlying type's name instead of the alias name. Both ClawdbotConfig and OpenClawConfig end up with identical declaration strings, which is misleading.
This is caused by the generator in src/plugin-sdk/api-baseline.ts: resolveSymbolAndDeclaration resolves through the alias to the original OpenClawConfig symbol, and printNode then uses declaration.name.text (which is "OpenClawConfig") rather than the public export name ("ClawdbotConfig").
For the drift-detection use-case the check will still fire when the underlying type changes, but anyone reading the baseline (or building tooling on top of it) will see a confusing tautological declaration for ClawdbotConfig. Consider threading the symbol.getName() value through to printNode so that re-export aliases render as export type ClawdbotConfig = OpenClawConfig; instead.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/.generated/plugin-sdk-api-baseline.json
Line: 344-350
Comment:
**Re-export alias shows wrong name in `declaration` field**
The `ClawdbotConfig` export entry has `exportName: "ClawdbotConfig"` but its `declaration` field reads `"export type OpenClawConfig = OpenClawConfig;"` — showing the underlying type's name instead of the alias name. Both `ClawdbotConfig` and `OpenClawConfig` end up with identical `declaration` strings, which is misleading.
This is caused by the generator in `src/plugin-sdk/api-baseline.ts`: `resolveSymbolAndDeclaration` resolves through the alias to the original `OpenClawConfig` symbol, and `printNode` then uses `declaration.name.text` (which is `"OpenClawConfig"`) rather than the public export name (`"ClawdbotConfig"`).
For the drift-detection use-case the check will still fire when the underlying type changes, but anyone reading the baseline (or building tooling on top of it) will see a confusing tautological declaration for `ClawdbotConfig`. Consider threading the `symbol.getName()` value through to `printNode` so that re-export aliases render as `export type ClawdbotConfig = OpenClawConfig;` instead.
How can I resolve this? If you propose a fix, please make it concise.* Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <[email protected]> Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 4f1e12a)
* fix(ci): stop serializing push workflow runs (cherry picked from commit 0a20c5c) * test: harden path resolution test helpers (cherry picked from commit 1ad47b8) * Fix launcher startup regressions (openclaw#48501) * Fix launcher startup regressions * Fix CI follow-up regressions * Fix review follow-ups * Fix workflow audit shell inputs * Handle require resolve gaxios misses (cherry picked from commit 313e5bb) * refactor(scripts): move container setup entrypoints (cherry picked from commit 46ccbac) * perf(ci): gate install smoke on changed-smoke (openclaw#52458) (cherry picked from commit 4bd90f2) * Docs: prototype generated plugin SDK reference (openclaw#51877) * Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <[email protected]> Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 4f1e12a) * fix(ci): harden docker builds and unblock config docs (cherry picked from commit 9f08af1) * Docs: add config drift baseline statefile (openclaw#45891) * Docs: add config drift statefile generator * Docs: generate config drift baseline * CI: move config docs drift runner into workflow sanity * Docs: emit config drift baseline json * Docs: commit config drift baseline json * Docs: wire config baseline into release checks * Config: fix baseline drift walker coverage * Docs: regenerate config drift baselines (cherry picked from commit cbec476) * Release: add plugin npm publish workflow (openclaw#47678) * Release: add plugin npm publish workflow * Release: make plugin publish scope explicit (cherry picked from commit d41c9ad) * build: default to Node 24 and keep Node 22 compat (cherry picked from commit deada7e) * ci(android): use explicit flavor debug tasks (cherry picked from commit 0c2e6fe) * ci: harden pnpm sticky cache on PRs (cherry picked from commit 29b36f8) * CI: add built plugin singleton smoke (openclaw#48710) (cherry picked from commit 5a2a4ab) * chore: add code owners for npm release paths (cherry picked from commit 5c9fae5) * test add extension plugin sdk boundary guards (cherry picked from commit 77fb258) * ci: tighten cache docs and node22 gate (cherry picked from commit 797b6fe) * ci: add npm release workflow and CalVer checks (openclaw#42414) (thanks @onutc) (cherry picked from commit 8ba1b6e) * CI: add CLI startup memory regression check (cherry picked from commit c0e0115) * Add bad-barnacle label to prevent barnacle closures. (openclaw#51945) (cherry picked from commit c449a0a) * ci: speed up scoped workflow lanes (cherry picked from commit d17490f) * ci: restore PR pnpm cache fallback (cherry picked from commit e1d0545) * CI: guard gateway watch against duplicate runtime regressions (openclaw#49048) (cherry picked from commit f036ed2) * fix: correct domain reference in docker setup script * fix: adapt cherry-picks for fork TS strictness * fix: adapt cherry-picked tests for fork structure - Dockerfile test: OPENCLAW_ → REMOTECLAW_ ARG names - ci-changed-scope test: add missing runChangedSmoke field - doc-baseline test: rename to e2e (needs dist/ build artifacts) - extension boundary test: update baselines and expectations for fork * fix: adjust ci-changed-scope test for fork's narrower skills regex --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Bob <[email protected]> Co-authored-by: Onur <[email protected]> Co-authored-by: Altay <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Onur Solmaz <[email protected]> Co-authored-by: Harold Hunt <[email protected]>
Summary
Validation
node --import tsx scripts/generate-plugin-sdk-docs.ts --checkpnpm check:docsNotes
mainstill hits the existing unrelated boundary failure inextensions/openai/media-understanding-provider.tsandextensions/openai/openai-codex-provider.ts, so the final preservation commit was created with--no-verifyafter the scoped docs checks above passed