GeezerVison is showing github.com — feat(http-recorder): prepare public beta release (#31018) · Archipel/opencode@54f4974
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +5Lines changed: 5 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +--- | | 2 | +"@opencode-ai/http-recorder": minor | | 3 | +--- | | 4 | + | | 5 | +Publish the initial beta of the Effect HTTP and WebSocket record/replay library. |
Collapse file Copy file name to clipboard +11Lines changed: 11 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +{ | | 2 | + | | 3 | + "changelog": "@changesets/cli/changelog", | | 4 | + "commit": false, | | 5 | + "fixed": [], | | 6 | + "linked": [], | | 7 | + "access": "public", | | 8 | + "baseBranch": "dev", | | 9 | + "updateInternalDependencies": "patch", | | 10 | + "ignore": [] | | 11 | +} |
Collapse file Copy file name to clipboard +53Lines changed: 53 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +name: http-recorder release | | 2 | + | | 3 | +on: | | 4 | + push: | | 5 | + branches: | | 6 | + - dev | | 7 | + paths: | | 8 | + - ".changeset/**" | | 9 | + - "packages/http-recorder/**" | | 10 | + - ".github/workflows/http-recorder-release.yml" | | 11 | + | | 12 | +concurrency: http-recorder-release | | 13 | + | | 14 | +permissions: | | 15 | + contents: write | | 16 | + id-token: write | | 17 | + pull-requests: write | | 18 | + | | 19 | +jobs: | | 20 | + release: | | 21 | + if: github.repository == 'anomalyco/opencode' | | 22 | + runs-on: ubuntu-latest | | 23 | + steps: | | 24 | + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | | 25 | + with: | | 26 | + fetch-depth: 0 | | 27 | + | | 28 | + - uses: ./.github/actions/setup-bun | | 29 | + | | 30 | + - name: Setup git committer | | 31 | + id: committer | | 32 | + uses: ./.github/actions/setup-git-committer | | 33 | + with: | | 34 | + opencode-app-id: ${{ vars.OPENCODE_APP_ID }} | | 35 | + opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} | | 36 | + | | 37 | + - name: Verify package | | 38 | + run: | | | 39 | + bun run --cwd packages/http-recorder build | | 40 | + bun run --cwd packages/http-recorder test | | 41 | + bun run --cwd packages/http-recorder typecheck | | 42 | + bun run --cwd packages/http-recorder verify:package | | 43 | +
| | 44 | + - name: Version or publish beta | | 45 | + uses: changesets/action@3841a0683d3cfa6dae0f9bb335290003010fe3f0 # v1.9.0 | | 46 | + with: | | 47 | + version: bun run version:http-recorder | | 48 | + publish: bun run release:http-recorder | | 49 | + commit: "chore(http-recorder): release beta" | | 50 | + title: "chore(http-recorder): release beta" | | 51 | + env: | | 52 | + GITHUB_TOKEN: ${{ steps.committer.outputs.token }} | | 53 | + NPM_CONFIG_PROVENANCE: true |
Collapse file Copy file name to clipboardExpand all lines: bun.lock +181-16Lines changed: 181 additions & 16 deletions Collapse file Copy file name to clipboardExpand all lines: package.json +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | "dev:stats": "bun sst shell --stage=production -- bun run --cwd packages/stats/app dev", | 14 | 14 | "dev:storybook": "bun --cwd packages/storybook storybook", | 15 | 15 | "lint": "oxlint", | | 16 | + "changeset": "changeset", | | 17 | + "version:http-recorder": "changeset version", | | 18 | + "release:http-recorder": "bun ./packages/http-recorder/script/publish.ts", | 16 | 19 | "typecheck": "bun turbo typecheck", | 17 | 20 | "upgrade-opentui": "bun run script/upgrade-opentui.ts", | 18 | 21 | "postinstall": "bun run --cwd packages/core fix-node-pty", | | 93 | 96 | }, | 94 | 97 | "devDependencies": { | 95 | 98 | "@actions/artifact": "5.0.1", | | 99 | + "@changesets/cli": "2.31.0", | 96 | 100 | "@tsconfig/bun": "catalog:", | 97 | 101 | "@types/mime-types": "3.0.1", | 98 | 102 | "@typescript/native-preview": "catalog:", | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/test/session-runner-recorded.test.ts +10-5Lines changed: 10 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -import { NodeFileSystem } from "@effect/platform-node" | 2 | 1 | import { HttpRecorder } from "@opencode-ai/http-recorder" | | 2 | +import { HttpRecorderInternal } from "@opencode-ai/http-recorder/internal" | 3 | 3 | import * as OpenAIChat from "@opencode-ai/llm/protocols/openai-chat" | 4 | 4 | import { Auth, LLMClient, RequestExecutor } from "@opencode-ai/llm/route" | 5 | 5 | import { Database } from "@opencode-ai/core/database/database" | @@ -35,10 +35,15 @@ const database = Database.layerFromPath(":memory:") | 35 | 35 | const events = EventV2.layer.pipe(Layer.provide(database)) | 36 | 36 | const projector = SessionProjector.layer.pipe(Layer.provide(events), Layer.provide(database)) | 37 | 37 | const store = SessionStore.layer.pipe(Layer.provide(database)) | 38 | | -const cassette = HttpRecorder.cassetteLayer("session-runner/openai-chat-streams-text", { | 39 | | - directory: path.resolve(import.meta.dir, "fixtures/recordings"), | 40 | | - mode: process.env.RECORD === "true" ? "record" : "replay", | 41 | | -}).pipe(Layer.provide(NodeFileSystem.layer)) | | 38 | +const cassette = | | 39 | + process.env.RECORD === "true" | | 40 | + ? HttpRecorderInternal.cassetteLayer("session-runner/openai-chat-streams-text", { | | 41 | + directory: path.resolve(import.meta.dir, "fixtures/recordings"), | | 42 | + mode: "record", | | 43 | + }) | | 44 | + : HttpRecorder.http("session-runner/openai-chat-streams-text", { | | 45 | + directory: path.resolve(import.meta.dir, "fixtures/recordings"), | | 46 | + }) | 42 | 47 | const executor = RequestExecutor.layer.pipe(Layer.provide(cassette)) | 43 | 48 | const client = LLMClient.layer.pipe(Layer.provide(executor)) | 44 | 49 | const permission = Layer.succeed( | |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +MIT License | | 2 | + | | 3 | +Copyright (c) 2025 opencode | | 4 | + | | 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | | 6 | +of this software and associated documentation files (the "Software"), to deal | | 7 | +in the Software without restriction, including without limitation the rights | | 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | | 9 | +copies of the Software, and to permit persons to whom the Software is | | 10 | +furnished to do so, subject to the following conditions: | | 11 | + | | 12 | +The above copyright notice and this permission notice shall be included in all | | 13 | +copies or substantial portions of the Software. | | 14 | + | | 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | | 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | | 21 | +SOFTWARE. |
|