Skip to content

fix: make published package root importable#255

Draft
enyst wants to merge 1 commit into
mainfrom
openhands/fix-npm-package-import
Draft

fix: make published package root importable#255
enyst wants to merge 1 commit into
mainfrom
openhands/fix-npm-package-import

Conversation

@enyst

@enyst enyst commented Jul 4, 2026

Copy link
Copy Markdown
Member
  • A human has tested these changes.

Why

Issue #135 asks whether publishing @openhands/typescript-client is solved. Investigation found the package is published to npm as 1.28.0 with the expected subpath exports and publish workflows, but the published root import currently fails in Node ESM because dist/models/acp.js imports acp-providers.json without a JSON import attribute.

Fixes #135.

Summary

  • Move ACP runtime provider data into a TypeScript module so published ESM no longer imports JSON at runtime.
  • Keep the JSON mirror for the existing Python drift check and add a test that verifies it stays in sync with the runtime TS data.
  • Extend the package install smoke test to import the root package and run that smoke test in CI.

Issue Number

Fixes #135

How to Test

  • npm run build
  • npm run lint (passes with existing warnings)
  • npm run test:coverage
  • npm run format:check
  • npm run test:git-dependency
  • Packed local tarball and verified these imports resolve:
    • @openhands/typescript-client
    • @openhands/typescript-client/clients
    • @openhands/typescript-client/client/http-client
    • @openhands/typescript-client/events/remote-events-list
    • @openhands/typescript-client/workspace/remote-workspace

Video/Screenshots

N/A — package/runtime import fix only.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

Current package shape from the investigation:

  • @openhands/typescript-client@1.28.0 is published on npm: https://www.npmjs.com/package/@openhands/typescript-client
  • package.json exports include ., ./clients, ./client/http-client, ./events/remote-events-list, and ./workspace/remote-workspace.
  • Release automation exists for npm trusted publishing and GitHub Packages.
  • The package tarball currently includes dist/**/*, including generated test helper files under dist/__tests__; this PR does not change that packaging surface.

This PR was created by an AI agent (OpenHands) on behalf of the user.

@enyst can click here to continue refining the PR

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Endpoint audit

❌ 6 off-contract call(s) — not on the agent-server · classifiers: cloud

Category Count
❌ Off-contract (not on agent-server) 6
  ⛔ no known backend 5
  ↗️ served by cloud 1
➕ Missing API (agent-server has, client lacks) 9
agent-server endpoints 116
client endpoints 111

❌ Not on agent-server (gated, 6)

⛔ (no known backend) — served by no backend we can see (5)

  • DELETE /api/meta-profiles/{}
  • GET /api/meta-profiles
  • GET /api/meta-profiles/{}
  • POST /api/meta-profiles/{}
  • POST /api/meta-profiles/{}/activate

↗️ served by cloud (1)

  • GET /api/shared-events/search

➕ Missing API — agent-server exposes it, client does not implement (9)

  • GET /
  • GET /api/conversations
  • GET /api/conversations/{}/events
  • GET /api/conversations/{}/workspace
  • GET /api/conversations/{}/workspace/{}
  • GET /api/file/archive
  • GET /api/init
  • POST /api/conversations/{}/load_plugin
  • POST /api/init

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

Labels

type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 2] Publish @openhands/typescript-client as an npm package

1 participant