Repository navigation
fix(agent-core): build package declarations without Promise.withResolvers - #181806
Merged
Merged
Conversation
…vers #181576 used Promise.withResolvers in agent-core, but the package declaration build targets ES2023, so pnpm build fails with TS2550 on main. Capture the resolver from a plain promise instead; behavior is identical.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 24, 2026
…vers (openclaw#181806) openclaw#181576 used Promise.withResolvers in agent-core's tool-batch launcher, but the package declaration build compiles against the repo's ES2023 lib, so pnpm build failed on main with TS2550 and produced no artifacts. Capture the resolver from a plain promise instead (the executor runs synchronously, and only resolve is used); behavior is identical and the package lib target stays unchanged.
fuller-stack-dev
added a commit
to fuller-stack-dev/openclaw
that referenced
this pull request
Oct 26, 2026
The packages/ai declaration program compiles observeAsyncIterator under the ES2023 library, so Promise.withResolvers fails `pnpm build` with TS2550. Capture the queued resolvers locally, as openclaw#165479 and openclaw#181806 did. PR CI could not see this class of failure: tsgo:core admits the `/// <reference lib="es2024.promise" />` directives in worker-runtime for every package, and the ciArtifacts profile skipped the package declaration producers. Run tsdown-ai and tsdown-packages in ciArtifacts ahead of the runtime pass, with declarations forced on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fuller-stack-dev
added a commit
that referenced
this pull request
Oct 26, 2026
…85050) The packages/ai declaration program compiles observeAsyncIterator under the ES2023 library, so Promise.withResolvers fails `pnpm build` with TS2550. Capture the queued resolvers locally, as #165479 and #181806 did. PR CI could not see this class of failure: tsgo:core admits the `/// <reference lib="es2024.promise" />` directives in worker-runtime for every package, and the ciArtifacts profile skipped the package declaration producers. Run tsdown-ai and tsdown-packages in ciArtifacts ahead of the runtime pass, with declarations forced on.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 27, 2026
…enclaw#185050) The packages/ai declaration program compiles observeAsyncIterator under the ES2023 library, so Promise.withResolvers fails `pnpm build` with TS2550. Capture the queued resolvers locally, as openclaw#165479 and openclaw#181806 did. PR CI could not see this class of failure: tsgo:core admits the `/// <reference lib="es2024.promise" />` directives in worker-runtime for every package, and the ciArtifacts profile skipped the package declaration producers. Run tsdown-ai and tsdown-packages in ciArtifacts ahead of the runtime pass, with declarations forced on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes:
pnpm buildfails onmainsince #181576 withpackages/agent-core/src/agent-loop-tool-execution.ts: error TS2550: Property 'withResolvers' does not exist on type 'PromiseConstructor', so no build artifacts (and no Gateway) can be produced from currentmain.User Impact
User impact:
mainbuilds again. No runtime behavior change.Why This Change Was Made
#181576 (
697b23a59bd, "fix(postgres): explain connection loss and canceled queries") addedPromise.withResolvers<void>()to agent-core's tool-batch launcher.src/code can use it, but the agent-core package's declaration build compiles against the repo's ES2023lib, wherewithResolvers(ES2024) does not exist. Onlyresolveis used, so the call is replaced with a plain promise whose resolver is captured synchronously; this is behavior-identical and avoids widening the packagelibtarget for one call.Evidence
mainc3b57f74833:pnpm buildfails intsdown-packageswith TS2550 after ~30 s.pnpm buildpasses (7m 33s full build) and the isolated test rig Gateway starts from the result.oxfmt --checkclean.