txcript 0.5.0

Convert coding-agent session transcripts between harness formats.
Documentation
name: publish-npm

# Publishes the WASM package to npm. Manual-only for now — automatic
# publish on version tags is disabled until the npm pipeline is fixed.
# Guards that the tag matches package.json before publishing.
on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  npm:
    name: Publish to npm
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-unknown
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@v2
        with:
          tool: wasm-bindgen-cli@0.2.126
      # The `build`/`prepare` scripts run through Bun; npm still invokes the
      # `prepare` lifecycle during publish, so Bun must be on PATH.
      - uses: oven-sh/setup-bun@v2
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          registry-url: https://registry.npmjs.org
      - name: Tag matches package.json version
        run: |
          tag="${GITHUB_REF_NAME#v}"
          ver="$(node -p "require('./package.json').version")"
          echo "tag=$tag manifest=$ver"
          [ "$tag" = "$ver" ] || { echo "::error::tag $tag != package.json version $ver"; exit 1; }
      # Build the wasm artifact into pkg/, then publish it.
      - run: bun run build
      - run: npm publish --access public --ignore-scripts
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}