Skip to content

[codex] build OpenClaw SDK cookbook - #1

Merged
steipete merged 4 commits into
mainfrom
codex/full-cookbook
Apr 30, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/full-cookbook

Conversation

@steipete

@steipete steipete commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

@steipete
steipete marked this pull request as ready for review April 30, 2026 00:01
@steipete
steipete merged commit 184676e into main Apr 30, 2026
1 check passed
@steipete

Copy link
Copy Markdown
Contributor Author

Landed via rebase onto main.

  • Source head: 05b6b95
  • Landed tip: 184676e
  • Gate: pnpm check; GitHub Check / Cookbook and examples green on final PR head.

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

Copy link
Copy Markdown

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: 05b6b95f50

ℹ️ 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".

"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Ship a JavaScript entrypoint for the SDK shim

The shim package exports ./src/index.ts as its runtime default, so built examples that run with plain node (for example sdk/quickstart and sdk/coding-agent-cli start scripts) import raw TypeScript at runtime. In Node 22’s strip-types mode, this file currently contains unsupported syntax (parameter properties), which causes runtime failures instead of starting the example; exporting compiled JS (or compiling the shim before use) is required for these start flows to work reliably.

Useful? React with 👍 / 👎.

calls: RequestCall[];
}> {
const transport = new CookbookTransport();
const oc = new OpenClaw({ transport });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Close the OpenClaw client in custom transport recipe

This recipe creates an OpenClaw client with a transport and returns without calling oc.close(). If a real custom transport allocates sockets, streams, or timers, those resources are never released, which can leak handles and keep processes alive in integration tests or CLI usage. Wrap the run lifecycle in try/finally and close the client on exit, as done in the other recipes.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant