@jurislm/woodpecker-ci-plugin 2.0.6 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/.mcp.json +3 -2
- package/.mcp.json.example +2 -2
- package/README.md +40 -26
- package/dist/client.js +15 -2
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/plugin-env.d.ts +6 -0
- package/dist/plugin-env.js +67 -0
- package/dist/plugin-env.js.map +1 -0
- package/dist/transports/stdio.js +3 -2
- package/dist/transports/stdio.js.map +1 -1
- package/docs/plugin-architecture.md +89 -0
- package/launchers/woodpecker-desktop.zsh +30 -0
- package/mcp.json +2 -2
- package/package.json +14 -7
- package/plugin.json +1 -1
package/.mcp.json
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"woodpecker-ci": {
|
|
4
4
|
"type": "stdio",
|
|
5
|
-
"command": "
|
|
6
|
-
"args": ["
|
|
5
|
+
"command": "bun",
|
|
6
|
+
"args": ["x", "@jurislm/woodpecker-ci-plugin@latest"],
|
|
7
|
+
"env_vars": ["WOODPECKER_URL", "WOODPECKER_API_TOKEN"]
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
}
|
package/.mcp.json.example
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"woodpecker-ci": {
|
|
4
|
-
"command": "
|
|
5
|
-
"args": ["
|
|
4
|
+
"command": "bun",
|
|
5
|
+
"args": ["x", "@jurislm/woodpecker-ci-plugin@latest"],
|
|
6
6
|
"env": {
|
|
7
7
|
"WOODPECKER_URL": "https://ci.example.com/api",
|
|
8
8
|
"WOODPECKER_API_TOKEN": "<set-in-host-environment>"
|
package/README.md
CHANGED
|
@@ -26,8 +26,8 @@ The server does not read `DRONE_TOKEN`.
|
|
|
26
26
|
{
|
|
27
27
|
"mcpServers": {
|
|
28
28
|
"woodpecker-ci": {
|
|
29
|
-
"command": "
|
|
30
|
-
"args": ["
|
|
29
|
+
"command": "bun",
|
|
30
|
+
"args": ["x", "@jurislm/woodpecker-ci-plugin@latest"],
|
|
31
31
|
"env": {
|
|
32
32
|
"WOODPECKER_URL": "https://ci.example.com/api",
|
|
33
33
|
"WOODPECKER_API_TOKEN": "..."
|
|
@@ -37,6 +37,13 @@ The server does not read `DRONE_TOKEN`.
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
Launch with `bun x` rather than the separate `bunx` executable, which some
|
|
41
|
+
package-manager shims break. When `WOODPECKER_URL` or `WOODPECKER_API_TOKEN` is
|
|
42
|
+
missing, empty, or an unsubstituted `${...}` placeholder, the server fills it
|
|
43
|
+
from `~/.config/jurislm/plugin.env` (`KEY=value` or `export KEY=value` lines;
|
|
44
|
+
override the path with `JURISLM_PLUGIN_ENV`). Host values always take
|
|
45
|
+
precedence and values are never logged.
|
|
46
|
+
|
|
40
47
|
The server exposes generated OpenAPI operations plus a focused pipeline
|
|
41
48
|
inspection tool. It excludes `/user/token`, `/version`, and `/debug/pprof` plus
|
|
42
49
|
its subpaths. The OpenAPI snapshot describes `/version` as JSON, but this
|
|
@@ -85,41 +92,45 @@ server process environment. A desktop app launched by macOS does not read your
|
|
|
85
92
|
interactive shell configuration. Check the MCP child process, not the terminal,
|
|
86
93
|
when diagnosing missing credentials.
|
|
87
94
|
|
|
88
|
-
The
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Codex config or this repository. Replace the example URL with your Woodpecker
|
|
108
|
-
API URL. The plugin-scoped policy below disables the bundled server while
|
|
109
|
-
keeping the guidance skill enabled:
|
|
95
|
+
The portable `mcp.json` has no environment defaults. Native `.mcp.json`
|
|
96
|
+
forwards `WOODPECKER_URL` and `WOODPECKER_API_TOKEN` using `env_vars`; this only
|
|
97
|
+
forwards values already available to the host and does not source `.zshenv`.
|
|
98
|
+
Do not put `${WOODPECKER_URL}` or `${WOODPECKER_API_TOKEN}` in portable `env`:
|
|
99
|
+
Codex's portable parser only expands `${PLUGIN_ROOT}` and `${PLUGIN_DATA}`.
|
|
100
|
+
|
|
101
|
+
For macOS desktop sessions whose token is exported by `.zshenv`, opt into the
|
|
102
|
+
shipped launcher. It explicitly sources that file, keeps startup stdout out of
|
|
103
|
+
MCP, preserves stderr, and forwards only the Woodpecker connection variables
|
|
104
|
+
plus HOME/PATH/TMPDIR/LANG. Startup failures and missing connection settings
|
|
105
|
+
stop before the provider starts. No token is copied into Codex configuration.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
mkdir -p "$HOME/.codex/bin"
|
|
109
|
+
cp launchers/woodpecker-desktop.zsh "$HOME/.codex/bin/woodpecker-mcp.zsh"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Configure the absolute launcher path in `~/.codex/config.toml`, preserve your
|
|
113
|
+
existing non-sensitive URL, and disable only the selected bundled server:
|
|
110
114
|
|
|
111
115
|
```toml
|
|
112
116
|
[mcp_servers.woodpecker-ci]
|
|
113
117
|
command = "/bin/zsh"
|
|
114
|
-
args = ["-
|
|
118
|
+
args = ["-f", "/absolute/path/to/.codex/bin/woodpecker-mcp.zsh"]
|
|
115
119
|
required = true
|
|
116
120
|
startup_timeout_sec = 30
|
|
117
121
|
|
|
122
|
+
[mcp_servers.woodpecker-ci.env]
|
|
123
|
+
WOODPECKER_URL = "https://ci.example.com/api"
|
|
124
|
+
|
|
118
125
|
[plugins."woodpecker-ci@woodpecker-ci-marketplace".mcp_servers.woodpecker-ci]
|
|
119
126
|
enabled = false
|
|
120
127
|
```
|
|
121
128
|
|
|
122
|
-
|
|
129
|
+
The launcher requires Bun at `$HOME/.bun/bin/bun`, runs `bun x`, and continues to use
|
|
130
|
+
`@latest`. Read `initialize.serverInfo.version` and match the intended release;
|
|
131
|
+
a marketplace cache version is not the resolved running package version.
|
|
132
|
+
`codex mcp get` reads a user registration; it does not prove a plugin-provided
|
|
133
|
+
instance received that environment.
|
|
123
134
|
|
|
124
135
|
`required = true` waits for this MCP server during tool discovery. Check
|
|
125
136
|
`codex mcp get woodpecker-ci`, then open a new Codex task and confirm that its
|
|
@@ -127,6 +138,9 @@ Woodpecker tools are present and an authenticated read succeeds. A successful
|
|
|
127
138
|
local stdio check alone does not verify the task's tool catalog. Keep token
|
|
128
139
|
values out of repository files and diagnostic output.
|
|
129
140
|
|
|
141
|
+
See the [JurisLM Plugin Architecture v1](docs/plugin-architecture.md) for shared
|
|
142
|
+
packaging, configuration, release and acceptance rules.
|
|
143
|
+
|
|
130
144
|
## Cursor installation
|
|
131
145
|
|
|
132
146
|
In Cursor, open Customize → Add Marketplace → Import from GitHub and enter
|
package/dist/client.js
CHANGED
|
@@ -17,20 +17,33 @@ function pathValue(value, name) {
|
|
|
17
17
|
if (value === undefined || value === null) {
|
|
18
18
|
throw new Error("Missing required path parameter: " + name);
|
|
19
19
|
}
|
|
20
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
21
|
+
throw new Error("Invalid path parameter: " + name);
|
|
22
|
+
}
|
|
20
23
|
const segment = String(value);
|
|
21
24
|
if (/^\.+$/u.test(segment))
|
|
22
25
|
throw new Error("Invalid dot-only path parameter: " + name);
|
|
23
26
|
return encodeURIComponent(segment);
|
|
24
27
|
}
|
|
28
|
+
function queryValue(value) {
|
|
29
|
+
if (typeof value === "string")
|
|
30
|
+
return value;
|
|
31
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint")
|
|
32
|
+
return String(value);
|
|
33
|
+
const encoded = JSON.stringify(value);
|
|
34
|
+
if (encoded === undefined)
|
|
35
|
+
throw new Error("Invalid query parameter value");
|
|
36
|
+
return encoded;
|
|
37
|
+
}
|
|
25
38
|
function appendQuery(url, name, value) {
|
|
26
39
|
if (value === undefined || value === null)
|
|
27
40
|
return;
|
|
28
41
|
if (Array.isArray(value)) {
|
|
29
42
|
for (const item of value)
|
|
30
|
-
url.searchParams.append(name,
|
|
43
|
+
url.searchParams.append(name, queryValue(item));
|
|
31
44
|
return;
|
|
32
45
|
}
|
|
33
|
-
url.searchParams.set(name,
|
|
46
|
+
url.searchParams.set(name, queryValue(value));
|
|
34
47
|
}
|
|
35
48
|
function decodeBinary(bytes, contentType) {
|
|
36
49
|
return {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAkBtD,MAAM,YAAY,GAAG,mFAAmF,CAAC;AAEzG,MAAM,UAAU,eAAe,CAAI,KAAQ;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAkBtD,MAAM,YAAY,GAAG,mFAAmF,CAAC;AAEzG,MAAM,UAAU,eAAe,CAAI,KAAQ;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAQ,KAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAM,CAAC;IAChG,IAAI,CAAC,KAAK,IAA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AAG,CACzB,MAAM,EACN,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAC/E,CAAC;YACF,IAAI,GAAG,eAAe,CAAC,MAAM,uBAAuB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAM,CAAC;QACnF,CAAC;aAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACnC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;YAC9E,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,IAAI,GAAG,eAAe,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM,CAAC;iBAChF,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;;gBACjG,IAAI,GAAG,YAAY,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,EAAE,WAAW,IAAI,0BAA0B,CAAC,CAAC;QACpG,CAAC;QAED,OAAO;YACL,IAAI;YACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE;SAC5C,CAAC;IACJ,CAAC;CACF;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAU,CAAC;AAQvF,MAAM,UAAU,UAAU,CAAC,MAA0C,OAAO,CAAC,GAAG;IAC9E,MAAM,OAAO,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC/C,OAAO;QACL,OAAO,EAAE,OAAO,IAAI,SAAS;QAC7B,KAAK,EAAE,KAAK,IAAI,SAAS;QACzB,SAAS,EAAE,MAAM;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type Environment = Record<string, string | undefined>;
|
|
2
|
+
export type CredentialGroups = readonly (readonly string[])[];
|
|
3
|
+
export declare const PLUGIN_ENV_PATH_VARIABLE = "JURISLM_PLUGIN_ENV";
|
|
4
|
+
export declare function parsePluginEnv(text: string): Record<string, string>;
|
|
5
|
+
export declare function pluginEnvPath(env: Environment): string;
|
|
6
|
+
export declare function withPluginEnv(env: Environment, groups: CredentialGroups, readText?: (path: string) => string, warn?: (message: string) => void): Environment;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
export const PLUGIN_ENV_PATH_VARIABLE = "JURISLM_PLUGIN_ENV";
|
|
5
|
+
const PLACEHOLDER = /^\$\{[^}]*\}$/u;
|
|
6
|
+
const ASSIGNMENT = /^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/u;
|
|
7
|
+
function isUnset(value) {
|
|
8
|
+
const trimmed = value?.trim();
|
|
9
|
+
return !trimmed || PLACEHOLDER.test(trimmed);
|
|
10
|
+
}
|
|
11
|
+
export function parsePluginEnv(text) {
|
|
12
|
+
const values = {};
|
|
13
|
+
for (const rawLine of text.split(/\r?\n/u)) {
|
|
14
|
+
const match = ASSIGNMENT.exec(rawLine.trim());
|
|
15
|
+
if (!match)
|
|
16
|
+
continue;
|
|
17
|
+
const [, name, rawValue] = match;
|
|
18
|
+
const quote = rawValue[0];
|
|
19
|
+
if (quote === '"' || quote === "'") {
|
|
20
|
+
const end = rawValue.indexOf(quote, 1);
|
|
21
|
+
if (end > 0)
|
|
22
|
+
values[name] = rawValue.slice(1, end);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
values[name] = rawValue.replace(/\s+#.*$/u, "").trim();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return values;
|
|
29
|
+
}
|
|
30
|
+
export function pluginEnvPath(env) {
|
|
31
|
+
const home = env.HOME?.trim() || homedir();
|
|
32
|
+
const override = env[PLUGIN_ENV_PATH_VARIABLE];
|
|
33
|
+
if (!override || isUnset(override))
|
|
34
|
+
return join(home, ".config", "jurislm", "plugin.env");
|
|
35
|
+
const path = override.trim();
|
|
36
|
+
return resolve(path === "~" || path.startsWith("~/") ? join(home, path.slice(1)) : path);
|
|
37
|
+
}
|
|
38
|
+
function readPluginEnv(path, readText, warn) {
|
|
39
|
+
try {
|
|
40
|
+
return parsePluginEnv(readText(path));
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
const code = error.code;
|
|
44
|
+
if (code !== "ENOENT")
|
|
45
|
+
warn(`Could not read plugin env file ${path} (${code ?? "unknown error"})`);
|
|
46
|
+
return {};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function withPluginEnv(env, groups, readText = (path) => readFileSync(path, "utf8"), warn = (message) => console.error(message)) {
|
|
50
|
+
if (groups.every((group) => group.every((name) => !isUnset(env[name]))))
|
|
51
|
+
return env;
|
|
52
|
+
const fileValues = groups.some((group) => group.every((name) => isUnset(env[name]))) ? readPluginEnv(pluginEnvPath(env), readText, warn) : {};
|
|
53
|
+
const resolved = { ...env };
|
|
54
|
+
for (const group of groups) {
|
|
55
|
+
const fillFromFile = group.every((name) => isUnset(env[name]));
|
|
56
|
+
for (const name of group) {
|
|
57
|
+
if (!isUnset(env[name]))
|
|
58
|
+
continue;
|
|
59
|
+
if (fillFromFile && !isUnset(fileValues[name]))
|
|
60
|
+
resolved[name] = fileValues[name];
|
|
61
|
+
else
|
|
62
|
+
delete resolved[name];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return resolved;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=plugin-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-env.js","sourceRoot":"","sources":["../src/plugin-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAK1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,UAAU,GAAG,sDAAsD,CAAC;AAE1E,SAAS,OAAO,CAAC,KAAyB;IACxC,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,OAAO,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,MA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AC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAAE,SAAS;YAClC,IAAI,YAAY,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;;gBAC7E,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
2
2
|
import { createServer } from "../server.js";
|
|
3
|
-
import { loadConfig } from "../config.js";
|
|
3
|
+
import { CREDENTIAL_GROUPS, loadConfig } from "../config.js";
|
|
4
|
+
import { withPluginEnv } from "../plugin-env.js";
|
|
4
5
|
export async function runStdioServer(env = process.env) {
|
|
5
|
-
const server = createServer(loadConfig(env));
|
|
6
|
+
const server = createServer(loadConfig(withPluginEnv(env, CREDENTIAL_GROUPS)));
|
|
6
7
|
await server.connect(new StdioServerTransport());
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=stdio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA0C,OAAO,CAAC,GAAG;IAErD,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# JurisLM Plugin Architecture v1
|
|
2
|
+
|
|
3
|
+
## Package and host configuration
|
|
4
|
+
|
|
5
|
+
Each plugin keeps its own repository, package identity and release. Portable
|
|
6
|
+
`plugin.json` and `mcp.json` are the canonical package entry points. Native
|
|
7
|
+
Codex, Cursor and existing Claude manifests are host adapters. Validate every
|
|
8
|
+
format independently and compare server identity, transport and launch target;
|
|
9
|
+
host-only fields such as Codex `env_vars` may differ.
|
|
10
|
+
|
|
11
|
+
Portable MCP configuration must not contain `env_vars`, private service URLs,
|
|
12
|
+
token defaults or ordinary `${ENVIRONMENT_VARIABLE}` interpolation. Native
|
|
13
|
+
Codex stdio declarations forward their supported credential variable names.
|
|
14
|
+
Forwarding only reads values already available in the owning environment; it
|
|
15
|
+
does not load shell startup files or another MCP registration's settings.
|
|
16
|
+
|
|
17
|
+
Hetzner, Coolify and Woodpecker provide Bun/TypeScript stdio servers. Higgsfield
|
|
18
|
+
uses its official remote HTTP/OAuth server and separately authenticated CLI;
|
|
19
|
+
its package must not replace those with a local server. Preserve existing tool
|
|
20
|
+
names, inputs, output schemas, text representations and provider workflows.
|
|
21
|
+
|
|
22
|
+
## Local stdio implementation
|
|
23
|
+
|
|
24
|
+
Keep configuration, HTTP requests, error handling, registration and provider
|
|
25
|
+
tools at distinct seams. Generated and custom tools share the same HTTP client
|
|
26
|
+
and safe error handling, with adapters preserving their existing MCP outputs.
|
|
27
|
+
The internal HTTP envelope is `{ data, status, request: { method, path } }`.
|
|
28
|
+
Provider errors retain their existing codes and output format. Never log token
|
|
29
|
+
values, authorization headers or unsanitized provider error bodies.
|
|
30
|
+
|
|
31
|
+
Ordinary initialization and tool discovery work without credentials. Validate
|
|
32
|
+
required connection settings before sending a provider request. Keep health
|
|
33
|
+
authentication exceptions and provider-specific normalization. Coolify selects
|
|
34
|
+
URL/token pairs from one variable group; never fill a partial pair from another
|
|
35
|
+
group. Preserve Hetzner credential-return allowlists, SSH agent requirements,
|
|
36
|
+
pagination and partial-failure semantics, and binary/stream output behavior.
|
|
37
|
+
|
|
38
|
+
## Opt-in macOS launcher
|
|
39
|
+
|
|
40
|
+
Each local server ships `launchers/<provider>-desktop.zsh`. The host invokes it
|
|
41
|
+
with `/bin/zsh -f`. It explicitly sources `${ZDOTDIR:-$HOME}/.zshenv`, suppresses
|
|
42
|
+
startup stdout, preserves stderr, checks required credentials, and execs the
|
|
43
|
+
absolute `$HOME/.bun/bin/bun x` path. Preflight startup syntax; reject syntax
|
|
44
|
+
errors and source status greater than 1. Status 1 may be a benign final
|
|
45
|
+
optional-file guard; credential completeness still gates execution. Startup
|
|
46
|
+
values may override inherited values, matching ordinary zsh source behavior.
|
|
47
|
+
|
|
48
|
+
Retain only HOME, PATH, TMPDIR, LANG and the provider's supported connection
|
|
49
|
+
variables. Hetzner also retains SSH_AUTH_SOCK. Fix PATH to
|
|
50
|
+
`$HOME/.bun/bin:/usr/bin:/bin`. Do not pass credentials in command arguments.
|
|
51
|
+
Woodpecker's URL is supplied by the user MCP `env` setting or existing shell
|
|
52
|
+
environment; the launcher does not parse global Codex configuration.
|
|
53
|
+
|
|
54
|
+
Installing this launcher is opt-in. Keep the portable `bun x` manifest unchanged,
|
|
55
|
+
disable only the selected plugin's bundled server, and use a user MCP
|
|
56
|
+
registration with startup_timeout_sec=30. Keep skills enabled. Preserve
|
|
57
|
+
unrelated plugin registrations and existing credential sources.
|
|
58
|
+
|
|
59
|
+
## Validation and release
|
|
60
|
+
|
|
61
|
+
Use Bun 1.3.14 for development and CI. Keep SDK 1.30.0 and Zod 4.6.5 pinned for
|
|
62
|
+
the three local servers. A complete `bun run check` validates manifests,
|
|
63
|
+
snapshot integrity/generated parity where applicable, lint, typechecking,
|
|
64
|
+
build, offline tests, release workflows and package contents. Generated
|
|
65
|
+
artifacts are regenerated from committed inputs, never edited by hand.
|
|
66
|
+
|
|
67
|
+
Use Hetzner's existing lint configuration and pinned dependencies as the local
|
|
68
|
+
server baseline. Tests exercise public tool contracts and process boundaries;
|
|
69
|
+
they do not require live credentials. Packages include their launcher and
|
|
70
|
+
exclude credentials. Release Please owns package and plugin versions.
|
|
71
|
+
|
|
72
|
+
Higgsfield has a private development package for package/skill validation and
|
|
73
|
+
Git releases, with no npm runtime publication. Record the source revision and
|
|
74
|
+
hashes of vendored skills without silently rewriting their upstream workflows.
|
|
75
|
+
|
|
76
|
+
## Acceptance evidence
|
|
77
|
+
|
|
78
|
+
Report source SHA, package/marketplace version, resolved MCP server version,
|
|
79
|
+
tool catalog and each authenticated read separately. Local launchers continue
|
|
80
|
+
using `@latest`; accept a delivered release only after `initialize.serverInfo`
|
|
81
|
+
matches the target release. Higgsfield's remote server and CLI versions are
|
|
82
|
+
independent of its plugin package version.
|
|
83
|
+
|
|
84
|
+
An offline check, direct stdio read, merge or publication does not prove a
|
|
85
|
+
fresh ordinary host chat has registered and successfully called the selected
|
|
86
|
+
plugin's tools. Record the actual server/plugin source, input, HTTP status and
|
|
87
|
+
returned counts without secrets. Retest missing settings and authentication
|
|
88
|
+
failures in that target environment. OAuth login and opening a fresh chat are
|
|
89
|
+
explicit acceptance dependencies; leave those layers pending until read back.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/bin/zsh -f
|
|
2
|
+
if [[ -r ${ZDOTDIR:-$HOME}/.zshenv ]]; then
|
|
3
|
+
/bin/zsh -f -n "${ZDOTDIR:-$HOME}/.zshenv" || exit $?
|
|
4
|
+
startup_status=0
|
|
5
|
+
source "${ZDOTDIR:-$HOME}/.zshenv" >/dev/null || startup_status=$?
|
|
6
|
+
if (( startup_status > 1 )); then
|
|
7
|
+
exit "$startup_status"
|
|
8
|
+
fi
|
|
9
|
+
fi
|
|
10
|
+
if [[ -z ${WOODPECKER_API_TOKEN:-} ]]; then
|
|
11
|
+
print -u2 -- 'WOODPECKER_API_TOKEN is required in the zsh startup environment'
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
if [[ -z ${WOODPECKER_URL:-} ]]; then
|
|
15
|
+
print -u2 -- 'WOODPECKER_URL is required in the host or zsh startup environment'
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
zmodload zsh/parameter
|
|
19
|
+
export PATH="$HOME/.bun/bin:/usr/bin:/bin"
|
|
20
|
+
for name in ${(k)parameters}; do
|
|
21
|
+
case "$name" in
|
|
22
|
+
HOME|PATH|TMPDIR|LANG|WOODPECKER_URL|WOODPECKER_API_TOKEN) ;;
|
|
23
|
+
*)
|
|
24
|
+
if [[ ${parameters[$name]} == *export* ]]; then
|
|
25
|
+
unset "$name"
|
|
26
|
+
fi
|
|
27
|
+
;;
|
|
28
|
+
esac
|
|
29
|
+
done
|
|
30
|
+
exec "$HOME/.bun/bin/bun" x @jurislm/woodpecker-ci-plugin@latest
|
package/mcp.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jurislm/woodpecker-ci-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Local stdio MCP server for Woodpecker CI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
"api",
|
|
22
22
|
"openapi",
|
|
23
23
|
"contracts",
|
|
24
|
-
"schemas"
|
|
24
|
+
"schemas",
|
|
25
|
+
"launchers",
|
|
26
|
+
"docs/plugin-architecture.md"
|
|
25
27
|
],
|
|
26
28
|
"engines": {
|
|
27
29
|
"bun": ">=1.1.0"
|
|
@@ -34,7 +36,7 @@
|
|
|
34
36
|
"clean": "bun scripts/clean-dist.ts",
|
|
35
37
|
"build": "bun run clean && tsc",
|
|
36
38
|
"start": "bun dist/index.js",
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
39
|
+
"typecheck": "tsc --noEmit -p tsconfig.check.json",
|
|
38
40
|
"test": "bun test --path-ignore-patterns dist",
|
|
39
41
|
"api:fetch": "bun scripts/update-openapi.ts",
|
|
40
42
|
"api:generate": "bun scripts/generate-openapi.ts",
|
|
@@ -45,8 +47,9 @@
|
|
|
45
47
|
"manifest:fetch": "bun scripts/update-agent-plugin-schemas.ts",
|
|
46
48
|
"manifest:check": "bun scripts/validate-plugin-manifests.ts",
|
|
47
49
|
"release:test": "bun scripts/ci/test-release-pr-auto-merge.ts && bun scripts/ci/test-release-workflows.ts",
|
|
48
|
-
"check": "bun run manifest:check && bun run api:check && bun run typecheck && bun run build && bun test && bun run release:test && bun run package:check",
|
|
49
|
-
"prepublishOnly": "bun run check"
|
|
50
|
+
"check": "bun run manifest:check && bun run api:check && bun run lint && bun run typecheck && bun run build && bun test && bun run release:test && bun run package:check",
|
|
51
|
+
"prepublishOnly": "bun run check",
|
|
52
|
+
"lint": "bun ./node_modules/eslint/bin/eslint.js src scripts --max-warnings=0"
|
|
50
53
|
},
|
|
51
54
|
"dependencies": {
|
|
52
55
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
@@ -58,6 +61,10 @@
|
|
|
58
61
|
"json-schema-to-zod": "2.8.1",
|
|
59
62
|
"openapi-typescript": "7.13.0",
|
|
60
63
|
"typescript": "5.9.3",
|
|
61
|
-
"yaml": "2.9.1"
|
|
62
|
-
|
|
64
|
+
"yaml": "2.9.1",
|
|
65
|
+
"@eslint/js": "10.0.1",
|
|
66
|
+
"eslint": "10.11.0",
|
|
67
|
+
"typescript-eslint": "8.70.1"
|
|
68
|
+
},
|
|
69
|
+
"packageManager": "bun@1.3.14"
|
|
63
70
|
}
|
package/plugin.json
CHANGED