From 4f9e5b79ade4f7e62ed7f6712ffd08668d7c1fd6 Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 23 Aug 2026 05:57:15 +0000 Subject: [PATCH 1/2] feat: integrate TinyGo for WASM builds and update plugin-sdk-go dependency to v0.3.3 --- .github/workflows/backend-pr-ci.yml | 8 +++++++- .github/workflows/release.yml | 8 +++++++- README.md | 4 ++-- backend/go.mod | 2 +- backend/go.sum | 4 ++-- mcp/bun.lock | 4 ++-- mcp/package.json | 2 +- mcp/src/index.ts | 29 +++++++++++++++++++++++++++++ plugin.json | 7 ++++--- 9 files changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/backend-pr-ci.yml b/.github/workflows/backend-pr-ci.yml index 64f18b9..b01c023 100644 --- a/.github/workflows/backend-pr-ci.yml +++ b/.github/workflows/backend-pr-ci.yml @@ -66,8 +66,14 @@ jobs: go-version: ${{ env.GO_VERSION }} cache-dependency-path: backend/go.sum + - name: Setup TinyGo + run: | + set -euo pipefail + curl -sL -o /tmp/tinygo.deb https://github.com/tinygo-org/tinygo/releases/download/v0.41.1/tinygo_0.41.1_amd64.deb + sudo dpkg -i /tmp/tinygo.deb + - name: Build WASM - run: GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o checklist.wasm . + run: tinygo build -target=wasip1 -buildmode=c-shared -o checklist.wasm . test: name: Tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dee916b..9a631a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,12 @@ jobs: with: go-version: "1.24" + - name: Setup TinyGo + run: | + set -euo pipefail + curl -sL -o /tmp/tinygo.deb https://github.com/tinygo-org/tinygo/releases/download/v0.41.1/tinygo_0.41.1_amd64.deb + sudo dpkg -i /tmp/tinygo.deb + - name: Setup Bun uses: oven-sh/setup-bun@v2 with: @@ -32,7 +38,7 @@ jobs: run: | set -euo pipefail mkdir -p ../release/backend - GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ../release/backend/checklist.wasm . + tinygo build -target=wasip1 -buildmode=c-shared -o ../release/backend/checklist.wasm . - name: Build frontend working-directory: frontend diff --git a/README.md b/README.md index e7ee9d1..bf3e064 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,8 @@ cd backend # Run tests go test -v ./... -# Build WASM binary (requires Go 1.24+) -GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o checklist.wasm . +# Build WASM binary (requires TinyGo — see https://tinygo.org/getting-started/install/) +tinygo build -target=wasip1 -buildmode=c-shared -o checklist.wasm . ``` ### Frontend diff --git a/backend/go.mod b/backend/go.mod index 0900e3a..2937a1a 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module github.com/Paca-AI/first-party/checklist go 1.24 -require github.com/Paca-AI/plugin-sdk-go v0.2.0 +require github.com/Paca-AI/plugin-sdk-go v0.3.3 diff --git a/backend/go.sum b/backend/go.sum index 8389b8f..970bd41 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -1,2 +1,2 @@ -github.com/Paca-AI/plugin-sdk-go v0.2.0 h1:Fur6p+OQoC5imq7qmvaQtJnZ3SRVRskx8KcT/rqFHj4= -github.com/Paca-AI/plugin-sdk-go v0.2.0/go.mod h1:5WeC6cSEf2wM1ovICZbDaVky9oi5id/Qpdfc5LDAQnw= +github.com/Paca-AI/plugin-sdk-go v0.3.3 h1:nW2DwJatraYfxo4MpwNkfQEp+9jmj7QHaU16bOXzBpM= +github.com/Paca-AI/plugin-sdk-go v0.3.3/go.mod h1:5WeC6cSEf2wM1ovICZbDaVky9oi5id/Qpdfc5LDAQnw= diff --git a/mcp/bun.lock b/mcp/bun.lock index 0094e4f..aaf6921 100644 --- a/mcp/bun.lock +++ b/mcp/bun.lock @@ -5,7 +5,7 @@ "": { "name": "@paca-ai/checklist-plugin-mcp", "dependencies": { - "@paca-ai/plugin-sdk-mcp": "^0.1.0", + "@paca-ai/plugin-sdk-mcp": "^0.2.0", }, "devDependencies": { "typescript": "^5.8.3", @@ -70,7 +70,7 @@ "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.29.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ=="], - "@paca-ai/plugin-sdk-mcp": ["@paca-ai/plugin-sdk-mcp@0.1.0", "", { "peerDependencies": { "@modelcontextprotocol/sdk": ">=0.6.0" } }, "sha512-TOFdpdeY7boVRH6EgOhiMj6a0Q6+77nJ2M2Bh7awmN63S2JHA/8sxyK9V8fK0j94mBmnpnoS2SBI52a0valoaQ=="], + "@paca-ai/plugin-sdk-mcp": ["@paca-ai/plugin-sdk-mcp@0.2.0", "", { "peerDependencies": { "@modelcontextprotocol/sdk": ">=0.6.0" } }, "sha512-wpZqKLmfoO98OO2xRfCtrXzfRzJX06yr48LCfu+dE2p1kpNUyWHvp1XkTPOLHTBBOuebMwSDcuZT94u+egv4uA=="], "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.60.3", "", { "os": "android", "cpu": "arm" }, "sha512-x35CNW/ANXG3hE/EZpRU8MXX1JDN86hBb2wMGAtltkz7pc6cxgjpy1OMMfDosOQ+2hWqIkag/fGok1Yady9nGw=="], diff --git a/mcp/package.json b/mcp/package.json index a81bf4a..50cd94c 100644 --- a/mcp/package.json +++ b/mcp/package.json @@ -9,7 +9,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@paca-ai/plugin-sdk-mcp": "^0.1.0" + "@paca-ai/plugin-sdk-mcp": "^0.2.0" }, "devDependencies": { "typescript": "^5.8.3", diff --git a/mcp/src/index.ts b/mcp/src/index.ts index 9c3d716..a792818 100644 --- a/mcp/src/index.ts +++ b/mcp/src/index.ts @@ -374,6 +374,35 @@ const entry: PluginMCPEntry = { return errorResult(`Tool ${name} failed: ${message}`); } }, + + async getToolContext( + toolId: string, + args: Record, + context: PluginMCPContext, + ) { + if (toolId !== "get_task") return null; + const { projectId, taskId } = args as { projectId: string; taskId: string }; + + const api = new PluginAPIClient(context); + try { + const checklists = await api.pluginGet( + `projects/${projectId}/tasks/${taskId}/checklists`, + ); + if (checklists.length === 0) return null; + + const lines = ["## Checklists"]; + for (const cl of checklists) { + const done = cl.items.filter((i) => i.is_checked).length; + lines.push("", `**${cl.title}** (${done}/${cl.items.length} done)`); + lines.push(...cl.items.map(formatItem)); + } + return lines.join("\n"); + } catch { + // Best-effort enrichment — a transient failure here should not + // break the get_task response for the AI client. + return null; + } + }, }; export default entry; diff --git a/plugin.json b/plugin.json index f250ef9..c38e08e 100644 --- a/plugin.json +++ b/plugin.json @@ -2,8 +2,8 @@ "id": "com.paca.checklist", "displayName": "Checklist", "description": "Adds named checklists with checkable items to tasks.", - "version": "0.2.8", - "minCoreVersion": "v0.11.2", + "version": "0.2.9", + "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "backend": { "eventSubscriptions": ["task.deleted"], @@ -112,6 +112,7 @@ ] }, "mcp": { - "remoteEntryUrl": "/plugins-mcp/com.paca.checklist/mcp.js" + "remoteEntryUrl": "/plugins-mcp/com.paca.checklist/mcp.js", + "toolContextHooks": ["get_task"] } } From 8e89efada502a7b5ab680db5b457dc409a27432e Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 23 Aug 2026 06:09:41 +0000 Subject: [PATCH 2/2] chore: bump patch version in plugin.json --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.json b/plugin.json index c38e08e..8460b05 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.checklist", "displayName": "Checklist", "description": "Adds named checklists with checkable items to tasks.", - "version": "0.2.9", + "version": "0.2.10", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "backend": {