Skip to content

Commit dc1a204

Browse files
committed
feat: release v0.3.1 view creation workflows and dual-platform packages
1 parent 0f08ddb commit dc1a204

28 files changed

Lines changed: 676 additions & 1354 deletions

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "plasma-plugin-local",
3-
"owner": { "name": "Brobridge", "email": "bbgai@brobridge.com" },
3+
"owner": {
4+
"name": "Brobridge",
5+
"email": "bbgai@brobridge.com"
6+
},
47
"description": "Local development marketplace for plasma-plugin. Add this directory with /plugin marketplace add <path to this repo>.",
58
"plugins": [
69
{
710
"name": "plasma-plugin",
811
"source": "./",
9-
"description": "Plasma 的工作流 skill 與人工確認閘。MCP 工具(含 Ophion 知識)由 plasma-backend 的 mcp_gateway 提供,不由這個 plugin 啟動。"
12+
"description": "以 Ophion 查核來源與 SQL,建立 view/mview 定義後結束。使用共用遠端 MCP,無本機執行依賴。"
1013
}
1114
]
1215
}

‎.claude-plugin/plugin.json‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"name": "plasma-plugin",
3-
"displayName": "Plasma workflows",
4-
"description": "Plasma 的工作流 skill 與同步/開 API 前的人工確認閘。MCP 工具由 plasma-backend 的 mcp_gateway 提供,用 /mcp add 連上即可。",
5-
"version": "0.2.0",
3+
"description": "以 Ophion 知識查核 SQL,建立並核對 Plasma view/mview 定義的工作流程。使用已連結的遠端 Plasma MCP 工具。",
4+
"version": "0.3.1",
65
"author": {
76
"name": "Brobridge",
87
"email": "bbgai@brobridge.com"
98
},
109
"keywords": [
1110
"plasma",
1211
"ophion",
13-
"data-api",
12+
"view",
1413
"materialized-view",
1514
"knowledge"
1615
]

‎.codex-plugin/plugin.json‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "plasma-plugin",
3+
"version": "0.3.1",
4+
"description": "以 Ophion 知識查核 SQL,建立並核對 Plasma view/mview 定義的工作流程。使用已連結的遠端 Plasma MCP 工具。",
5+
"author": {
6+
"name": "Brobridge",
7+
"email": "bbgai@brobridge.com"
8+
},
9+
"skills": "./skills/",
10+
"keywords": [
11+
"plasma",
12+
"ophion",
13+
"view",
14+
"materialized-view",
15+
"knowledge"
16+
],
17+
"interface": {
18+
"displayName": "Plasma workflows",
19+
"shortDescription": "查核資料知識並建立 view/mview",
20+
"longDescription": "透過已連結的 Plasma MCP gateway 查核 Ophion 知識與 Trino SQL,建立 view 或 manual mview,核對並交付定義後結束。",
21+
"developerName": "Brobridge",
22+
"category": "Productivity",
23+
"capabilities": [
24+
"Read",
25+
"Write"
26+
],
27+
"defaultPrompt": [
28+
"檢查 Plasma 連線、workspace 與目前權限。",
29+
"幫我將這份報表建立成 Plasma view。",
30+
"幫我查核 SQL 並建立 manual mview 定義。"
31+
]
32+
}
33+
}

‎.github/workflows/release.yml‎

Lines changed: 26 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Release
1+
name: Package plugins
22

33
on:
44
push:
55
tags: ['v*']
66
workflow_dispatch:
77
inputs:
88
tag:
9-
description: 'Existing release tag to build (for example v0.1.1)'
10-
required: true
9+
description: 'Optional existing tag (e.g. v0.3.1). Leave blank to package the selected branch without publishing a release.'
10+
required: false
1111
type: string
1212

1313
permissions:
@@ -18,86 +18,42 @@ concurrency:
1818
cancel-in-progress: false
1919

2020
jobs:
21-
# Windows binaries are cross-compiled on Linux, so prove one actually installs
22-
# and runs under Git Bash before anything is published.
23-
smoke-windows:
24-
runs-on: windows-latest
25-
defaults:
26-
run:
27-
shell: bash
28-
env:
29-
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
30-
steps:
31-
- name: Validate release tag
32-
run: |
33-
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
34-
echo "Expected an existing version tag such as v0.1.1" >&2
35-
exit 1
36-
}
37-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
38-
with:
39-
ref: refs/tags/${{ env.RELEASE_TAG }}
40-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
41-
with:
42-
go-version-file: go.mod
43-
- name: Build the Windows asset
44-
run: |
45-
GITHUB_REF_NAME="$RELEASE_TAG" PLASMA_RELEASE_TARGETS=windows/amd64 \
46-
bash scripts/build-release.sh
47-
- name: Smoke test packaged Windows binary
48-
run: |
49-
# MSYS-style paths only; RUNNER_TEMP is a backslash Windows path.
50-
export PLASMA_PLUGIN_HOME="$(mktemp -d)/plasma-release-smoke"
51-
export PLASMA_MCP_RELEASE_DIR="$(pwd)/dist/$RELEASE_TAG"
52-
test -f "$PLASMA_MCP_RELEASE_DIR/plasma-plugin-mcp_${RELEASE_TAG#v}_windows_amd64.tar.gz"
53-
printf '%s' '{"hook_event_name":"PreToolUse","tool_name":"mcp__plasma__sync_view"}' |
54-
bash bin/plasma-mcp.sh hook > hook.json
55-
grep -q '"permissionDecision":"ask"' hook.json
56-
test -x "$PLASMA_PLUGIN_HOME/bin/$RELEASE_TAG/windows-amd64/plasma-plugin-mcp.exe"
57-
5821
release:
59-
needs: smoke-windows
6022
runs-on: ubuntu-latest
6123
env:
62-
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
24+
RELEASE_TAG: ${{ inputs.tag || (github.ref_type == 'tag' && github.ref_name) || '' }}
6325
permissions:
6426
contents: write
6527
steps:
6628
- name: Validate release tag
6729
run: |
68-
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
69-
echo "Expected an existing version tag such as v0.1.1" >&2
70-
exit 1
71-
}
30+
if [[ -n "$RELEASE_TAG" ]]; then
31+
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit 1
32+
fi
7233
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
7334
with:
74-
# Manual runs use the workflow on main but build the exact tagged source.
75-
ref: refs/tags/${{ env.RELEASE_TAG }}
76-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
77-
with:
78-
go-version-file: go.mod
79-
- name: Verify version and source
80-
run: |
81-
python3 - <<'PY'
82-
import json, os, pathlib
83-
version = pathlib.Path('VERSION').read_text().strip()
84-
assert os.environ['RELEASE_TAG'] == 'v' + version
85-
assert json.loads(pathlib.Path('.claude-plugin/plugin.json').read_text())['version'] == version
86-
PY
87-
test -z "$(gofmt -l cmd internal)"
88-
go vet ./...
89-
go test ./...
90-
make test-launcher
91-
- name: Build release assets
35+
ref: ${{ env.RELEASE_TAG != '' && format('refs/tags/{0}', env.RELEASE_TAG) || github.ref }}
36+
- name: Check plugin packages
37+
run: make check
38+
- name: Package ChatGPT and Claude plugins
9239
run: GITHUB_REF_NAME="$RELEASE_TAG" make release
93-
- name: Smoke test packaged Linux binary
40+
- name: Read package version
41+
id: package
9442
run: |
95-
export PLASMA_PLUGIN_HOME="$RUNNER_TEMP/plasma-release-smoke"
96-
export PLASMA_MCP_RELEASE_DIR="$GITHUB_WORKSPACE/dist/$RELEASE_TAG"
97-
printf '%s' '{"hook_event_name":"PreToolUse","tool_name":"mcp__plasma__sync_view"}' |
98-
bash bin/plasma-mcp.sh hook > "$RUNNER_TEMP/hook.json"
99-
python3 -c 'import json,sys; assert json.load(open(sys.argv[1]))["hookSpecificOutput"]["permissionDecision"] == "ask"' "$RUNNER_TEMP/hook.json"
43+
version="$(cat VERSION)"
44+
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit 1
45+
echo "version=$version" >> "$GITHUB_OUTPUT"
46+
- name: Upload installation packages
47+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
48+
with:
49+
name: plasma-plugin-${{ steps.package.outputs.version }}
50+
path: |
51+
dist/v${{ steps.package.outputs.version }}/*.zip
52+
dist/v${{ steps.package.outputs.version }}/checksums.txt
53+
if-no-files-found: error
54+
retention-days: 30
10055
- name: Publish release
56+
if: env.RELEASE_TAG != ''
10157
env:
10258
GH_TOKEN: ${{ github.token }}
10359
GH_REPO: ${{ github.repository }}

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
bin/plasma-plugin-mcp
2-
config.env
31
dist/
2+
__pycache__/
3+
*.pyc

‎Makefile‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
1-
BINARY := bin/plasma-plugin-mcp
2-
VERSION := $(shell cat VERSION)
3-
MODULE := github.com/BrobridgeOrg/plasma-plugin
1+
PYTHON ?= python3
42

5-
.PHONY: build test fmt vet check clean release test-launcher
3+
.PHONY: check test build release
64

7-
build:
8-
go build -o $(BINARY) ./cmd/plasma-plugin-mcp
9-
10-
release:
11-
bash scripts/build-release.sh
12-
13-
test-launcher: build
14-
python3 scripts/test-launcher.py
5+
check: test
156

167
test:
17-
go test ./...
8+
$(PYTHON) -m unittest discover -s scripts -p 'test_*.py'
189

19-
fmt:
20-
gofmt -l -w cmd internal
10+
build: release
2111

22-
vet:
23-
go vet ./...
24-
25-
check: fmt vet test test-launcher
26-
27-
clean:
28-
rm -f $(BINARY)
12+
release:
13+
$(PYTHON) scripts/package_plugin.py

0 commit comments

Comments
 (0)