diff --git a/.github/workflows/forge-tools.yml b/.github/workflows/forge-tools.yml index 53a401e0..381be17f 100644 --- a/.github/workflows/forge-tools.yml +++ b/.github/workflows/forge-tools.yml @@ -2,7 +2,7 @@ name: Forge tools # Every six hours, regenerates src/generated/forge-mcp from the latest # openapi.forge.json Forge release with the @cloudflare/forge package that -# package.json pins, a pkg.pr.new build of a forge commit. +# package.json pins, a published npm release. # Its source.json pins the release the whole deployment serves: the forge # tools, and the spec artifacts in src/generated/spec that the forge tools # service serves to Code Mode and the endpoint tools. When the @@ -36,12 +36,12 @@ jobs: steps: - uses: actions/checkout@v6 - # The forge commit whose @cloudflare/forge build package.json pins, for the pull request. + # The @cloudflare/forge version package.json pins, for the pull request. - name: Read the forge pin id: forge run: | - pin="$(jq -r '.devDependencies["@cloudflare/forge"]' package.json)" - echo "ref=${pin##*@}" >> "$GITHUB_OUTPUT" + version="$(jq -r '.devDependencies["@cloudflare/forge"]' package.json)" + echo "version=$version" >> "$GITHUB_OUTPUT" - uses: actions/setup-node@v6 with: @@ -75,7 +75,7 @@ jobs: if: steps.changes.outputs.changed == 'true' env: GH_TOKEN: ${{ github.token }} - FORGE_REF: ${{ steps.forge.outputs.ref }} + FORGE_VERSION: ${{ steps.forge.outputs.version }} run: | git config user.name 'github-actions[bot]' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' @@ -84,7 +84,7 @@ jobs: git commit -q -m "$TITLE" git push -q --force origin "$BRANCH" { - echo "Pins the latest \`openapi.forge.json\` and regenerates the forge MCP tools with forge \`${FORGE_REF:0:12}\`. Merging deploys the new tools to \`/mcp?codemode=false\`, and within ten minutes Code Mode serves this spec too." + echo "Pins the latest \`openapi.forge.json\` and regenerates the forge MCP tools with forge \`$FORGE_VERSION\`. Merging deploys the new tools to \`/mcp?codemode=false\`, and within ten minutes Code Mode serves this spec too." echo cat "$RUNNER_TEMP/summary.md" } > "$RUNNER_TEMP/body.md" diff --git a/package-lock.json b/package-lock.json index 23d3f9d7..8d34fdc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "zod": "^4.6.6" }, "devDependencies": { - "@cloudflare/forge": "https://pkg.pr.new/cloudflare/forge/@cloudflare/forge@f6720c19250f90fe5b395ef2c38d488aaba31641", + "@cloudflare/forge": "0.2.0", "@cloudflare/vitest-plugin": "^1.4.9", "@modelcontextprotocol/client": "2.3.1", "@types/node": "^25.0.6", @@ -39,9 +39,10 @@ }, "node_modules/@cloudflare/forge": { "version": "0.2.0", - "resolved": "https://pkg.pr.new/cloudflare/forge/@cloudflare/forge@f6720c19250f90fe5b395ef2c38d488aaba31641", - "integrity": "sha512-DRWa94/RgUCxRnNP9rTpxsxq/Q4gzO3ZMu2vQLtdYXbiMXmipK1gDcQcPYVzN0UIgXlUiGOnDbDV6jVlZLS7NQ==", + "resolved": "https://registry.npmjs.org/@cloudflare/forge/-/forge-0.2.0.tgz", + "integrity": "sha512-EN8NAKt82nvdomOVoGJzYTpWglyWBC2IAdb1/jlYdPLjgQ4Lwsm+q/zXyL1Vj2t4uQBtmsYgRPjNmVVBvKYxLg==", "dev": true, + "license": "Apache-2.0", "bin": { "forge": "bin/forge.cjs", "forge-plugin": "bin/forge-plugin.mjs" @@ -49,6 +50,14 @@ "engines": { "node": ">=18" }, + "optionalDependencies": { + "@cloudflare/forge-darwin-arm64": "0.2.0", + "@cloudflare/forge-darwin-x64": "0.2.0", + "@cloudflare/forge-linux-arm64": "0.2.0", + "@cloudflare/forge-linux-x64": "0.2.0", + "@cloudflare/forge-win32-arm64": "0.2.0", + "@cloudflare/forge-win32-x64": "0.2.0" + }, "peerDependencies": { "@bytecodealliance/jco": "^1.37.0" }, @@ -58,6 +67,90 @@ } } }, + "node_modules/@cloudflare/forge-darwin-arm64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-darwin-arm64/-/forge-darwin-arm64-0.2.0.tgz", + "integrity": "sha512-y9HpyHYUXwQ8rQm+eZ06bY2LtJ3gxO3CwHtcTqaIg8tRMddAFDreIWxnfoP5Ncz7xaaaWHagnxfYl/H1nbavUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cloudflare/forge-darwin-x64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-darwin-x64/-/forge-darwin-x64-0.2.0.tgz", + "integrity": "sha512-+ueT98BcAlM9HRf4yQUWPxLnhvDMCdXlBE30SUmfUqo0Nq3qxDdWHSE6S8pe2RK9WwDLeghbo/8dbbVLzXSQ+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cloudflare/forge-linux-arm64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-linux-arm64/-/forge-linux-arm64-0.2.0.tgz", + "integrity": "sha512-MWoacSBfmzJWgHd5o/3Vy1vddKA51TKfF3EBwFcvzkDYPlCAyDUP/LVI1mP9tL81DyCqNxUe/tjMv/iekMpLjQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cloudflare/forge-linux-x64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-linux-x64/-/forge-linux-x64-0.2.0.tgz", + "integrity": "sha512-DsC6ymbeWFqYnLkivm/u0KAcUZ2yjd10aLL679MY/zlUXEFllgTnjRmA3vsrSnMwPDlZxm84LTO8ffKEGGR88Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cloudflare/forge-win32-arm64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-win32-arm64/-/forge-win32-arm64-0.2.0.tgz", + "integrity": "sha512-dKu8+hc7ZSgYxI/SxgtgH4ojXOeTnPCRkd9mVCfeS7G6OvNIBt0I8kmAXny48JJouJmkfalbkMEAeVYXEhbX+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@cloudflare/forge-win32-x64": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/forge-win32-x64/-/forge-win32-x64-0.2.0.tgz", + "integrity": "sha512-lpzGHcFLJDYny1hj3Ke/m6VVqP1vIJw4VnOcpdvTSpCo/M3P+P2VKFFrssxKAKf4q6y7IZrssGi5uoztB/70/g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@cloudflare/kv-asset-handler": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.0.tgz", diff --git a/package.json b/package.json index d0f2a322..d659eab1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "zod": "^4.6.6" }, "devDependencies": { - "@cloudflare/forge": "https://pkg.pr.new/cloudflare/forge/@cloudflare/forge@f6720c19250f90fe5b395ef2c38d488aaba31641", + "@cloudflare/forge": "0.2.0", "@cloudflare/vitest-plugin": "^1.4.9", "@modelcontextprotocol/client": "2.3.1", "@types/node": "^25.0.6", diff --git a/scripts/generate-tools.ts b/scripts/generate-tools.ts index 742f71bb..7d0c77ea 100644 --- a/scripts/generate-tools.ts +++ b/scripts/generate-tools.ts @@ -5,8 +5,8 @@ * npm run generate:tools [-- --spec openapi.forge.json --release ] [-- --summary summary.md] * * The forge that generates them is the `@cloudflare/forge` package in - * `package.json`, a pkg.pr.new build of a forge commit; bumping that pin picks - * up generator changes. `.github/workflows/forge-tools.yml` runs this every six + * `package.json`, a published npm release; bumping that pin picks up + * generator changes. `.github/workflows/forge-tools.yml` runs this every six * hours and opens a pull request when the generated code changes. Without `--spec`, the latest `openapi.forge.json` * Forge release is downloaded. `source.json` records the release, so a * response that breaks a generated response schema names the spec it came