Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(sdk-calls): publish with the SDK at a shared version (#9987)
Eric Hayes68f251554407
diff --git a/.agents/skills/release-sdk/SKILL.md b/.agents/skills/release-sdk/SKILL.mdindex 651310c32d..6e7aefb8cd 100644--- a/.agents/skills/release-sdk/SKILL.md+++ b/.agents/skills/release-sdk/SKILL.md@@ -6,9 +6,10 @@ description: Bump and release @macro-inc/sdk from this repository. Use when aske# Release the SDKRead [the SDK release guide](../../../packages/sdk/RELEASING.md) and the root-`AGENTS.md`. Releasing is merging a version bump: `Release SDK` publishes on any-push to `main` that raises the version in `packages/sdk/package.json`. There is-no release tag to push by hand and no separate publish step to trigger.+`AGENTS.md`. Releasing is merging a version bump: `Release SDK` publishes+`@macro-inc/sdk` and `@macro-inc/sdk-calls`, which share a version, on any push to+`main` that raises it. There is no release tag to push by hand and no separate+publish step to trigger.## Scope@@ -28,10 +29,10 @@ no release tag to push by hand and no separate publish step to trigger.2. Run `just bump` in `packages/sdk` (it takes `patch`, `minor`, `major`, or anexplicit version), then the guide's validation and package inspection. Committhe bump alongside the SDK change. Do not hide failed checks.-3. After the merge, watch the `Release SDK` run for that commit, then verify the- npm version and dist-tag. A merged bump, a green job, or a pushed tag alone is+3. After the merge, watch the `Release SDK` run for that commit, then verify both+ packages' npm version and dist-tag. A merged bump, a green job, or a pushed tag alone isnot proof of publication.-4. Use the guide's recovery path — the `sdk-v*` tag trigger on `Publish SDK` —+4. Use the guide's recovery path — the `sdk-v*` or `sdk-calls-v*` tag trigger on `Publish SDK` —only when a merged release commit failed transiently and the version is stillunpublished. Never move an existing tag or re-publish a published version.diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.ymlindex 240054fe71..616b4f4042 100644--- a/.github/workflows/pr-ci.yml+++ b/.github/workflows/pr-ci.yml@@ -523,6 +523,7 @@ jobs:- '.github/workflows/check_tauri_lockfiles.yml'sdk:- 'packages/sdk/**'+ - 'packages/sdk-calls/**'- '.github/workflows/sdk-check.yml'macrod_update:- 'crates/coding_agent_worker/**'diff --git a/.github/workflows/publish-sdk.yml b/.github/workflows/publish-sdk.ymlindex 9f848333fb..91143d3a36 100644--- a/.github/workflows/publish-sdk.yml+++ b/.github/workflows/publish-sdk.yml@@ -5,9 +5,10 @@ name: Publish SDKpush:tags:- sdk-v*+ - sdk-calls-v*jobs:publish:- name: Publish @macro-inc/sdk+ name: Publish ${{ github.ref_name }}runs-on: ubuntu-latestpermissions:contents: read@@ -32,8 +33,17 @@ jobs:run: npm install --global 'npm@^11.5.1'- name: Verify release tagrun: |- version="${GITHUB_REF_NAME#sdk-v}"- package_version="$(node -p "require('./packages/sdk/package.json').version")"+ case "$GITHUB_REF_NAME" in+ sdk-calls-v*)+ version="${GITHUB_REF_NAME#sdk-calls-v}"+ directory=packages/sdk-calls+ ;;+ *)+ version="${GITHUB_REF_NAME#sdk-v}"+ directory=packages/sdk+ ;;+ esac+ package_version="$(node -p "require('./$directory/package.json').version")"if [ "$version" != "$package_version" ]; thenecho "tag version $version does not match package version $package_version"@@ -50,9 +60,22 @@ jobs:- name: Validate SDKrun: bun run check && bun test && bun run coverage && bun run buildworking-directory: packages/sdk+ - name: Install sdk-calls dependencies+ if: startsWith(github.ref_name, 'sdk-calls-v')+ run: bun install --frozen-lockfile+ working-directory: packages/sdk-calls+ - name: Validate sdk-calls+ if: startsWith(github.ref_name, 'sdk-calls-v')+ run: bun run check && bun test && bun run build && bun run check:pack+ working-directory: packages/sdk-calls- name: Publish package+ if: '!startsWith(github.ref_name, ''sdk-calls-v'')'run: npm publish --access publicworking-directory: packages/sdk+ - name: Publish sdk-calls+ if: startsWith(github.ref_name, 'sdk-calls-v')+ run: npm publish --access public+ working-directory: packages/sdk-callsconcurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: falsediff --git a/.github/workflows/release-sdk.yml b/.github/workflows/release-sdk.ymlindex 192508d33d..757e2b0675 100644--- a/.github/workflows/release-sdk.yml+++ b/.github/workflows/release-sdk.yml@@ -7,10 +7,11 @@ name: Release SDK- mainpaths:- packages/sdk/package.json+ - packages/sdk-calls/package.json- '.github/workflows/release-sdk.yml'jobs:release:- name: Release @macro-inc/sdk+ name: Release @macro-inc/sdk and @macro-inc/sdk-callsruns-on: ubuntu-latestpermissions:contents: write@@ -40,9 +41,17 @@ jobs:run: bun scripts/resolve-release.tsworking-directory: packages/sdk- name: Validate SDK- if: steps.resolve.outputs.release == 'true'+ if: steps.resolve.outputs.release == 'true' || steps.resolve.outputs.calls_release == 'true'run: bun run check && bun test && bun run coverage && bun run buildworking-directory: packages/sdk+ - name: Install sdk-calls dependencies+ if: steps.resolve.outputs.release == 'true' || steps.resolve.outputs.calls_release == 'true'+ run: bun install --frozen-lockfile+ working-directory: packages/sdk-calls+ - name: Validate sdk-calls+ if: steps.resolve.outputs.release == 'true' || steps.resolve.outputs.calls_release == 'true'+ run: bun run check && bun test && bun run build && bun run check:pack+ working-directory: packages/sdk-calls- name: Publish packageif: steps.resolve.outputs.release == 'true'run: npm publish --access public --tag "${{ steps.resolve.outputs.dist_tag }}"@@ -53,20 +62,28 @@ jobs:set -euo pipefailgit tag "${{ steps.resolve.outputs.tag }}" "$GITHUB_SHA"git push origin "refs/tags/${{ steps.resolve.outputs.tag }}"+ - name: Publish sdk-calls+ if: steps.resolve.outputs.calls_release == 'true'+ run: npm publish --access public --tag "${{ steps.resolve.outputs.calls_dist_tag }}"+ working-directory: packages/sdk-calls+ - name: Tag the sdk-calls release+ if: steps.resolve.outputs.calls_release == 'true'+ run: |+ set -euo pipefail+ git tag "${{ steps.resolve.outputs.calls_tag }}" "$GITHUB_SHA"+ git push origin "refs/tags/${{ steps.resolve.outputs.calls_tag }}"- name: Summarizeif: always()run: |- case "${{ steps.resolve.outputs.release }}" in- true)- echo "Published @macro-inc/sdk@${{ steps.resolve.outputs.version }} (${{ steps.resolve.outputs.tag }})" >> "$GITHUB_STEP_SUMMARY"- ;;- false)- echo "No SDK release: packages/sdk version ${{ steps.resolve.outputs.version }} is already published." >> "$GITHUB_STEP_SUMMARY"- ;;- *)- echo "SDK release did not resolve; see the failed step above." >> "$GITHUB_STEP_SUMMARY"- ;;- esac+ summarize() {+ case "$2" in+ true) echo "Published $1@$3 ($4)" >> "$GITHUB_STEP_SUMMARY" ;;+ false) echo "No release of $1: $3 is already published." >> "$GITHUB_STEP_SUMMARY" ;;+ *) echo "$1 did not resolve; see the failed step above." >> "$GITHUB_STEP_SUMMARY" ;;+ esac+ }+ summarize @macro-inc/sdk "${{ steps.resolve.outputs.release }}" "${{ steps.resolve.outputs.version }}" "${{ steps.resolve.outputs.tag }}"+ summarize @macro-inc/sdk-calls "${{ steps.resolve.outputs.calls_release }}" "${{ steps.resolve.outputs.calls_version }}" "${{ steps.resolve.outputs.calls_tag }}"concurrency:group: ${{ github.workflow }}cancel-in-progress: falsediff --git a/.github/workflows/sdk-check.yml b/.github/workflows/sdk-check.ymlindex 02812bb5b9..923b841b9f 100644--- a/.github/workflows/sdk-check.yml+++ b/.github/workflows/sdk-check.yml@@ -7,6 +7,7 @@ name: SDK Check- mainpaths:- packages/sdk/**+ - packages/sdk-calls/**- '.github/workflows/sdk-check.yml'workflow_call: {}jobs:@@ -35,6 +36,15 @@ jobs:- name: Check endpoint coveragerun: bun run coverageworking-directory: packages/sdk+ - name: Build SDK+ run: bun run build+ working-directory: packages/sdk+ - name: Install sdk-calls dependencies+ run: bun install --frozen-lockfile+ working-directory: packages/sdk-calls+ - name: Check sdk-calls+ run: bun run check && bun test && bun run build && bun run check:pack+ working-directory: packages/sdk-callsconcurrency:group: sdk-check-${{ github.event_name == 'pull_request' && github.run_id || github.ref }}cancel-in-progress: truediff --git a/packages/sdk-calls/AGENTS.md b/packages/sdk-calls/AGENTS.mdindex b1308776bf..e030122169 100644--- a/packages/sdk-calls/AGENTS.md+++ b/packages/sdk-calls/AGENTS.md@@ -24,10 +24,19 @@ screen-share publishing for Node and browsers.## Checks-- `bun test` and `bun run check` from this directory; `just check` covers format and lint.+- Build the SDK first, then from this directory: `bun install --frozen-lockfile`,+ `bun run check`, `bun test`, `bun run build`, `bun run check:pack`. `SDK Check`+ runs them. `just check` covers format and lint.## Gotchas+- Versions in lockstep with `@macro-inc/sdk`: never edit the version or peer range+ by hand; run `just bump` in `packages/sdk`. See `../sdk/RELEASING.md`.+- Types come from the SDK's build through `tsconfig.json` `paths`, so build the SDK+ first. The `file:../sdk` dev dependency only satisfies the peer at install, since+ the required version may not be on npm yet.+- Relative imports in `src/` need their `.js` extension: `tsc` keeps specifiers as+ written, and Node's ESM loader won't resolve one without it.- Never log, attach to spans, or serialize the room token.- rtc-node has no room-wide publish defaults or publish hook, so the localparticipant's `publishTrack` is wrapped to set `dtx` false for audio.diff --git a/packages/sdk-calls/README.md b/packages/sdk-calls/README.mdindex 55b1485036..de6a576d87 100644--- a/packages/sdk-calls/README.md+++ b/packages/sdk-calls/README.md@@ -8,6 +8,17 @@ token as `CallConnection` (import it from `@macro-inc/sdk`); this package does nThe package uses `@opentelemetry/api` for `call.sdk.*` spans. Tracing is ano-op until the host installs an OpenTelemetry tracer provider.++## Install++The version of this package always matches the `@macro-inc/sdk` it requires.+Add the LiveKit client for your runtime:++```sh+npm install @macro-inc/sdk @macro-inc/sdk-calls @livekit/rtc-node # Node+npm install @macro-inc/sdk @macro-inc/sdk-calls livekit-client # browser+```+## Voice agent (Node or Bun)```ts@@ -34,6 +45,10 @@ so `connectRoom` wraps the local participant's `publishTrack` to apply it.## Screen share+`publishScreen` has only run against mocks. It has not published to a real+LiveKit room or been rendered by the app, so test it in a real call before+relying on it. Audio and joining are the proven parts of this path.+Node capture is supplied by your program as an async stream of fixed-sizeI420 or RGBA frames. The helper publishes them as a screen share and closesthe track when the stream ends or `stop()` is called.diff --git a/packages/sdk-calls/bun.lock b/packages/sdk-calls/bun.locknew file mode 100644index 0000000000..8dbfd38890--- /dev/null+++ b/packages/sdk-calls/bun.lock@@ -0,0 +1,335 @@+{+ "lockfileVersion": 1,+ "configVersion": 1,+ "workspaces": {+ "": {+ "name": "@macro-inc/sdk-calls",+ "dependencies": {+ "@opentelemetry/api": "^1.9.1",+ },+ "devDependencies": {+ "@livekit/rtc-node": "^1.2.1",+ "@macro-inc/sdk": "file:../sdk",+ "@types/bun": "^1.3.5",+ "livekit-client": "^2.18.0",+ "typescript": "^5.9.2",+ },+ "peerDependencies": {+ "@livekit/rtc-node": "^1.2.1",+ "@macro-inc/sdk": "^0.4.0",+ "livekit-client": "^2.18.0",+ },+ "optionalPeers": [+ "@livekit/rtc-node",+ "livekit-client",+ ],+ },+ },+ "packages": {+ "@biomejs/biome": ["@biomejs/[email protected]", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.12", "@biomejs/cli-darwin-x64": "2.4.12", "@biomejs/cli-linux-arm64": "2.4.12", "@biomejs/cli-linux-arm64-musl": "2.4.12", "@biomejs/cli-linux-x64": "2.4.12", "@biomejs/cli-linux-x64-musl": "2.4.12", "@biomejs/cli-win32-arm64": "2.4.12", "@biomejs/cli-win32-x64": "2.4.12" }, "bin": { "biome": "bin/biome" } }, "sha512-Rro7adQl3NLq/zJCIL98eElXKI8eEiBtoeu5TbXF/U3qbjuSc7Jb5rjUbeHHcquDWeSf3HnGP7XI5qGrlRk/pA=="],++ "@biomejs/cli-darwin-arm64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BnMU4Pc3ciEVteVpZ0BK33MLr7X57F5w1dwDLDn+/iy/yTrA4Q/N2yftidFtsA4vrDh0FMXDpacNV/Tl3fbmng=="],++ "@biomejs/cli-darwin-x64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-x9uJ0bI1rJsWICp3VH8w/5PnAVD3A7SqzDpbrfoUQX1QyWrK5jSU4fRLo/wSgGeplCivbxBRKmt5Xq4/nWvq8A=="],++ "@biomejs/cli-linux-arm64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-tOwuCuZZtKi1jVzbk/5nXmIsziOB6yqN8c9r9QM0EJYPU6DpQWf11uBOSCfFKKM4H3d9ZoarvlgMfbcuD051Pw=="],++ "@biomejs/cli-linux-arm64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-FhfpkAAlKL6kwvcVap0Hgp4AhZmtd3YImg0kK1jd7C/aSoh4SfsB2f++yG1rU0lr8Y5MCFJrcSkmssiL9Xnnig=="],++ "@biomejs/cli-linux-x64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-8pFeAnLU9QdW9jCIslB/v82bI0lhBmz2ZAKc8pVMFPO0t0wAHsoEkrUQUbMkIorTRIjbqyNZHA3lEXavsPWYSw=="],++ "@biomejs/cli-linux-x64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-dwTIgZrGutzhkQCuvHynCkyW6hJxUuyZqKKO0YNfaS2GUoRO+tOvxXZqZB6SkWAOdfZTzwaw8IEdUnIkHKHoew=="],++ "@biomejs/cli-win32-arm64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-B0DLnx0vA9ya/3v7XyCaP+/lCpnbWbMOfUFFve+xb5OxyYvdHaS55YsSddr228Y+JAFk58agCuZTsqNiw2a6ig=="],++ "@biomejs/cli-win32-x64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-yMckRzTyZ83hkk8iDFWswqSdU8tvZxspJKnYNh7JZr/zhZNOlzH13k4ecboU6MurKExCe2HUkH75pGI/O2JwGA=="],++ "@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-wJ8ReQbHxsAfXhrf9ixl0aYbZorRuOWpBNzm8pL8ftmSxQx/wnJD5Eg861NwJU/czy2VXFIebCeZnZrI9rktIQ=="],++ "@datastructures-js/deque": ["@datastructures-js/[email protected]", "", {}, "sha512-PSBhJ2/SmeRPRHuBv7i/fHWIdSC3JTyq56qb+Rq0wjOagi0/fdV5/B/3Md5zFZus/W6OkSPMaxMKKMNMrSmubg=="],++ "@esbuild/aix-ppc64": ["@esbuild/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="],++ "@esbuild/android-arm": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="],++ "@esbuild/android-arm64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="],++ "@esbuild/android-x64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="],++ "@esbuild/darwin-arm64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="],++ "@esbuild/darwin-x64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="],++ "@esbuild/freebsd-arm64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="],++ "@esbuild/freebsd-x64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="],++ "@esbuild/linux-arm": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="],++ "@esbuild/linux-arm64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="],++ "@esbuild/linux-ia32": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="],++ "@esbuild/linux-loong64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="],++ "@esbuild/linux-mips64el": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="],++ "@esbuild/linux-ppc64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="],++ "@esbuild/linux-riscv64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="],++ "@esbuild/linux-s390x": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="],++ "@esbuild/linux-x64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="],++ "@esbuild/netbsd-arm64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="],++ "@esbuild/netbsd-x64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="],++ "@esbuild/openbsd-arm64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="],++ "@esbuild/openbsd-x64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="],++ "@esbuild/openharmony-arm64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="],++ "@esbuild/sunos-x64": ["@esbuild/[email protected]", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="],++ "@esbuild/win32-arm64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="],++ "@esbuild/win32-ia32": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="],++ "@esbuild/win32-x64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="],++ "@hey-api/codegen-core": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/types": "0.1.4", "ansi-colors": "4.1.3", "c12": "3.3.4", "color-support": "1.1.3" } }, "sha512-s97jL1dgTMuiMHv2BZ1X4Tgd99Mf9GOvGdNqNcGwIMmnR+PgYNoraj4Zvp134MKsNCap/m7k0r0vKKnl56pj4w=="],++ "@hey-api/json-schema-ref-parser": ["@hey-api/[email protected]", "", { "dependencies": { "@jsdevtools/ono": "7.1.3", "@types/json-schema": "7.0.15", "js-yaml": "4.2.0" } }, "sha512-otmd+zCxbYVBIp/mlMTnGkvlNYLkVKgs3VOIq0kSnenhB1+fRwLPQIeSwyWM6E51oXhUedkYjVsVpkVexeuJOA=="],++ "@hey-api/openapi-ts": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/codegen-core": "0.9.1", "@hey-api/json-schema-ref-parser": "1.4.4", "@hey-api/shared": "0.5.0", "@hey-api/spec-types": "0.2.0", "@hey-api/types": "0.1.4", "@lukeed/ms": "2.0.2", "ansi-colors": "4.1.3", "color-support": "1.1.3", "commander": "15.0.0", "get-tsconfig": "4.14.0" }, "peerDependencies": { "typescript": ">=5.5.3 || >=6.0.0 || 6.0.1-rc" }, "bin": { "openapi-ts": "./bin/run.js" } }, "sha512-SePU/5oEWWkvUBYmvzdYRctseoLuskyhs4ET0RvLIcmzc8yLQoA2R+KtBIQ8bPsoSUB0m4E5SmBnl6aGSA0szQ=="],++ "@hey-api/shared": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/codegen-core": "0.9.1", "@hey-api/json-schema-ref-parser": "1.4.4", "@hey-api/spec-types": "0.2.0", "@hey-api/types": "0.1.4", "ansi-colors": "4.1.3", "cross-spawn": "7.0.6", "open": "11.0.0", "semver": "7.8.4" } }, "sha512-JN/j4Ebh4cJGYIQ5cwWuqe7GeSUyQoz7oC51WqyhKOcrejK6DKZMDkshc5d1eKTRuRL+rjozuRcoUaZZn2DGPw=="],++ "@hey-api/spec-types": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/types": "0.1.4" } }, "sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg=="],++ "@hey-api/types": ["@hey-api/[email protected]", "", {}, "sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg=="],++ "@jsdevtools/ono": ["@jsdevtools/[email protected]", "", {}, "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="],++ "@livekit/mutex": ["@livekit/[email protected]", "", {}, "sha512-EsshAucklmpuUAfkABPxJNhzj9v2sG7JuzFDL4ML1oJQSV14sqrpTYnsaOudMAw9yOaW53NU3QQTlUQoRs4czw=="],++ "@livekit/protocol": ["@livekit/[email protected]", "", { "dependencies": { "@bufbuild/protobuf": "^1.10.0" } }, "sha512-X8DxKlNbzk6Lh+v630+mjdFHSotdAFwIyzxSRSUql2DbTxCnlpa7JsvFGc6Na3mXiex2OFh0iiQtWwOBP0rIYA=="],++ "@livekit/rtc-ffi-bindings": ["@livekit/[email protected]", "", { "dependencies": { "@bufbuild/protobuf": "^1.10.1" }, "optionalDependencies": { "@livekit/rtc-ffi-bindings-darwin-arm64": "0.13.1", "@livekit/rtc-ffi-bindings-darwin-x64": "0.13.1", "@livekit/rtc-ffi-bindings-linux-arm64-gnu": "0.13.1", "@livekit/rtc-ffi-bindings-linux-x64-gnu": "0.13.1", "@livekit/rtc-ffi-bindings-win32-x64-msvc": "0.13.1" } }, "sha512-bcE1N/lr6SNvOKP4eOxBQNuplJMX21Tbe0nyMhV9Cj/wpXCXCjw3eScwyg1R0M32hKvWpoiJDv+EVVmg13Wq1Q=="],++ "@livekit/rtc-ffi-bindings-darwin-arm64": ["@livekit/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-SIbQpLHmY5oq0hiUM9UTmlkPVLAm8TbTjnQlMWMqQLLFgmtIx+ayN2kLII5w0KIC68iK4yOjTUAeFMAJFYY5hg=="],++ "@livekit/rtc-ffi-bindings-darwin-x64": ["@livekit/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-+gkitypx0mvtbUxlgnokr1wujFMuVW44q6Bev6AozkfCqpSBnO2bFqwJQo4sGY3UNl9Rq6TElcKPQ813LJu1UA=="],++ "@livekit/rtc-ffi-bindings-linux-arm64-gnu": ["@livekit/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rnWm3ekPXfHvO18CeRahQw4SF+YPiY3eUVHSbDqHPTTO3ohIfOT09qpC1otbaPm5gQYaQPuM0wUpLXDOPhgG0Q=="],++ "@livekit/rtc-ffi-bindings-linux-x64-gnu": ["@livekit/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-jp3CQdwb8gjh/sIL4ur6bVQiQARBnJkZp8sbifbXqWqpYX9lXMvEX5KomPCfsQrHfcuNwYHV4OjrXPXvc5+SEw=="],++ "@livekit/rtc-ffi-bindings-win32-x64-msvc": ["@livekit/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-GbEfjBixFbxVx4iWr5J65cIVEdRirzcBdWr17eY2R18qTsr4VVr6mzmorUCq/jwysqE+Sl+d1QWR7oBDQPxbjw=="],++ "@livekit/rtc-node": ["@livekit/[email protected]", "", { "dependencies": { "@datastructures-js/deque": "1.0.8", "@livekit/mutex": "^1.0.0", "@livekit/rtc-ffi-bindings": "0.13.1", "@livekit/typed-emitter": "^3.0.0", "pino": "^9.0.0", "pino-pretty": "^13.2.0" } }, "sha512-Hb1JwzADVfEojEGXMz/WylXjeQQWzHDOKUfOq7clrOsMecqif249CBcWJTwhikSlyI56NzhCOnVlK1/Q3grX1A=="],++ "@livekit/typed-emitter": ["@livekit/[email protected]", "", {}, "sha512-9bl0k4MgBPZu3Qu3R3xy12rmbW17e3bE9yf4YY85gJIQ3ezLEj/uzpKHWBsLaDoL5Mozz8QCgggwIBudYQWeQg=="],++ "@lukeed/ms": ["@lukeed/[email protected]", "", {}, "sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA=="],++ "@macro-inc/sdk": ["@macro-inc/sdk@file:../sdk", { "dependencies": { "ts-pattern": "^5.8.0", "uuid": "^11.1.1" }, "devDependencies": { "@biomejs/biome": "2.4.12", "@hey-api/openapi-ts": "0.99.0", "@types/bun": "^1.3.5", "@types/semver": "^7.8.0", "esbuild": "^0.28.1", "hono": "^4.12.27", "semver": "^7.8.5", "typescript": "^5.9.2" } }],++ "@opentelemetry/api": ["@opentelemetry/[email protected]", "", {}, "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ=="],++ "@pinojs/redact": ["@pinojs/[email protected]", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],++ "@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="],++ "@types/dom-mediacapture-record": ["@types/[email protected]", "", {}, "sha512-mUMZLK3NvwRLcAAT9qmcK+9p7tpU2FHdDsntR3YI4+GY88XrgG4XiE7u1Q2LAN2/FZOz/tdMDC3GQCR4T8nFuw=="],++ "@types/json-schema": ["@types/[email protected]", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],++ "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="],++ "@types/semver": ["@types/[email protected]", "", {}, "sha512-1mAINjtQCXXeLkJ9ehXkwOcBpqtLxiVtKhpUf83DdRNdQKV0iXZpaHYqRr7nj+wvxuJzoAmAwXI+sCNMv1CzLQ=="],++ "ansi-colors": ["[email protected]", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="],++ "argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],++ "atomic-sleep": ["[email protected]", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="],++ "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="],++ "bundle-name": ["[email protected]", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA=="],++ "c12": ["[email protected]", "", { "dependencies": { "chokidar": "^5.0.0", "confbox": "^0.2.4", "defu": "^6.1.6", "dotenv": "^17.3.1", "exsolve": "^1.0.8", "giget": "^3.2.0", "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.1.0", "pkg-types": "^2.3.0", "rc9": "^3.0.1" }, "peerDependencies": { "magicast": "*" }, "optionalPeers": ["magicast"] }, "sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA=="],++ "chokidar": ["[email protected]", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],++ "color-support": ["[email protected]", "", { "bin": { "color-support": "bin.js" } }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="],++ "colorette": ["[email protected]", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="],++ "commander": ["[email protected]", "", {}, "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg=="],++ "confbox": ["[email protected]", "", {}, "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ=="],++ "cross-spawn": ["[email protected]", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],++ "dateformat": ["[email protected]", "", {}, "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="],++ "default-browser": ["[email protected]", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw=="],++ "default-browser-id": ["[email protected]", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="],++ "define-lazy-prop": ["[email protected]", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="],++ "defu": ["[email protected]", "", {}, "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ=="],++ "destr": ["[email protected]", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="],++ "dotenv": ["[email protected]", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],++ "end-of-stream": ["[email protected]", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],++ "esbuild": ["[email protected]", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="],++ "events": ["[email protected]", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="],++ "exsolve": ["[email protected]", "", {}, "sha512-h1pQPR9XoeSMdntRNCjyTznaume4UpfXrULBnlkZ2CUM/G5eSa+pBByGldO5uR8dxbPC+OuJXsPPNf+JZ81ADg=="],++ "fast-copy": ["[email protected]", "", {}, "sha512-CRzQaTFOFUs6PuhsAq7lk9Zqr995soJBcFNZlfJS/5keTSl1awREV9dZW4xS2nX4pWbhIIR0xp4h+J8PQxCkvg=="],++ "fast-safe-stringify": ["[email protected]", "", {}, "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="],++ "get-tsconfig": ["[email protected]", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA=="],++ "giget": ["[email protected]", "", { "bin": { "giget": "dist/cli.mjs" } }, "sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg=="],++ "help-me": ["[email protected]", "", {}, "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="],++ "hono": ["[email protected]", "", {}, "sha512-AOLOEhvrV+iH92xXCnFr/5+3KjPKcI3xP63XJtX5spAnkznPdHijlIsUTpi7/9EhWqrTCekw5c5zh1K+YsVw7A=="],++ "is-docker": ["[email protected]", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="],++ "is-in-ssh": ["[email protected]", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="],++ "is-inside-container": ["[email protected]", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="],++ "is-wsl": ["[email protected]", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw=="],++ "isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],++ "jiti": ["[email protected]", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="],++ "jose": ["[email protected]", "", {}, "sha512-qdF6ewcZARtef63fJ9AKKZPgxw+t7USH6HLXYcD4CrdmSvDp79rpJSPFEKc90QBeGS63u1KQtN2MZQHC0yDIzA=="],++ "joycon": ["[email protected]", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],++ "js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw=="],++ "livekit-client": ["[email protected]", "", { "dependencies": { "@livekit/mutex": "1.1.1", "@livekit/protocol": "1.52.1", "events": "^3.3.0", "jose": "^6.1.0", "loglevel": "^1.9.2", "machina": "^7.0.0", "sdp-transform": "^2.15.0", "tslib": "2.8.1", "typed-emitter": "^2.1.0", "webrtc-adapter": "9.0.6" }, "peerDependencies": { "@types/dom-mediacapture-record": "^1" } }, "sha512-j9Kg86nJjBjNFUD+ukp2jwMCGa0k+YD5gU//RzAM+ZY3pbG631QCte7fQjwqWMmtBzhDJL9nKYuOLMv/9IbAxg=="],++ "loglevel": ["[email protected]", "", {}, "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg=="],++ "machina": ["[email protected]", "", {}, "sha512-0Xkgs8NeBvO2hW6bjJT8ewLWrMfh1haMPstaghpASWjXkLjRhtDiaJG1Kb7mslaOHxZYxpH7PIjpmirRVYbMMA=="],++ "minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],++ "ohash": ["[email protected]", "", {}, "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw=="],++ "on-exit-leak-free": ["[email protected]", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="],++ "once": ["[email protected]", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],++ "open": ["[email protected]", "", { "dependencies": { "default-browser": "^5.4.0", "define-lazy-prop": "^3.0.0", "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", "powershell-utils": "^0.1.0", "wsl-utils": "^0.3.0" } }, "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw=="],++ "path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],++ "pathe": ["[email protected]", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],++ "perfect-debounce": ["[email protected]", "", {}, "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g=="],++ "pino": ["[email protected]", "", { "dependencies": { "@pinojs/redact": "^0.4.0", "atomic-sleep": "^1.0.0", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^4.0.1", "thread-stream": "^3.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w=="],++ "pino-abstract-transport": ["[email protected]", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw=="],++ "pino-pretty": ["[email protected]", "", { "dependencies": { "colorette": "^2.0.7", "dateformat": "^4.6.3", "fast-copy": "^4.0.0", "fast-safe-stringify": "^2.1.1", "help-me": "^5.0.0", "joycon": "^3.1.1", "minimist": "^1.2.6", "on-exit-leak-free": "^2.1.2", "pino-abstract-transport": "^3.0.0", "pump": "^3.0.3", "secure-json-parse": "^4.1.0", "sonic-boom": "^5.0.0", "strip-json-comments": "^5.0.3" }, "bin": { "pino-pretty": "bin.js" } }, "sha512-jjghD1ML+Di/WxjJDz6j6Y4FT7hIXOlb8h27AyJ+ohtAXJXH4PS/xkv7si+RCCIW59HMgZsMKTDgzdr0RhuRrg=="],++ "pino-std-serializers": ["[email protected]", "", {}, "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw=="],++ "pkg-types": ["[email protected]", "", { "dependencies": { "confbox": "^0.3.1", "exsolve": "^1.1.3", "pathe": "^2.0.3" } }, "sha512-07Fys7iVx0X6TcviMOgogM1Lk33ZyqOezMnU79S+kffWqwolG/5W9V8EgQSeYCIfFTYVgssRbnH630Oa2+soBA=="],++ "powershell-utils": ["[email protected]", "", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="],++ "process-warning": ["[email protected]", "", {}, "sha512-oCkNVj4OKnKEcocVBcDfiIugN1/cE6rgfT3nCtzeqZPA8+rIxMaQ0xXzIkGP8Gj2qUaP1UR7uhJ1VD8lUCpzCg=="],++ "pump": ["[email protected]", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],++ "quick-format-unescaped": ["[email protected]", "", {}, "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="],++ "rc9": ["[email protected]", "", { "dependencies": { "defu": "^6.1.7", "destr": "^2.0.5" } }, "sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q=="],++ "readdirp": ["[email protected]", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="],++ "real-require": ["[email protected]", "", {}, "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg=="],++ "resolve-pkg-maps": ["[email protected]", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="],++ "run-applescript": ["[email protected]", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="],++ "rxjs": ["[email protected]", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="],++ "safe-stable-stringify": ["[email protected]", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="],++ "sdp": ["[email protected]", "", {}, "sha512-xZocWwfyp4hkbN4hLWxMjmv2Q8aNa9MhmOZ7L9aCZPT+dZsgRr6wZRrSYE3HTdyk/2pZKPSgqI7ns7Een1xMSA=="],++ "sdp-transform": ["[email protected]", "", { "bin": { "sdp-verify": "checker.js" } }, "sha512-KrOH82c/W+GYQ0LHqtr3caRpM3ITglq3ljGUIb8LTki7ByacJZ9z+piSGiwZDsRyhQbYBOBJgr2k6X4BZXi3Kw=="],++ "secure-json-parse": ["[email protected]", "", {}, "sha512-lnd81MQEZKjhW/Gd2TQqdd4XP6QYNdDW/EP+I7nTrFHP9y2LmaGPIHk9xsnzcOiEr1c39c/e84xFgGviQKBTRw=="],++ "semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw=="],++ "shebang-command": ["[email protected]", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],++ "shebang-regex": ["[email protected]", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],++ "sonic-boom": ["[email protected]", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q=="],++ "split2": ["[email protected]", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="],++ "strip-json-comments": ["[email protected]", "", {}, "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw=="],++ "thread-stream": ["[email protected]", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-zLBvqpwr4Esa0kRjcrzGU6zL25lePWaCLMx0RQFrmteozIfeNdaMLpG5U7PeHzvlFkAWaRKA9/KVW4F60iB+qw=="],++ "ts-pattern": ["[email protected]", "", {}, "sha512-qAf+7M7Jjk7uebZeIo9uEzyintfuRtgHdzM9dqxRKcMi2dt76Ec+FH2wW3bnU9TuGLkZIJLoLs7cCQnU7Tu8ig=="],++ "tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],++ "typed-emitter": ["[email protected]", "", { "optionalDependencies": { "rxjs": "*" } }, "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA=="],++ "typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],++ "undici-types": ["[email protected]", "", {}, "sha512-GNCQH3MbVGB8OAVAoTiLH8pu4wx5Ni3DWKpnBzGj3WDsi8EwmK0aOVBooNEt+g5YL1eHPxcS9XUTouwFU6j1kQ=="],++ "uuid": ["[email protected]", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ=="],++ "webrtc-adapter": ["[email protected]", "", { "dependencies": { "sdp": "^3.2.0" } }, "sha512-CHbl2ZQbxx164IgWRgzJno4hWtM4tFbRam1QfI3Yxhs3w/DvqluVxVWeXs3oL5/fbGkSNLKo0Ty5MgUWceNhog=="],++ "which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],++ "wrappy": ["[email protected]", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],++ "wsl-utils": ["[email protected]", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.1.0" } }, "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg=="],++ "@hey-api/shared/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA=="],++ "@types/node/undici-types": ["[email protected]", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],++ "pino-pretty/pino-abstract-transport": ["[email protected]", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg=="],++ "pino-pretty/sonic-boom": ["[email protected]", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-/JEruzo6yhNVhsLblTRchgTQHIt7SsdJP0YyrfWaNKjIOQDfrdZv9gwYraYCAsmKV39/LAdV31FLL5NCDpoL/A=="],++ "pkg-types/confbox": ["[email protected]", "", {}, "sha512-ZUAKhKlkCOrIGKc8cj7zek9s9z1mveHif/25nUshI2BzCRzF7KH7KHa+Lnh2ubq+e1tIlaFuP763mzW4qVoehg=="],+ }+}diff --git a/packages/sdk-calls/package.json b/packages/sdk-calls/package.jsonindex af7d5cd374..1fee2c0c43 100644--- a/packages/sdk-calls/package.json+++ b/packages/sdk-calls/package.json@@ -1,6 +1,6 @@{"name": "@macro-inc/sdk-calls",- "version": "0.1.0",+ "version": "0.4.0","type": "module","description": "LiveKit room helpers for Macro calls","repository": {@@ -18,10 +18,11 @@"scripts": {"build": "tsc -p tsconfig.build.json","check": "tsc --noEmit",- "test": "bun test"+ "test": "bun test",+ "check:pack": "bun scripts/check-pack.ts"},"peerDependencies": {- "@macro-inc/sdk": "^0.3.0",+ "@macro-inc/sdk": "^0.4.0","@livekit/rtc-node": "^1.2.1","livekit-client": "^2.18.0"},@@ -33,7 +34,10 @@"@opentelemetry/api": "^1.9.1"},"devDependencies": {+ "@livekit/rtc-node": "^1.2.1",+ "@macro-inc/sdk": "file:../sdk","@types/bun": "^1.3.5",+ "livekit-client": "^2.18.0","typescript": "^5.9.2"}}diff --git a/packages/sdk-calls/scripts/check-pack.ts b/packages/sdk-calls/scripts/check-pack.tsnew file mode 100644index 0000000000..e007bd02ea--- /dev/null+++ b/packages/sdk-calls/scripts/check-pack.ts@@ -0,0 +1,55 @@+/**+ * Fails unless the tarball npm would publish holds every file `exports` names+ * and nothing that shouldn't ship, and that each export loads in Node. Run after+ * `bun run build`.+ */+const manifest = await Bun.file('package.json').json();++const packed = Bun.spawnSync([+ 'npm',+ 'pack',+ '--dry-run',+ '--ignore-scripts',+ '--json',+]);+if (packed.exitCode !== 0) throw new Error(packed.stderr.toString());++const [report] = JSON.parse(packed.stdout.toString());+const files = new Set<string>(+ report.files.map((file: { path: string }) => file.path)+);++const required = Object.values<{ types: string; import: string }>(+ manifest.exports+).flatMap((entry) => [entry.types, entry.import]);+for (const file of required) {+ if (!files.has(file.replace(/^\.\//, ''))) {+ throw new Error(`the package is missing ${file}`);+ }+}++const unexpected = [...files].filter(+ (file) =>+ !file.startsWith('dist/') &&+ !['package.json', 'README.md', 'LICENSE.txt'].includes(file)+);+if (unexpected.length > 0) {+ throw new Error(`the package would ship ${unexpected.join(', ')}`);+}++// A relative import without its extension compiles but fails in Node.+for (const entry of Object.values<{ import: string }>(manifest.exports)) {+ const load = Bun.spawnSync([+ 'node',+ '--input-type=module',+ '-e',+ `await import(${JSON.stringify(entry.import)})`,+ ]);+ if (load.exitCode !== 0) {+ throw new Error(`${entry.import} fails to load: ${load.stderr.toString()}`);+ }+}++console.log(+ `${report.name}@${report.version}: ${files.size} files, exports ok`+);diff --git a/packages/sdk-calls/src/browser.ts b/packages/sdk-calls/src/browser.tsindex cef7464aa5..1d76e90ceb 100644--- a/packages/sdk-calls/src/browser.ts+++ b/packages/sdk-calls/src/browser.ts@@ -4,10 +4,10 @@ import {callIdForRoom,connectRoomWith,type JoinOptions,-} from './common';-import { reportError, withSpan } from './telemetry';+} from './common.js';+import { reportError, withSpan } from './telemetry.js';-export type { CallConnection, CallTarget, JoinOptions } from './common';+export type { CallConnection, CallTarget, JoinOptions } from './common.js';export type ScreenShare = {stop(): Promise<void>;diff --git a/packages/sdk-calls/src/common.ts b/packages/sdk-calls/src/common.tsindex abf8ddf608..5158b20cab 100644--- a/packages/sdk-calls/src/common.ts+++ b/packages/sdk-calls/src/common.ts@@ -13,7 +13,7 @@ export type CallConnection = Omit<'call'> & { readonly call: { readonly id: string } };-import { reportError, startSpan, withSpan } from './telemetry';+import { reportError, startSpan, withSpan } from './telemetry.js';export type CallTarget =| { join(options?: JoinOptions): Promise<CallConnection> }diff --git a/packages/sdk-calls/src/node.ts b/packages/sdk-calls/src/node.tsindex afba33d2e6..694b230930 100644--- a/packages/sdk-calls/src/node.ts+++ b/packages/sdk-calls/src/node.ts@@ -14,10 +14,10 @@ import {callIdForRoom,connectRoomWith,type JoinOptions,-} from './common';-import { reportError, withSpan } from './telemetry';+} from './common.js';+import { reportError, withSpan } from './telemetry.js';-export type { CallConnection, CallTarget, JoinOptions } from './common';+export type { CallConnection, CallTarget, JoinOptions } from './common.js';export type ScreenFrame = {data: Uint8Array;diff --git a/packages/sdk-calls/tsconfig.json b/packages/sdk-calls/tsconfig.jsonindex b039ae4a5b..5db1fbab33 100644--- a/packages/sdk-calls/tsconfig.json+++ b/packages/sdk-calls/tsconfig.json@@ -9,7 +9,8 @@"isolatedModules": true,"skipLibCheck": true,"noEmit": true,- "forceConsistentCasingInFileNames": true+ "forceConsistentCasingInFileNames": true,+ "paths": { "@macro-inc/sdk": ["../sdk/dist/src/macro.d.ts"] }},"include": ["src/**/*.ts", "tests/**/*.ts"],"exclude": ["node_modules", "dist"]diff --git a/packages/sdk/AGENTS.md b/packages/sdk/AGENTS.mdindex 5bea50b6ac..0bab932b14 100644--- a/packages/sdk/AGENTS.md+++ b/packages/sdk/AGENTS.md@@ -67,7 +67,7 @@ enforced by the ordinary backend APIs.bot-management tools in its favour; `IssueBotCredential` stays, because itschat card mints a token the model never reads.- `services.ts`, `openapi-ts.config.ts`: generated service contract inputs.-- `../sdk-calls/`: optional Node and browser LiveKit room helpers for call handles.+- `../sdk-calls/`: optional Node and browser LiveKit room helpers for call handles. It publishes with this package at the same version; `just bump` moves both.- `src/entities/calls/`: live and recorded call handles; token-bearing `CallConnection` never serializes its token.## Boundariesdiff --git a/packages/sdk/RELEASING.md b/packages/sdk/RELEASING.mdindex 29bee1e62b..5167d74d7c 100644--- a/packages/sdk/RELEASING.md+++ b/packages/sdk/RELEASING.md@@ -1,16 +1,36 @@# Releasing the SDK-`@macro-inc/sdk` publishes to npm when a merge to `main` raises the `version` in-`packages/sdk/package.json`. There is no release PR, no dispatch, and no tag to+`@macro-inc/sdk` and `@macro-inc/sdk-calls` publish to npm when a merge to `main`+raises their `version`. There is no release PR, no dispatch, and no tag topush: bump the version in the same PR that changes the SDK, and merging itreleases. If the version is unchanged, the release workflow resolves to a no-op.-[Release SDK](../../.github/workflows/release-sdk.yml) validates the package,-runs `npm publish`, and only then pushes the `sdk-vX.Y.Z` tag, so a release tag-always names a commit that actually shipped.+[Release SDK](../../.github/workflows/release-sdk.yml) validates both packages,+runs `npm publish`, and only then pushes the `sdk-vX.Y.Z` and `sdk-calls-vX.Y.Z`+tags, so a release tag always names a commit that actually shipped.Agents can use [`release-sdk`](../../.agents/skills/release-sdk/SKILL.md).+## Versioning `@macro-inc/sdk-calls`++The two packages share one version, and `@macro-inc/sdk-calls` requires+`@macro-inc/sdk@^<that version>`. `just bump` moves all three fields together.+`Release SDK` and `tests/release.test.ts` refuse manifests that disagree.++Why lockstep rather than independent versions:++- **A stale peer range is the failure to prevent.** Before 1.0 a caret range covers+ only one minor, and `@macro-inc/[email protected]` has no calls API at all. A hand-kept+ range would need updating on every SDK minor, and forgetting it either breaks+ installs or lets them resolve to an SDK without the API.+- **It is a thin layer.** The package's contract is the SDK's `CallConnection`, so a+ release of one that the other didn't move costs nothing but an identical tarball.+- **Which versions work together needs no lookup.** They're the same number.++The cost is that an SDK bump publishes `@macro-inc/sdk-calls` even when it didn't+change. That's accepted. The first release is 0.4.0; `0.0.0-bootstrap.0` is an empty+placeholder that exists only so a trusted publisher could be registered.+## BumpFrom `packages/sdk`, on the branch carrying your SDK change:@@ -19,8 +39,8 @@ From `packages/sdk`, on the branch carrying your SDK change:just bump # patch; also accepts minor, major, or an explicit X.Y.Z```-The script refuses a version npm already has, and touches only the `version`-field. Commit it with the rest of your change — reviewers should see the API+The script refuses a version npm already has, and touches only the two `version`+fields and the peer range. Commit it with the rest of your change — reviewers should see the APIchange and the version it ships in one diff.Then run the same validation the release workflow runs:@@ -31,6 +51,16 @@ bun run check && bun test && bun run coverage && bun run buildnpm pack --dry-run --ignore-scripts```+Then, from `packages/sdk-calls` (it compiles against the SDK's build):++```sh+bun install --frozen-lockfile+bun run check && bun test && bun run build && bun run check:pack+```++`check:pack` fails if the tarball misses a file `exports` names, ships anything+else, or an export won't load in Node.+The compiled JavaScript and declaration files referenced by `exports` mustappear in the package listing. `coverage` checks endpoint wrappers, not testcoverage. `SDK Check` runs the same package suite on the PR and again on the@@ -44,19 +74,23 @@ follow-up PR with the bump.## What happens on merge-`Release SDK` runs on any push to `main` touching `packages/sdk/package.json`:+`Release SDK` runs on any push to `main` touching either package's `package.json`:-1. `bun scripts/resolve-release.ts` reads the manifest version and asks npm- about it. Already published → no-op. Below what npm serves → fails, since- that is an accidental downgrade. The policy lives in- [`scripts/release.ts`](scripts/release.ts), shared with `just bump` and+1. `bun scripts/resolve-release.ts` checks the two manifests agree, then reads each+ version and asks npm about it. Already published → no-op for that package. Below+ what npm serves → fails, since that is an accidental downgrade. The policy lives+ in [`scripts/release.ts`](scripts/release.ts), shared with `just bump` andunit-tested in [`tests/release.test.ts`](tests/release.test.ts); `semver`does the comparing.-2. `bun install --frozen-lockfile`, then `check`, `test`, `coverage`, `build`.-3. `npm publish --access public` over OIDC trusted publishing. A prerelease- version publishes under the `next` dist-tag so it never becomes what a plain- `npm install` resolves to.-4. Pushes the lightweight tag `sdk-vX.Y.Z` at the released commit.+2. `bun install --frozen-lockfile`, then `check`, `test`, `coverage`, `build` for the+ SDK, and the sdk-calls suite above. Both validate before either publishes.+3. `npm publish --access public` over OIDC trusted publishing, the SDK first because+ sdk-calls requires it. A prerelease version publishes under the `next` dist-tag+ so it never becomes what a plain `npm install` resolves to.+4. Pushes each lightweight tag right after its package publishes.++Each package resolves against npm on its own, so if the SDK published and sdk-calls+failed, re-running the job publishes only what's missing.Verify:@@ -65,6 +99,8 @@ gh run list --repo macro-inc/macro --workflow release-sdk.yml --branch main \--json databaseId,headSha,status,conclusion,urlnpm view "@macro-inc/sdk@<version>" version dist.tarball --json --registry=https://registry.npmjs.orgnpm view @macro-inc/sdk dist-tags --json --registry=https://registry.npmjs.org+npm view "@macro-inc/sdk-calls@<version>" version peerDependencies dist.tarball --json --registry=https://registry.npmjs.org+npm view @macro-inc/sdk-calls dist-tags --json --registry=https://registry.npmjs.org```A merged bump, a green job, or a pushed tag is not proof of publication; the npm@@ -74,7 +110,8 @@ bounded wait and report pending status rather than claiming success.## One-time npm setupPublication uses OIDC trusted publishing, so no npm token lives in GitHub-secrets. A package maintainer must register the publisher once, on npmjs.com:+secrets. A package maintainer must register the publisher once per package, on+npmjs.com (`@macro-inc/sdk` and `@macro-inc/sdk-calls`):| Setting | Value || --- | --- |@@ -92,25 +129,36 @@ yet been exercised. Do not interpret network or authentication errors as proofthat the package or version is available. npm documents the requirement in its[trusted publishing guide](https://docs.npmjs.com/trusted-publishers/).+A publisher can only be registered on a package that exists, and OIDC can't create+one. A new package name therefore needs one publish by a person with publish rights+on the `@macro-inc` org, from their own machine: an empty placeholder under a+non-`latest` tag, never real code.++```sh+npm publish --access public --tag bootstrap # a folder holding only package.json+```++Then register the publisher, and let `Release SDK` publish the first real version.+`packages/sdk/package.json` must keep repository metadata matching`https://github.com/macro-inc/macro`.## Recovery[Publish SDK](../../.github/workflows/publish-sdk.yml) remains as the manual-path, triggered by pushing an `sdk-v*` tag. Use it when a release commit is-already on `main` but the automatic run failed for a transient reason and left-the version unpublished:+path, triggered by pushing an `sdk-v*` or `sdk-calls-v*` tag. Use it when a release+commit is already on `main` but the automatic run failed for a transient reason and+left a version unpublished. Try re-running the failed `Release SDK` job first:```shgit fetch origin main --tags-git merge-base --is-ancestor "$sdk_release_sha" origin/main-git tag "sdk-v${sdk_version}" "$sdk_release_sha"-git push origin "refs/tags/sdk-v${sdk_version}"+git merge-base --is-ancestor "$release_sha" origin/main+git tag "sdk-v${version}" "$release_sha" # or "sdk-calls-v${version}"+git push origin "refs/tags/sdk-v${version}"```-It re-checks that the tag version matches the manifest and that the commit is on-`main`. Tags pushed by `Release SDK` use `GITHUB_TOKEN`, which does not start+It re-checks that the tag version matches that package's manifest and that the commit+is on `main`. Tags pushed by `Release SDK` use `GITHUB_TOKEN`, which does not startanother workflow run, so the two paths never double-publish.On failure, read the job logs and check npm before retrying: a run may havediff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 4d6d702f31..935eb563e5 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -1,6 +1,6 @@{"name": "@macro-inc/sdk",- "version": "0.3.0",+ "version": "0.4.0","repository": {"type": "git","url": "git+https://github.com/macro-inc/macro.git",diff --git a/packages/sdk/scripts/bump.ts b/packages/sdk/scripts/bump.tsindex affe1c1a8e..e9d1c83b75 100644--- a/packages/sdk/scripts/bump.ts+++ b/packages/sdk/scripts/bump.ts@@ -1,12 +1,14 @@/**- * Raise the `version` field in package.json. Merging that bump to `main` is- * what publishes the package — see RELEASING.md and the `Release SDK` workflow.+ * Raise the `version` of `@macro-inc/sdk` and `@macro-inc/sdk-calls`, and the+ * latter's peer range, together. Merging that bump to `main` is what publishes+ * the packages — see RELEASING.md and the `Release SDK` workflow.** Usage: `bun scripts/bump.ts patch|minor|major` or `bun scripts/bump.ts X.Y.Z`.*/import semver, { type ReleaseType } from 'semver';import {publishedVersions,+ readCallsManifest,readManifest,resolveRelease,writeVersion,@@ -27,6 +29,15 @@ if (target === null) {throw new Error(`cannot ${argument}-bump ${manifest.version}`);}+const calls = await readCallsManifest();+const callsResolution = resolveRelease(+ target,+ await publishedVersions(calls.name),+);+if (callsResolution.kind !== 'release') {+ throw new Error(`${calls.name}@${target} can't be released`);+}+const resolution = resolveRelease(target,await publishedVersions(manifest.name),@@ -40,7 +51,7 @@ if (resolution.kind === 'rejected') {await writeVersion(target);-console.log(`${manifest.version} -> ${target}`);+console.log(`${manifest.version} -> ${target} (with ${calls.name})`);if (resolution.distTag !== 'latest') {console.log(`prerelease: will publish under the '${resolution.distTag}' dist-tag.`,diff --git a/packages/sdk/scripts/release.ts b/packages/sdk/scripts/release.tsindex 47a3ebc501..1848646c7f 100644--- a/packages/sdk/scripts/release.ts+++ b/packages/sdk/scripts/release.ts@@ -10,31 +10,90 @@ import semver from 'semver';export const registry = 'https://registry.npmjs.org';-const manifestPath = path.resolve(import.meta.dir, '..', 'package.json');+const sdkManifestPath = path.resolve(import.meta.dir, '..', 'package.json');+const callsManifestPath = path.resolve(+ import.meta.dir,+ '../../sdk-calls/package.json',+);++export const sdkPackage = '@macro-inc/sdk';export interface Manifest {name: string;version: string;+ peerDependencies?: Record<string, string>;+}++async function readManifestAt(file: string): Promise<Manifest> {+ return JSON.parse(await Bun.file(file).text()) as Manifest;+}++export function readManifest(): Promise<Manifest> {+ return readManifestAt(sdkManifestPath);}-export async function readManifest(): Promise<Manifest> {- return JSON.parse(await Bun.file(manifestPath).text()) as Manifest;+export function readCallsManifest(): Promise<Manifest> {+ return readManifestAt(callsManifestPath);+}++/** The peer range `@macro-inc/sdk-calls` must declare for an SDK version. */+export function callsPeerRange(version: string): string {+ return `^${version}`;}/**- * Rewrite the single field rather than re-serializing the manifest: key order,- * formatting, and the trailing newline stay byte-identical.+ * Why the two manifests can't release together, if they can't. The packages+ * version in lockstep (see RELEASING.md), so a stale peer range can't send+ * installs to an SDK without the API `@macro-inc/sdk-calls` needs.*/-export async function writeVersion(version: string): Promise<void> {- const source = await Bun.file(manifestPath).text();+export function lockstepProblem(+ sdk: Manifest,+ calls: Manifest,+): string | undefined {+ if (sdk.version !== calls.version) {+ return `${calls.name} is at ${calls.version} but ${sdk.name} is at ${sdk.version}; run \`just bump\` in packages/sdk`;+ }+ const declared = calls.peerDependencies?.[sdkPackage];+ const expected = callsPeerRange(sdk.version);+ if (declared !== expected) {+ return `${calls.name} declares ${sdkPackage}@${declared} but must declare ${expected}`;+ }+ return undefined;+}++function replaceOnce(source: string, pattern: RegExp, value: string): string {const updated = source.replace(- /("version"\s*:\s*")[^"]+(")/,- (_match, open: string, close: string) => `${open}${version}${close}`,+ pattern,+ (_match, open: string, close: string) => `${open}${value}${close}`,);- if (updated === source) {- throw new Error('could not find the version field in package.json');+ if (!pattern.test(source)) {+ throw new Error(`could not find ${pattern} in package.json`);}- await Bun.write(manifestPath, updated);+ return updated;+}++/**+ * Rewrite the single fields rather than re-serializing the manifests: key+ * order, formatting, and the trailing newline stay byte-identical.+ */+export async function writeVersion(version: string): Promise<void> {+ const versionField = /("version"\s*:\s*")[^"]+(")/;+ await Bun.write(+ sdkManifestPath,+ replaceOnce(await Bun.file(sdkManifestPath).text(), versionField, version),+ );+ await Bun.write(+ callsManifestPath,+ replaceOnce(+ replaceOnce(+ await Bun.file(callsManifestPath).text(),+ versionField,+ version,+ ),+ /("@macro-inc\/sdk"\s*:\s*")[^"]+(")/,+ callsPeerRange(version),+ ),+ );}/** Every version the registry holds. Throws rather than guessing when offline. */@@ -65,6 +124,7 @@ export type Resolution =export function resolveRelease(version: string,published: readonly string[],+ tagPrefix = 'sdk',): Resolution {if (semver.valid(version) === null) {return {@@ -89,7 +149,7 @@ export function resolveRelease(return {kind: 'release',version,- tag: `sdk-v${version}`,+ tag: `${tagPrefix}-v${version}`,// A prerelease must not become what `npm install` resolves to.distTag: semver.prerelease(version) === null ? 'latest' : 'next',};diff --git a/packages/sdk/scripts/resolve-release.ts b/packages/sdk/scripts/resolve-release.tsindex f347bd147a..f373a8ce84 100644--- a/packages/sdk/scripts/resolve-release.ts+++ b/packages/sdk/scripts/resolve-release.ts@@ -1,8 +1,17 @@/*** Decide whether a push to `main` publishes, for the `Release SDK` workflow.- * Writes `release`, `version`, `tag`, and `dist_tag` to `$GITHUB_OUTPUT`.+ * Writes `release`, `version`, `tag`, and `dist_tag` for `@macro-inc/sdk`, and+ * the same names prefixed `calls_` for `@macro-inc/sdk-calls`, to `$GITHUB_OUTPUT`.*/-import { publishedVersions, readManifest, resolveRelease } from './release';+import { match } from 'ts-pattern';+import {+ lockstepProblem,+ publishedVersions,+ type Resolution,+ readCallsManifest,+ readManifest,+ resolveRelease,+} from './release';async function emit(outputs: Record<string, string>): Promise<void> {const file = process.env.GITHUB_OUTPUT;@@ -21,31 +30,52 @@ async function emit(outputs: Record<string, string>): Promise<void> {);}-const manifest = await readManifest();-const resolution = resolveRelease(- manifest.version,- await publishedVersions(manifest.name),+const sdk = await readManifest();+const calls = await readCallsManifest();++const problem = lockstepProblem(sdk, calls);+if (problem !== undefined) throw new Error(problem);++const sdkResolution = resolveRelease(+ sdk.version,+ await publishedVersions(sdk.name),+);+const callsResolution = resolveRelease(+ calls.version,+ await publishedVersions(calls.name),+ 'sdk-calls',);-switch (resolution.kind) {- case 'published':- console.log(- `${manifest.name}@${resolution.version} is already published; nothing to release.`,- );- await emit({ release: 'false', version: resolution.version });- break;- case 'rejected':- await emit({ release: 'false', version: resolution.version });- throw new Error(resolution.reason);- case 'release':- console.log(- `releasing ${manifest.name}@${resolution.version} as '${resolution.distTag}'`,- );- await emit({- release: 'true',- version: resolution.version,- tag: resolution.tag,- dist_tag: resolution.distTag,- });- break;+// Each package resolves on its own, so re-running after one published and the+// other failed publishes only what's missing.+function outputs(+ name: string,+ prefix: string,+ resolution: Resolution,+): Record<string, string> {+ return match(resolution)+ .with({ kind: 'published' }, ({ version }) => {+ console.log(+ `${name}@${version} is already published; nothing to release.`,+ );+ return { [`${prefix}release`]: 'false', [`${prefix}version`]: version };+ })+ .with({ kind: 'rejected' }, ({ reason }) => {+ throw new Error(`${name}: ${reason}`);+ })+ .with({ kind: 'release' }, ({ version, tag, distTag }) => {+ console.log(`releasing ${name}@${version} as '${distTag}'`);+ return {+ [`${prefix}release`]: 'true',+ [`${prefix}version`]: version,+ [`${prefix}tag`]: tag,+ [`${prefix}dist_tag`]: distTag,+ };+ })+ .exhaustive();}++await emit({+ ...outputs(sdk.name, '', sdkResolution),+ ...outputs(calls.name, 'calls_', callsResolution),+});diff --git a/packages/sdk/tests/release.test.ts b/packages/sdk/tests/release.test.tsindex 4413739086..3a4f2fff64 100644--- a/packages/sdk/tests/release.test.ts+++ b/packages/sdk/tests/release.test.ts@@ -1,5 +1,11 @@import { describe, expect, test } from 'bun:test';-import { resolveRelease } from '../scripts/release';+import {+ callsPeerRange,+ lockstepProblem,+ readCallsManifest,+ readManifest,+ resolveRelease,+} from '../scripts/release';const published = ['0.0.1', '0.0.2', '0.1.0'];@@ -46,3 +52,45 @@ describe('resolveRelease', () => {expect(resolveRelease('0.9.0', ['0.10.0']).kind).toBe('rejected');});});++describe('lockstep with @macro-inc/sdk-calls', () => {+ const sdk = { name: '@macro-inc/sdk', version: '0.4.0' };+ const calls = (version: string, peer: string) => ({+ name: '@macro-inc/sdk-calls',+ version,+ peerDependencies: { '@macro-inc/sdk': peer },+ });++ test('accepts matching versions and peer range', () => {+ expect(lockstepProblem(sdk, calls('0.4.0', '^0.4.0'))).toBeUndefined();+ });++ test('rejects a version that drifted', () => {+ expect(lockstepProblem(sdk, calls('0.3.0', '^0.4.0'))).toContain('0.3.0');+ });++ test('rejects a stale peer range', () => {+ expect(lockstepProblem(sdk, calls('0.4.0', '^0.3.0'))).toContain('^0.3.0');+ });++ test('tags each package under its own prefix', () => {+ expect(resolveRelease('0.4.0', [], 'sdk-calls')).toMatchObject({+ tag: 'sdk-calls-v0.4.0',+ });+ });++ test('a placeholder publish does not block the first real release', () => {+ expect(+ resolveRelease('0.4.0', ['0.0.0-bootstrap.0'], 'sdk-calls').kind,+ ).toBe('release');+ });++ test('the committed manifests agree', async () => {+ const sdkManifest = await readManifest();+ const callsManifest = await readCallsManifest();+ expect(lockstepProblem(sdkManifest, callsManifest)).toBeUndefined();+ expect(callsManifest.peerDependencies?.['@macro-inc/sdk']).toBe(+ callsPeerRange(sdkManifest.version),+ );+ });+});diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk.rsindex e62d3a5e3e..dda5899f21 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk.rs@@ -1,21 +1,28 @@//! `Publish SDK` — validates and publishes `@macro-inc/sdk` when an `sdk-v*` tag-//! is pushed. Generated into `publish-sdk.yml`.+//! is pushed, or `@macro-inc/sdk-calls` when an `sdk-calls-v*` tag is. Generated+//! into `publish-sdk.yml`.use gh_workflow::{Concurrency, Event, Expression, Job, Level, Permissions, Push, Run, Step, Use, Workflow,};-use crate::workflows::steps;+use crate::workflows::{sdk_check::CALLS_VALIDATION, steps};#[cfg(test)]mod test;const SDK_TAG_PATTERN: &str = "sdk-v*";+const CALLS_TAG_PATTERN: &str = "sdk-calls-v*";+const IS_CALLS: &str = "startsWith(github.ref_name, 'sdk-calls-v')";/// Build the workflow.pub fn publish_sdk() -> Workflow {Workflow::new("Publish SDK")- .on(Event::default().push(Push::default().add_tag(SDK_TAG_PATTERN)))+ .on(Event::default().push(+ Push::default()+ .add_tag(SDK_TAG_PATTERN)+ .add_tag(CALLS_TAG_PATTERN),+ )).concurrency(Concurrency::new(Expression::new("${{ github.workflow }}-${{ github.ref }}")).cancel_in_progress(false),@@ -25,7 +32,7 @@ pub fn publish_sdk() -> Workflow {fn publish() -> Job {Job::default()- .name("Publish @macro-inc/sdk")+ .name("Publish ${{ github.ref_name }}")// npm trusted publishing only supports GitHub-hosted runners..runs_on("ubuntu-latest").permissions(@@ -40,7 +47,10 @@ fn publish() -> Job {.add_step(verify_release()).add_step(install_dependencies()).add_step(validate())+ .add_step(install_calls_dependencies())+ .add_step(validate_calls()).add_step(publish_package())+ .add_step(publish_calls())}fn setup_node() -> Step<Use> {@@ -56,8 +66,17 @@ fn setup_npm() -> Step<Run> {fn verify_release() -> Step<Run> {Step::new("Verify release tag").run(indoc::indoc! {r#"- version="${GITHUB_REF_NAME#sdk-v}"- package_version="$(node -p "require('./packages/sdk/package.json').version")"+ case "$GITHUB_REF_NAME" in+ sdk-calls-v*)+ version="${GITHUB_REF_NAME#sdk-calls-v}"+ directory=packages/sdk-calls+ ;;+ *)+ version="${GITHUB_REF_NAME#sdk-v}"+ directory=packages/sdk+ ;;+ esac+ package_version="$(node -p "require('./$directory/package.json').version")"if [ "$version" != "$package_version" ]; thenecho "tag version $version does not match package version $package_version"@@ -83,8 +102,31 @@ fn validate() -> Step<Run> {.working_directory(xtask_paths::repo_dir!("packages/sdk"))}+/// Only for an `sdk-calls-v*` tag.+fn install_calls_dependencies() -> Step<Run> {+ Step::new("Install sdk-calls dependencies")+ .run("bun install --frozen-lockfile")+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+ .if_condition(Expression::new(IS_CALLS))+}++fn validate_calls() -> Step<Run> {+ Step::new("Validate sdk-calls")+ .run(CALLS_VALIDATION)+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+ .if_condition(Expression::new(IS_CALLS))+}+fn publish_package() -> Step<Run> {Step::new("Publish package").run("npm publish --access public").working_directory(xtask_paths::repo_dir!("packages/sdk"))+ .if_condition(Expression::new(format!("!{IS_CALLS}")))+}++fn publish_calls() -> Step<Run> {+ Step::new("Publish sdk-calls")+ .run("npm publish --access public")+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+ .if_condition(Expression::new(IS_CALLS))}diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk/test.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk/test.rsindex b007ace18d..3612ffc5f4 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk/test.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/publish_sdk/test.rs@@ -17,3 +17,12 @@ fn publishes_matching_tags_with_oidc_on_a_github_runner() {assert!(yaml.contains("tag version $version does not match package version $package_version"));assert!(yaml.contains("git merge-base --is-ancestor \"$GITHUB_SHA\" origin/main"));}++#[test]+fn recovers_either_package_from_its_own_tag() {+ let yaml = rendered_yaml();++ assert!(yaml.contains(CALLS_TAG_PATTERN));+ assert!(yaml.contains("Publish sdk-calls"));+ assert!(yaml.contains("Validate sdk-calls"));+}diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk.rsindex f48b39be8b..b84b293937 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk.rs@@ -1,5 +1,10 @@-//! `Release SDK` — publishes `@macro-inc/sdk` when a merge to `main` raises the-//! version in `packages/sdk/package.json`. Generated into `release-sdk.yml`.+//! `Release SDK` — publishes `@macro-inc/sdk` and `@macro-inc/sdk-calls` when a+//! merge to `main` raises their shared version. Generated into `release-sdk.yml`.+//!+//! Both packages validate before either publishes, and the SDK publishes first,+//! because `@macro-inc/sdk-calls` requires the matching SDK version. Each resolves+//! against npm on its own, so re-running after a partial release publishes only+//! what is missing.//!//! The version bump rides in the PR that changes the SDK, so `main` and npm//! never disagree and a release needs no second PR or bot commit (the `main`@@ -20,12 +25,15 @@ use gh_workflow::{Concurrency, Event, Expression, Job, Level, Permissions, Push, Run, Step, Use, Workflow,};-use crate::workflows::steps;+use crate::workflows::{sdk_check::CALLS_VALIDATION, steps};#[cfg(test)]mod test;-const PACKAGE_NAME: &str = "@macro-inc/sdk";+const SDK_RELEASE: &str = "steps.resolve.outputs.release == 'true'";+const CALLS_RELEASE: &str = "steps.resolve.outputs.calls_release == 'true'";+const ANY_RELEASE: &str =+ "steps.resolve.outputs.release == 'true' || steps.resolve.outputs.calls_release == 'true'";const REGISTRY: &str = "https://registry.npmjs.org";/// Build the workflow.@@ -35,6 +43,7 @@ pub fn release_sdk() -> Workflow {Push::default().add_branch("main").add_path(xtask_paths::repo_glob!("packages/sdk/package.json"))+ .add_path(xtask_paths::repo_glob!("packages/sdk-calls/package.json")).add_path(xtask_paths::repo_glob!(".github/workflows/release-sdk.yml")),)).concurrency(@@ -47,7 +56,7 @@ pub fn release_sdk() -> Workflow {fn release() -> Job {Job::default()- .name("Release @macro-inc/sdk")+ .name("Release @macro-inc/sdk and @macro-inc/sdk-calls")// npm trusted publishing only supports GitHub-hosted runners..runs_on("ubuntu-latest").permissions(@@ -62,17 +71,16 @@ fn release() -> Job {.add_step(setup_npm()).add_step(install_dependencies()).add_step(resolve_release())- .add_step(guard(validate()))- .add_step(guard(publish_package()))- .add_step(guard(tag_release()))+ .add_step(validate().if_condition(Expression::new(ANY_RELEASE)))+ .add_step(install_calls_dependencies().if_condition(Expression::new(ANY_RELEASE)))+ .add_step(validate_calls().if_condition(Expression::new(ANY_RELEASE)))+ .add_step(publish_package().if_condition(Expression::new(SDK_RELEASE)))+ .add_step(tag_release().if_condition(Expression::new(SDK_RELEASE)))+ .add_step(publish_calls().if_condition(Expression::new(CALLS_RELEASE)))+ .add_step(tag_calls_release().if_condition(Expression::new(CALLS_RELEASE))).add_step(summarize())}-/// Every step after the resolver runs only for an actual release.-fn guard(step: Step<Run>) -> Step<Run> {- step.if_condition(Expression::new("steps.resolve.outputs.release == 'true'"))-}-fn setup_node() -> Step<Use> {Step::new("Setup Node").uses("actions", "setup-node", "v4")@@ -106,6 +114,32 @@ fn validate() -> Step<Run> {.working_directory(xtask_paths::repo_dir!("packages/sdk"))}+fn install_calls_dependencies() -> Step<Run> {+ Step::new("Install sdk-calls dependencies")+ .run("bun install --frozen-lockfile")+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+}++fn validate_calls() -> Step<Run> {+ Step::new("Validate sdk-calls")+ .run(CALLS_VALIDATION)+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+}++fn publish_calls() -> Step<Run> {+ Step::new("Publish sdk-calls")+ .run("npm publish --access public --tag \"${{ steps.resolve.outputs.calls_dist_tag }}\"")+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+}++fn tag_calls_release() -> Step<Run> {+ Step::new("Tag the sdk-calls release").run(indoc::indoc! {r#"+ set -euo pipefail+ git tag "${{ steps.resolve.outputs.calls_tag }}" "$GITHUB_SHA"+ git push origin "refs/tags/${{ steps.resolve.outputs.calls_tag }}"+ "#})+}+fn publish_package() -> Step<Run> {Step::new("Publish package").run("npm publish --access public --tag \"${{ steps.resolve.outputs.dist_tag }}\"")@@ -125,18 +159,15 @@ fn tag_release() -> Step<Run> {fn summarize() -> Step<Run> {Step::new("Summarize").run(indoc::indoc! {r#"- case "${{ steps.resolve.outputs.release }}" in- true)- echo "Published PACKAGE_NAME@${{ steps.resolve.outputs.version }} (${{ steps.resolve.outputs.tag }})" >> "$GITHUB_STEP_SUMMARY"- ;;- false)- echo "No SDK release: packages/sdk version ${{ steps.resolve.outputs.version }} is already published." >> "$GITHUB_STEP_SUMMARY"- ;;- *)- echo "SDK release did not resolve; see the failed step above." >> "$GITHUB_STEP_SUMMARY"- ;;- esac- "#}- .replace("PACKAGE_NAME", PACKAGE_NAME))+ summarize() {+ case "$2" in+ true) echo "Published $1@$3 ($4)" >> "$GITHUB_STEP_SUMMARY" ;;+ false) echo "No release of $1: $3 is already published." >> "$GITHUB_STEP_SUMMARY" ;;+ *) echo "$1 did not resolve; see the failed step above." >> "$GITHUB_STEP_SUMMARY" ;;+ esac+ }+ summarize @macro-inc/sdk "${{ steps.resolve.outputs.release }}" "${{ steps.resolve.outputs.version }}" "${{ steps.resolve.outputs.tag }}"+ summarize @macro-inc/sdk-calls "${{ steps.resolve.outputs.calls_release }}" "${{ steps.resolve.outputs.calls_version }}" "${{ steps.resolve.outputs.calls_tag }}"+ "#}).if_condition(Expression::new("always()"))}diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk/test.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk/test.rsindex cf83dbad76..0947d98b36 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk/test.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/release_sdk/test.rs@@ -53,3 +53,26 @@ fn tags_only_after_a_successful_publish() {"the release tag must be pushed after npm publish");}++#[test]+fn validates_both_packages_before_either_publishes() {+ let yaml = rendered_yaml();++ let validate_calls = yaml+ .find("Validate sdk-calls")+ .expect("sdk-calls validation");+ let publish_sdk = yaml.find("Publish package").expect("SDK publish");+ assert!(validate_calls < publish_sdk);+}++/// `@macro-inc/sdk-calls` requires the matching SDK version.+#[test]+fn publishes_the_sdk_first() {+ let yaml = rendered_yaml();++ let publish_sdk = yaml.find("Publish package").expect("SDK publish");+ let publish_calls = yaml.find("Publish sdk-calls").expect("sdk-calls publish");+ assert!(publish_sdk < publish_calls);+ assert!(yaml.contains("packages/sdk-calls/package.json"));+ assert!(yaml.contains("steps.resolve.outputs.calls_tag"));+}diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check.rsindex 85fbb3eb56..383d5ab36b 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check.rs@@ -6,9 +6,14 @@ use crate::workflows::{steps, vars};#[cfg(test)]mod test;+/// Validates `@macro-inc/sdk-calls`; shared with its release workflows.+pub const CALLS_VALIDATION: &str =+ "bun run check && bun test && bun run build && bun run check:pack";+/// Files whose change makes `PR CI` call this workflow, and that runs it on `main`.pub const PATHS: &[RepoGlob<'static>] = &[xtask_paths::repo_glob!("packages/sdk/**"),+ xtask_paths::repo_glob!("packages/sdk-calls/**"),xtask_paths::repo_glob!(".github/workflows/sdk-check.yml"),];@@ -32,7 +37,7 @@ pub fn sdk_check() -> Workflow {.add_job("check-package", check_package())}-/// Typecheck, test, and coverage-check the package as committed. Needs nothing+/// Typecheck, test, and coverage-check the packages as committed. Needs nothing/// but Bun, so it stays a cheap gate that can run on every SDK change.fn check_package() -> Job {Job::default()@@ -44,6 +49,29 @@ fn check_package() -> Job {.add_step(typecheck()).add_step(run_tests()).add_step(check_coverage())+ .add_step(build_sdk())+ .add_step(install_calls_dependencies())+ .add_step(check_calls())+}++/// `@macro-inc/sdk-calls` compiles against the SDK's built declarations.+fn build_sdk() -> Step<Run> {+ Step::new("Build SDK")+ .run("bun run build")+ .working_directory(xtask_paths::repo_dir!("packages/sdk"))+}++fn install_calls_dependencies() -> Step<Run> {+ Step::new("Install sdk-calls dependencies")+ .run("bun install --frozen-lockfile")+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))+}++/// The same suite the release validates, including what the tarball would hold.+fn check_calls() -> Step<Run> {+ Step::new("Check sdk-calls")+ .run(CALLS_VALIDATION)+ .working_directory(xtask_paths::repo_dir!("packages/sdk-calls"))}fn install_dependencies() -> Step<Run> {diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check/test.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check/test.rsindex f0e74f8cf1..75c3198efe 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check/test.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/sdk_check/test.rs@@ -28,3 +28,14 @@ fn the_package_job_needs_no_rust_toolchain() {"Rust changes reach the SDK through the web app's Generated Code Check: {yaml}");}++#[test]+fn checks_sdk_calls_after_building_the_sdk() {+ let yaml = rendered_yaml();++ assert!(yaml.contains("packages/sdk-calls/**"));+ let build = yaml.find("Build SDK").expect("SDK build");+ let check = yaml.find("Check sdk-calls").expect("sdk-calls check");+ assert!(build < check);+ assert!(yaml.contains("check:pack"));+}