Skip to content

Commit 4f1e12a

Browse files
dutifulbobosolmazvincentkoc
authored
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]>
1 parent 0f2c380 commit 4f1e12a

File tree

10 files changed

+6310
-5
lines changed

10 files changed

+6310
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ jobs:
379379
continue-on-error: true
380380
run: pnpm config:docs:check
381381

382+
- name: Check plugin SDK API baseline drift
383+
id: plugin_sdk_api_drift
384+
continue-on-error: true
385+
run: pnpm plugin-sdk:api:check
386+
382387
- name: Upload gateway watch regression artifacts
383388
if: always()
384389
uses: actions/upload-artifact@v7
@@ -397,6 +402,7 @@ jobs:
397402
NO_RAW_WINDOW_OPEN_OUTCOME: ${{ steps.no_raw_window_open.outcome }}
398403
GATEWAY_WATCH_REGRESSION_OUTCOME: ${{ steps.gateway_watch_regression.outcome }}
399404
CONFIG_DOCS_DRIFT_OUTCOME: ${{ steps.config_docs_drift.outcome }}
405+
PLUGIN_SDK_API_DRIFT_OUTCOME: ${{ steps.plugin_sdk_api_drift.outcome }}
400406
run: |
401407
failures=0
402408
for result in \
@@ -406,7 +412,8 @@ jobs:
406412
"extension-plugin-sdk-internal-boundary|$EXTENSION_PLUGIN_SDK_INTERNAL_BOUNDARY_OUTCOME" \
407413
"lint:ui:no-raw-window-open|$NO_RAW_WINDOW_OPEN_OUTCOME" \
408414
"gateway-watch-regression|$GATEWAY_WATCH_REGRESSION_OUTCOME" \
409-
"config-docs-drift|$CONFIG_DOCS_DRIFT_OUTCOME"; do
415+
"config-docs-drift|$CONFIG_DOCS_DRIFT_OUTCOME" \
416+
"plugin-sdk-api-drift|$PLUGIN_SDK_API_DRIFT_OUTCOME"; do
410417
name="${result%%|*}"
411418
outcome="${result#*|}"
412419
if [ "$outcome" != "success" ]; then

.github/workflows/workflow-sanity.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Disallow direct inputs interpolation in composite run blocks
7373
run: python3 scripts/check-composite-action-input-interpolation.py
7474

75-
config-docs-drift:
75+
generated-doc-baselines:
7676
if: github.event_name == 'workflow_dispatch'
7777
runs-on: blacksmith-16vcpu-ubuntu-2404
7878
steps:
@@ -87,3 +87,6 @@ jobs:
8787

8888
- name: Check config docs drift statefile
8989
run: pnpm config:docs:check
90+
91+
- name: Check plugin SDK API baseline drift
92+
run: pnpm plugin-sdk:api:check

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
- Format check: `pnpm format` (oxfmt --check)
7272
- Format fix: `pnpm format:fix` (oxfmt --write)
7373
- Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage`
74+
- Generated baseline artifacts live together under `docs/.generated/`.
75+
- Config schema drift uses `pnpm config:docs:gen` / `pnpm config:docs:check`.
76+
- Plugin SDK API drift uses `pnpm plugin-sdk:api:gen` / `pnpm plugin-sdk:api:check`.
77+
- If you change config schema/help or the public Plugin SDK surface, update the matching baseline artifact and keep the two drift-check flows adjacent in scripts/workflows/docs guidance rather than inventing a third pattern.
7478
- For narrowly scoped changes, prefer narrowly scoped tests that directly validate the touched behavior. If no meaningful scoped test exists, say so explicitly and use the next most direct validation available.
7579
- Preferred landing bar for pushes to `main`: `pnpm check` and `pnpm test`, with a green result when feasible.
7680
- Scoped tests prove the change itself. `pnpm test` remains the default `main` landing bar; scoped tests do not replace full-suite gates by default.

docs/.generated/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ These baseline artifacts are generated from the repo-owned OpenClaw config schem
44

55
- Do not edit `config-baseline.json` by hand.
66
- Do not edit `config-baseline.jsonl` by hand.
7-
- Regenerate it with `pnpm config:docs:gen`.
8-
- Validate it in CI or locally with `pnpm config:docs:check`.
7+
- Do not edit `plugin-sdk-api-baseline.json` by hand.
8+
- Do not edit `plugin-sdk-api-baseline.jsonl` by hand.
9+
- Regenerate config baseline artifacts with `pnpm config:docs:gen`.
10+
- Validate config baseline artifacts in CI or locally with `pnpm config:docs:check`.
11+
- Regenerate Plugin SDK API baseline artifacts with `pnpm plugin-sdk:api:gen`.
12+
- Validate Plugin SDK API baseline artifacts in CI or locally with `pnpm plugin-sdk:api:check`.

0 commit comments

Comments
 (0)