Skip to content

fix(gateway-protocol): include SessionWorktreeInfo and SessionsCreateResult in type-only exports - #100871

Closed
cxbAsDev wants to merge 1 commit into
openclaw:mainfrom
cxbAsDev:fix/gateway-protocol-duplicate-ids
Closed

cxbAsDev wants to merge 1 commit into
openclaw:mainfrom
cxbAsDev:fix/gateway-protocol-duplicate-ids

Conversation

@cxbAsDev

@cxbAsDev cxbAsDev commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an upstream main breakage where packages/gateway-protocol/src/index.ts failed TypeScript checks because SessionWorktreeInfo and SessionsCreateResult were exported through the mixed type/value export block but were not included in the explicit export type { ... } block. This caused tsgo:core/tsgo:extensions to report them as unused, and the plugin-sdk boundary declaration emit to report duplicate identifiers, which in turn failed check-lint, check-prod-types, check-test-types, and the extension boundary checks for any PR rebased on current main.

Why This Change Was Made

The recently introduced gateway-protocol barrel (packages/gateway-protocol/src/index.ts) exports session-related types in two places: a mixed export { ... } from "./schema.js" block and a dedicated export type { ... } block. SessionWorktreeInfo and SessionsCreateResult were missing from the type-only block, leaving their value bindings unread inside the module. Adding them to the type-only block satisfies TypeScript without changing the public export surface.

User Impact

No direct user-facing change. This restores a green CI baseline for builds and PRs that depend on the gateway-protocol barrel.

Evidence

Before this change, on a clean upstream/main checkout:

pnpm tsgo:core
# packages/gateway-protocol/src/index.ts(386,8): error TS6133: 'SessionWorktreeInfo' is declared but its value is never read.
# packages/gateway-protocol/src/index.ts(390,8): error TS6133: 'SessionsCreateResult' is declared but its value is never read.

After this change:

pnpm tsgo:core && pnpm tsgo:extensions
# both pass
pnpm run test:extensions:package-boundary:compile
# extension package boundary check passed (117 plugins)

CI checks that were failing on unrelated PRs because of this file (check-lint, check-prod-types, check-test-types, check-additional-extension-*) should now be unblocked.

@cxbAsDev

cxbAsDev commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR because upstream/main has independently fixed the same packages/gateway-protocol/src/index.ts export issue. The SessionWorktreeInfo and SessionsCreateResult types are now included in the type-only export block, so this change is redundant. PR #100722 has been rebased onto the latest upstream/main to pick up the fix.

@cxbAsDev cxbAsDev closed this Jul 6, 2026
@cxbAsDev
cxbAsDev deleted the fix/gateway-protocol-duplicate-ids branch July 6, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant