From 445263f02d32994adea1e27685a428ce8f4f710e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 06:13:18 +0000 Subject: [PATCH 1/6] Initial plan From e6a64d629133f59342be4e9067d9acdab2ed827d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 07:11:39 +0000 Subject: [PATCH 2/6] feat: add plugin.json manifest for strict gRPC contract validation Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/54418473-7078-4656-a1d5-b478ad9d041f Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- plugin.json | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 plugin.json diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..0e65878 --- /dev/null +++ b/plugin.json @@ -0,0 +1,72 @@ +{ + "name": "workflow-plugin-websocket", + "version": "0.5.4", + "author": "GoCodeAlone", + "description": "General-purpose WebSocket support for workflow applications", + "type": "external", + "tier": "community", + "license": "MIT", + "repository": "https://github.com/GoCodeAlone/workflow-plugin-websocket", + "homepage": "https://github.com/GoCodeAlone/workflow-plugin-websocket", + "minEngineVersion": "0.3.56", + "keywords": ["websocket", "ws", "realtime", "streaming"], + "capabilities": { + "moduleTypes": ["ws.server"], + "stepTypes": ["step.ws_send", "step.ws_close"], + "triggerTypes": ["websocket"] + }, + "stepSchemas": [ + { + "type": "step.ws_send", + "plugin": "workflow-plugin-websocket", + "description": "Send a text message to a WebSocket connection by connection ID.", + "configFields": [ + { + "key": "connectionId", + "label": "Connection ID", + "type": "string", + "description": "The unique identifier of the WebSocket connection to send the message to.", + "required": true, + "placeholder": "{{ .connectionId }}" + }, + { + "key": "message", + "label": "Message", + "type": "string", + "description": "The text message to send to the WebSocket connection.", + "required": true, + "placeholder": "Hello, world!" + } + ], + "outputs": [ + { + "key": "sent", + "type": "boolean", + "description": "Whether the message was successfully sent to the connection." + } + ] + }, + { + "type": "step.ws_close", + "plugin": "workflow-plugin-websocket", + "description": "Close a WebSocket connection by connection ID.", + "configFields": [ + { + "key": "connectionId", + "label": "Connection ID", + "type": "string", + "description": "The unique identifier of the WebSocket connection to close.", + "required": true, + "placeholder": "{{ .connectionId }}" + } + ], + "outputs": [ + { + "key": "closed", + "type": "boolean", + "description": "Whether the connection was found and closed." + } + ] + } + ] +} From be03497f5cd7e35329394a18775925191fa2a12f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 08:05:18 +0000 Subject: [PATCH 3/6] ci: add strict-contracts job to validate plugin.json on every PR Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/6a6358da-8e80-458f-986e-12e619403044 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bfcc2b..d022311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,3 +18,17 @@ jobs: run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - run: go test -race ./... - run: go vet ./... + + strict-contracts: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.26' + - name: Configure Git for private repos + run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" + - name: Validate strict plugin contracts + run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json From 18a7ed767ad353852dff3350e66ba3c6892b4e70 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 13:34:33 +0000 Subject: [PATCH 4/6] ci: use go-version-file and add --strict-contracts flag to wfctl validation Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/dbd4d82c-0194-4c77-89a6-de5b954059d1 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d022311..32286bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.26' + go-version-file: go.mod - name: Configure Git for private repos run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - name: Validate strict plugin contracts - run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json + run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json --strict-contracts From 284a9065af2cab6fa66f3aa996c72d6b336f46c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 13:55:24 +0000 Subject: [PATCH 5/6] fix: add error output to step schemas and harden CI for fork PRs Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/15434d8d-a430-4a86-bc42-0a7c00fdc4c2 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- .github/workflows/ci.yml | 4 +++- plugin.json | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32286bc..070c610 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.26' + go-version-file: go.mod - name: Configure Git for private repos + if: ${{ secrets.RELEASES_TOKEN != '' }} run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - run: go test -race ./... - run: go vet ./... @@ -29,6 +30,7 @@ jobs: with: go-version-file: go.mod - name: Configure Git for private repos + if: ${{ secrets.RELEASES_TOKEN != '' }} run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - name: Validate strict plugin contracts run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json --strict-contracts diff --git a/plugin.json b/plugin.json index 0e65878..f22a3c3 100644 --- a/plugin.json +++ b/plugin.json @@ -43,6 +43,12 @@ "key": "sent", "type": "boolean", "description": "Whether the message was successfully sent to the connection." + }, + { + "key": "error", + "type": "string", + "description": "Error message when the send failed (e.g. ws.server not initialized, missing connectionId).", + "optional": true } ] }, @@ -65,6 +71,12 @@ "key": "closed", "type": "boolean", "description": "Whether the connection was found and closed." + }, + { + "key": "error", + "type": "string", + "description": "Error message when the close failed (e.g. ws.server not initialized).", + "optional": true } ] } From 1129bf9e75eb1392e3b9aee70221b2e3a8110232 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 05:07:29 +0000 Subject: [PATCH 6/6] ci: upgrade action versions to v6, add permissions to test job, derive wfctl version from go.mod Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/f5e44b3b-5f6c-44f1-8056-85fb8e28dc21 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- .github/workflows/ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 070c610..bb014b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,11 @@ env: jobs: test: runs-on: ubuntu-latest + permissions: + contents: read steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version-file: go.mod - name: Configure Git for private repos @@ -25,12 +27,14 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version-file: go.mod - name: Configure Git for private repos if: ${{ secrets.RELEASES_TOKEN != '' }} run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - name: Validate strict plugin contracts - run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json --strict-contracts + run: | + WFCTL_VERSION=$(go list -m -f '{{.Version}}' github.com/GoCodeAlone/workflow) + go run github.com/GoCodeAlone/workflow/cmd/wfctl@${WFCTL_VERSION} plugin validate --file plugin.json --strict-contracts