Skip to content

acp-http-client: export type * from "@agentclientprotocol/sdk" is emitted as a value re-export in dist/index.d.ts #397

Open

Description

@trackoor

acp-http-client's published dist/index.d.ts re-exports all runtime values from @agentclientprotocol/sdk (RequestError, ClientSideConnection, AgentSideConnection, TerminalHandle, ndJsonStream, AGENT_METHODS, CLIENT_METHODS), even though dist/index.js only exports AcpHttpClient, AcpHttpError, AcpRpcError, and PROTOCOL_VERSION.

Reproduction

npm init -y
npm install acp-http-client@0.5.6 typescript@5.9.3

t.mts:

import { AcpHttpClient, RequestError } from "acp-http-client";

export const isRpcError = (e: unknown) => e instanceof RequestError;
console.log(typeof AcpHttpClient);

Run:

npx tsc --module nodenext --target es2022 --skipLibCheck t.mts
node t.mjs

Actual behavior

tsc exits with 0 and reports no errors, then node t.mjs fails to load:

file:///.../t.mjs:1
import { AcpHttpClient, RequestError } from "acp-http-client";
                        ^^^^^^^^^^^^
SyntaxError: The requested module 'acp-http-client' does not provide an export named 'RequestError'

Expected behavior

Either dist/index.d.ts preserves a type-only re-export so tsc rejects importing those values from "acp-http-client", or dist/index.js re-exports them at runtime as well.

Cause

sandbox-agent/sdks/acp-http-client/src/index.ts ends with export type * from "@agentclientprotocol/sdk" followed by export { PROTOCOL_VERSION } from "@agentclientprotocol/sdk", and tsup's .d.ts bundler turns the first line into export * from '@agentclientprotocol/sdk' in dist/index.d.ts.

Versions

  • acp-http-client@0.5.6 (npm latest) and main (21c248b1d)
  • @agentclientprotocol/sdk@0.16.1
  • typescript@5.9.3 and 7.0.2
  • Node.js v26.13.0

Credit: https://ucsbplse.github.io/

Activity

  1. linear-code commented on Nov 15, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions