Skip to content

[docs][plugin sdk] Split host-hook recipes from workflow follow-ups#74853

Open
100yenadmin wants to merge 7 commits intoopenclaw:mainfrom
electricsheephq:docs/plugin-sdk-host-hook-recipes-split
Open

[docs][plugin sdk] Split host-hook recipes from workflow follow-ups#74853
100yenadmin wants to merge 7 commits intoopenclaw:mainfrom
electricsheephq:docs/plugin-sdk-host-hook-recipes-split

Conversation

@100yenadmin
Copy link
Copy Markdown
Contributor

@100yenadmin 100yenadmin commented Apr 30, 2026

Summary

This PR splits the large host-hook recipe documentation out of the implementation stack so maintainers can review code/tests and docs separately. It carries the product-neutral recipe page, docs navigation entry, and zh-CN glossary entries that were previously part of #73384.

Why This Exists

The implementation PRs are already substantial, and the recipe page adds about 2.7k lines of prose/examples/diagrams by itself. Splitting it keeps the review surfaces smaller:

Scope

  • Adds docs/plugins/host-hooks-examples.md.
  • Adds the page to docs/docs.json.
  • Adds zh-CN glossary labels for the page title/sidebar.
  • Keeps the examples SDK-wide and product-neutral: approval flows, policy gates, background monitors, setup wizards, review assistants, and release workflows.

Stack Order

Review/merge order should be:

  1. [plugin sdk] Consolidate workflow seams and fixtures #73384 - workflow seams, fixtures, and host-hook runtime hardening.
  2. [plugin sdk] Add generic SDK seam followups #74483 - generic SDK seam follow-ups.
  3. This docs PR - recipe map for the additive SDK surfaces.

The docs intentionally reference APIs introduced by the implementation stack, so this PR should land after those implementation PRs.

Validation

  • pnpm docs:list

Related

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Apr 30, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 30, 2026

Codex review: needs maintainer review before merge.

Summary
The PR adds a product-neutral host-hook examples recipe page, docs navigation and zh-CN glossary entries, plus small plugin SDK docs updates for current and companion host-hook surfaces.

Reproducibility: not applicable. this is a docs PR rather than a runtime bug. I source-checked the PR content against current main contracts and Gateway behavior instead of exercising a failing reproduction.

Next step before merge
Maintainer action is ordinary review, final CI, and verifying that companion host-hook implementation PRs are merged or intentionally referenced before publishing the docs.

Security
Cleared: The diff is limited to documentation, navigation, and glossary text, with no workflow, dependency, script, secret, or package-resolution changes.

Review details

Best possible solution:

Land the docs recipe split after the companion host-hook implementation stack is ready, keeping future APIs labeled and stable examples matched to current contracts.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a docs PR rather than a runtime bug. I source-checked the PR content against current main contracts and Gateway behavior instead of exercising a failing reproduction.

Is this the best way to solve the issue?

Yes. A docs-only split is the maintainable review shape for this large recipe page, with the safe path being companion-stack merge ordering and explicit labels for APIs not yet on stable main.

Acceptance criteria:

  • pnpm docs:list
  • pnpm check:docs
  • pnpm format:docs:check
  • git diff --check
  • npm run check:no-conflict-markers

What I checked:

  • PR scope: GitHub reports the latest head 6fea20f changes five docs files with 2831 additions and 8 deletions: glossary, docs navigation, hooks docs, the new host-hook recipe page, and SDK overview. (6fea20fb1995)
  • Current main does not implement the docs split: Current main has no docs/plugins/host-hooks-examples.md and docs/docs.json still lists plugins/hooks followed by SDK channel/provider pages without the new host-hooks-examples page. Public docs: docs/docs.json. (docs/docs.json:1204, 90a5b08fb799)
  • Companion-only APIs are labeled: The new recipe page explicitly says session actions, host-mediated attachments, scheduled turn helpers, and guarded SessionEntry slot mirrors are companion PR surfaces not available on current stable main until those PRs merge. Public docs: docs/plugins/host-hooks-examples.md. (docs/plugins/host-hooks-examples.md:97, 6fea20fb1995)
  • Current contract comparison: Current main exposes the stable host-hook API methods listed by the docs, while registerSessionAction, sendSessionAttachment, and scheduleSessionTurn do not appear in the current OpenClawPluginApi search results. (src/plugins/types.ts:2479, 90a5b08fb799)
  • Gateway behavior alignment: Current main enforces operator.admin for sessions.pluginPatch, returns { ok, key, value }, emits a sessions change, and projects GatewaySessionRow.pluginExtensions as an array built by projectPluginSessionExtensionsSync. (src/gateway/server-methods/sessions.ts:1542, 90a5b08fb799)
  • Prior blockers addressed in latest head: The latest recipe page uses pluginExtensions[] array-safe source selectors and marks session action, attachment, scheduled turn, and emitAgentEvent sections as companion or non-current stable API surfaces. Public docs: docs/plugins/host-hooks-examples.md. (docs/plugins/host-hooks-examples.md:1334, 6fea20fb1995)

Likely related people:

  • 100yenadmin: The PR body and related context tie this docs split to the merged generic host-hook foundation and the companion host-hook RFC/implementation stack that 100yenadmin has been carrying. (role: current stack owner and introduced behavior; confidence: high; commits: 68e5f2ce1913, 6fea20fb1995; files: docs/plugins/host-hooks-examples.md, src/plugins/host-hooks.ts, src/plugins/contracts/host-hooks.contract.test.ts)
  • jalehman: Josh Lehman authored the PR commit that documents session entry slots, and related review context identifies jalehman as a merger/reviewer of the host-hook foundation and current contract stabilization work. (role: recent host-hook maintainer; confidence: medium; commits: 8e0f581d5086; files: docs/plugins/hooks.md, docs/plugins/sdk-overview.md, src/plugins/host-hooks.ts)
  • Peter Steinberger: Current-main blame and shallow history show Peter Steinberger on the grafted commit that introduced the visible host-hook docs/types baseline in this checkout. (role: recent main maintainer; confidence: medium; commits: f74e901794c1; files: src/plugins/host-hooks.ts, docs/plugins/sdk-overview.md, src/plugins/contracts/host-hooks.contract.test.ts)

Remaining risk / open question:

  • The docs intentionally reference companion SDK surfaces, so merging before those implementation PRs are accepted could publish future API guidance despite the availability notes.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 90a5b08fb799.

@100yenadmin 100yenadmin marked this pull request as ready for review April 30, 2026 04:48
Copilot AI review requested due to automatic review settings April 30, 2026 04:48
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57098df02f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/plugins/host-hooks-examples.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Plugin SDK documentation page that collects host-hook “recipe” examples and wires it into the docs navigation + zh-CN glossary, enabling maintainers and plugin authors to reference composition patterns separately from the implementation PR stack.

Changes:

  • Added docs/plugins/host-hooks-examples.md (host-hook recipes/examples page).
  • Added the page to docs/docs.json navigation.
  • Added zh-CN glossary entries for the page title and sidebar label.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
docs/plugins/host-hooks-examples.md New long-form host-hook recipes page with contracts, examples, diagrams, and archetype compositions.
docs/docs.json Adds the new page to the Plugins section nav.
docs/.i18n/glossary.zh-CN.json Adds zh-CN glossary translations for the new page title/sidebar strings.

Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md
Comment thread docs/plugins/host-hooks-examples.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c04613815

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/plugins/host-hooks-examples.md Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e66eb5cc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/plugins/host-hooks-examples.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md
@100yenadmin 100yenadmin requested a review from Copilot May 1, 2026 13:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread docs/plugins/host-hooks-examples.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md Outdated
Comment thread docs/plugins/host-hooks-examples.md
@100yenadmin 100yenadmin force-pushed the docs/plugin-sdk-host-hook-recipes-split branch from 16c0627 to 2261827 Compare May 3, 2026 19:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22618273b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/plugins/host-hooks-examples.md Outdated
@100yenadmin 100yenadmin force-pushed the docs/plugin-sdk-host-hook-recipes-split branch from 3b44b32 to 2ce45c2 Compare May 3, 2026 20:08
@100yenadmin 100yenadmin force-pushed the docs/plugin-sdk-host-hook-recipes-split branch from 2ce45c2 to 07fe0d2 Compare May 3, 2026 20:49
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@100yenadmin
Copy link
Copy Markdown
Contributor Author

Fixed in 6fea20fb19959c7d5d22c2132729dcf699e511d7. The minimal copyable registerSessionExtension example no longer uses companion-only sessionEntrySlotKey / sessionEntrySlotSchema, and the meter descriptor prose no longer claims web/macOS/iOS ship a stable renderer; it is framed as a companion-client implementation contract. Test: pnpm docs:list; pnpm check:docs; pnpm format:docs:check; git diff --check; npm run check:no-conflict-markers.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants