Repository navigation
refactor: keep plain text tool-call promotion private - #86374
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor: keep plain text tool-call promotion private This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 037601d899
ℹ️ 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".
| import { createSubsystemLogger } from "openclaw/plugin-sdk/logging-core"; | ||
| import type { ProviderWrapStreamFnContext } from "openclaw/plugin-sdk/plugin-entry"; | ||
| import { createPlainTextToolCallPromotionWrapper } from "openclaw/plugin-sdk/provider-stream-shared"; | ||
| import { createPlainTextToolCallPromotionWrapper } from "openclaw/plugin-sdk/provider-stream-runtime-internal"; |
There was a problem hiding this comment.
Keep new private SDK subpath resolvable for LMStudio/XAI
Switching LM Studio/xAI to openclaw/plugin-sdk/provider-stream-runtime-internal makes runtime loading depend on the private-subpath owner gate, but this commit does not add that subpath to PRIVATE_PLUGIN_SDK_SUBPATH_OWNERS in src/plugins/sdk-alias.ts (see owner filter at lines 280-300 and shouldIncludePrivateLocalOnlyPluginSdkSubpath at 593-606). In normal runs where OPENCLAW_ENABLE_PRIVATE_QA_CLI is not set, ownerless private subpaths are excluded, so these imports can fail to resolve when the bundled provider module is loaded (tests can miss this because Vitest aliases all private subpaths directly).
Useful? React with 👍 / 👎.
|
Landed. Merged as c3ab2de from head 037601d. Proof:
Auto-review note: no callable |
Move the plain-text tool-call promotion wrapper out of the public provider stream SDK helper and into a private local-only bundled-provider runtime seam.
Move the plain-text tool-call promotion wrapper out of the public provider stream SDK helper and into a private local-only bundled-provider runtime seam.
Move the plain-text tool-call promotion wrapper out of the public provider stream SDK helper and into a private local-only bundled-provider runtime seam.
Summary
provider-stream-runtime-internalSDK subpath for bundled provider runtime hygiene.provider-stream-shared.Verification
node scripts/run-vitest.mjs extensions/lmstudio/src/stream.test.ts extensions/xai/stream.test.ts src/plugin-sdk/provider-stream-shared.test.ts src/plugin-sdk/tool-payload.test.ts src/plugins/sdk-alias.test.ts src/plugins/contracts/plugin-sdk-root-alias.test.ts src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.tsnode scripts/check-plugin-sdk-subpath-exports.mjspnpm plugin-sdk:check-exportspnpm exec oxfmt --write extensions/lmstudio/src/stream.ts extensions/xai/stream.ts src/plugin-sdk/provider-stream-shared.ts src/plugin-sdk/provider-stream-runtime-internal.tspnpm lint:extensions:no-src-outside-plugin-sdkpnpm lint:extensions:no-plugin-sdk-internalpnpm lint:plugins:plugin-sdk-subpaths-exportedpnpm build:plugin-sdk:dtspnpm buildpnpm plugin-sdk:api:genpnpm plugin-sdk:api:checkgit diff --checkenv -u OPENCLAW_TESTBOX -u OPENCLAW_TESTBOX_REMOTE_RUN pnpm check:changedReal behavior proof
Behavior addressed: plain-text tool-call fallback promotion remains available to bundled LM Studio and xAI providers, but is no longer exported from the public provider stream SDK helper.
Real environment tested: local macOS checkout, Node 26.0.0 via repo scripts.
Exact steps or command run after this patch: focused provider/SDK tests, SDK export/API checks, full
pnpm build, and localpnpm check:changedwith inherited Testbox env unset.Evidence after fix: focused suite passed 7 files / 145 tests;
pnpm buildcompleted;pnpm plugin-sdk:api:checkpassed after regenerating the baseline hash;pnpm check:changedcompleted successfully.Observed result after fix: LM Studio and xAI still import the wrapper through a private local-only subpath, while root and
@openclaw/plugin-sdkpackage exports do not publish that subpath.What was not tested: live provider call against LM Studio or xAI; this is an import-boundary refactor with unchanged wrapper behavior.