@selfagency/beans-mcp 0.1.1 → 0.1.2
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/{dist/beans-mcp-server.cjs → beans-mcp-server.cjs} +8 -4
- package/{dist/index.cjs → index.cjs} +8 -4
- package/{dist/index.d.ts → index.d.ts} +2 -1
- package/{dist/index.js → index.js} +8 -4
- package/package.json +27 -64
- package/.beans.yml +0 -6
- package/.claude/settings.local.json +0 -18
- package/.editorconfig +0 -13
- package/.github/workflows/release.yml +0 -235
- package/.github/workflows/test.yml +0 -80
- package/.husky/pre-commit +0 -1
- package/.nvmrc +0 -1
- package/.oxfmtrc.json +0 -11
- package/.oxlintrc.json +0 -37
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -140
- package/CONTRIBUTING.md +0 -139
- package/dist/README.md +0 -307
- package/dist/beans-mcp-server.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/package.json +0 -43
- package/pnpm-workspace.yaml +0 -2
- package/scripts/release.js +0 -433
- package/scripts/write-dist-package.js +0 -53
- package/src/cli.ts +0 -14
- package/src/index.ts +0 -21
- package/src/internal/graphql.ts +0 -33
- package/src/internal/queryHelpers.ts +0 -157
- package/src/server/BeansMcpServer.ts +0 -600
- package/src/server/backend.ts +0 -358
- package/src/test/BeansMcpServer.test.ts +0 -514
- package/src/test/handlers.unit.test.ts +0 -184
- package/src/test/parseCliArgs.test.ts +0 -69
- package/src/test/protocol.e2e.test.ts +0 -884
- package/src/test/queryHelpers.test.ts +0 -524
- package/src/test/startBeansMcpServer.test.ts +0 -146
- package/src/test/tools-integration.test.ts +0 -912
- package/src/test/utils.test.ts +0 -80
- package/src/types.ts +0 -46
- package/src/utils.ts +0 -20
- package/tsconfig.json +0 -24
- package/tsup.config.ts +0 -42
- package/vitest.config.ts +0 -18
|
@@ -22735,8 +22735,7 @@ function isPathWithinRoot(root, target) {
|
|
|
22735
22735
|
}
|
|
22736
22736
|
function makeTextAndStructured(value) {
|
|
22737
22737
|
return {
|
|
22738
|
-
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22739
|
-
structuredContent: value
|
|
22738
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22740
22739
|
};
|
|
22741
22740
|
}
|
|
22742
22741
|
var import_node_path;
|
|
@@ -22920,6 +22919,9 @@ Output: ${stdout.slice(0, 1e3)}`
|
|
|
22920
22919
|
if (updates.blockedBy) {
|
|
22921
22920
|
updateInput.addBlockedBy = updates.blockedBy;
|
|
22922
22921
|
}
|
|
22922
|
+
if (updates.body !== void 0) {
|
|
22923
|
+
updateInput.body = updates.body;
|
|
22924
|
+
}
|
|
22923
22925
|
const { data, errors } = await this.executeGraphQL(UPDATE_BEAN_MUTATION, {
|
|
22924
22926
|
id: beanId,
|
|
22925
22927
|
input: updateInput
|
|
@@ -31251,7 +31253,8 @@ function updateHandler(backend) {
|
|
|
31251
31253
|
parent: input.parent,
|
|
31252
31254
|
clearParent: input.clearParent,
|
|
31253
31255
|
blocking: input.blocking,
|
|
31254
|
-
blockedBy: input.blockedBy
|
|
31256
|
+
blockedBy: input.blockedBy,
|
|
31257
|
+
body: input.body
|
|
31255
31258
|
})
|
|
31256
31259
|
});
|
|
31257
31260
|
}
|
|
@@ -31410,7 +31413,8 @@ function registerTools(server, backend) {
|
|
|
31410
31413
|
parent: external_exports3.string().max(MAX_ID_LENGTH).optional(),
|
|
31411
31414
|
clearParent: external_exports3.boolean().optional(),
|
|
31412
31415
|
blocking: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31413
|
-
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional()
|
|
31416
|
+
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31417
|
+
body: external_exports3.string().max(MAX_DESCRIPTION_LENGTH).optional()
|
|
31414
31418
|
}),
|
|
31415
31419
|
annotations: {
|
|
31416
31420
|
readOnlyHint: false,
|
|
@@ -22735,8 +22735,7 @@ function isPathWithinRoot(root, target) {
|
|
|
22735
22735
|
}
|
|
22736
22736
|
function makeTextAndStructured(value) {
|
|
22737
22737
|
return {
|
|
22738
|
-
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22739
|
-
structuredContent: value
|
|
22738
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22740
22739
|
};
|
|
22741
22740
|
}
|
|
22742
22741
|
var import_node_path;
|
|
@@ -22920,6 +22919,9 @@ Output: ${stdout.slice(0, 1e3)}`
|
|
|
22920
22919
|
if (updates.blockedBy) {
|
|
22921
22920
|
updateInput.addBlockedBy = updates.blockedBy;
|
|
22922
22921
|
}
|
|
22922
|
+
if (updates.body !== void 0) {
|
|
22923
|
+
updateInput.body = updates.body;
|
|
22924
|
+
}
|
|
22923
22925
|
const { data, errors } = await this.executeGraphQL(UPDATE_BEAN_MUTATION, {
|
|
22924
22926
|
id: beanId,
|
|
22925
22927
|
input: updateInput
|
|
@@ -31268,7 +31270,8 @@ function updateHandler(backend) {
|
|
|
31268
31270
|
parent: input.parent,
|
|
31269
31271
|
clearParent: input.clearParent,
|
|
31270
31272
|
blocking: input.blocking,
|
|
31271
|
-
blockedBy: input.blockedBy
|
|
31273
|
+
blockedBy: input.blockedBy,
|
|
31274
|
+
body: input.body
|
|
31272
31275
|
})
|
|
31273
31276
|
});
|
|
31274
31277
|
}
|
|
@@ -31427,7 +31430,8 @@ function registerTools(server, backend) {
|
|
|
31427
31430
|
parent: external_exports3.string().max(MAX_ID_LENGTH).optional(),
|
|
31428
31431
|
clearParent: external_exports3.boolean().optional(),
|
|
31429
31432
|
blocking: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31430
|
-
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional()
|
|
31433
|
+
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31434
|
+
body: external_exports3.string().max(MAX_DESCRIPTION_LENGTH).optional()
|
|
31431
31435
|
}),
|
|
31432
31436
|
annotations: {
|
|
31433
31437
|
readOnlyHint: false,
|
|
@@ -68,6 +68,7 @@ interface BackendInterface {
|
|
|
68
68
|
clearParent?: boolean;
|
|
69
69
|
blocking?: string[];
|
|
70
70
|
blockedBy?: string[];
|
|
71
|
+
body?: string;
|
|
71
72
|
}): Promise<BeanRecord>;
|
|
72
73
|
delete(beanId: string): Promise<Record<string, unknown>>;
|
|
73
74
|
openConfig(): Promise<{
|
|
@@ -144,6 +145,7 @@ declare class BeansCliBackend implements BackendInterface {
|
|
|
144
145
|
clearParent?: boolean;
|
|
145
146
|
blocking?: string[];
|
|
146
147
|
blockedBy?: string[];
|
|
148
|
+
body?: string;
|
|
147
149
|
}): Promise<BeanRecord>;
|
|
148
150
|
delete(beanId: string): Promise<Record<string, unknown>>;
|
|
149
151
|
openConfig(): Promise<{
|
|
@@ -213,7 +215,6 @@ declare function makeTextAndStructured<T extends Record<string, unknown>>(value:
|
|
|
213
215
|
type: "text";
|
|
214
216
|
text: string;
|
|
215
217
|
}[];
|
|
216
|
-
structuredContent: T;
|
|
217
218
|
};
|
|
218
219
|
|
|
219
220
|
export { type BackendInterface, type BeanRecord, BeansCliBackend, DEFAULT_MCP_PORT, type GraphQLError, MAX_ID_LENGTH, MAX_METADATA_LENGTH, MAX_TITLE_LENGTH, type SortMode, createBeansMcpServer, isPathWithinRoot, makeTextAndStructured, parseCliArgs, sortBeansInternal as sortBeans, startBeansMcpServer };
|
|
@@ -22734,8 +22734,7 @@ function isPathWithinRoot(root, target) {
|
|
|
22734
22734
|
}
|
|
22735
22735
|
function makeTextAndStructured(value) {
|
|
22736
22736
|
return {
|
|
22737
|
-
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22738
|
-
structuredContent: value
|
|
22737
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
22739
22738
|
};
|
|
22740
22739
|
}
|
|
22741
22740
|
var init_utils = __esm({
|
|
@@ -22917,6 +22916,9 @@ Output: ${stdout.slice(0, 1e3)}`
|
|
|
22917
22916
|
if (updates.blockedBy) {
|
|
22918
22917
|
updateInput.addBlockedBy = updates.blockedBy;
|
|
22919
22918
|
}
|
|
22919
|
+
if (updates.body !== void 0) {
|
|
22920
|
+
updateInput.body = updates.body;
|
|
22921
|
+
}
|
|
22920
22922
|
const { data, errors } = await this.executeGraphQL(UPDATE_BEAN_MUTATION, {
|
|
22921
22923
|
id: beanId,
|
|
22922
22924
|
input: updateInput
|
|
@@ -31248,7 +31250,8 @@ function updateHandler(backend) {
|
|
|
31248
31250
|
parent: input.parent,
|
|
31249
31251
|
clearParent: input.clearParent,
|
|
31250
31252
|
blocking: input.blocking,
|
|
31251
|
-
blockedBy: input.blockedBy
|
|
31253
|
+
blockedBy: input.blockedBy,
|
|
31254
|
+
body: input.body
|
|
31252
31255
|
})
|
|
31253
31256
|
});
|
|
31254
31257
|
}
|
|
@@ -31407,7 +31410,8 @@ function registerTools(server, backend) {
|
|
|
31407
31410
|
parent: external_exports3.string().max(MAX_ID_LENGTH).optional(),
|
|
31408
31411
|
clearParent: external_exports3.boolean().optional(),
|
|
31409
31412
|
blocking: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31410
|
-
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional()
|
|
31413
|
+
blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
|
|
31414
|
+
body: external_exports3.string().max(MAX_DESCRIPTION_LENGTH).optional()
|
|
31411
31415
|
}),
|
|
31412
31416
|
annotations: {
|
|
31413
31417
|
readOnlyHint: false,
|
package/package.json
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfagency/beans-mcp",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "0.1.2",
|
|
5
4
|
"description": "MCP (Model Context Protocol) server for Beans issue tracker",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "Daniel Sieradski",
|
|
8
|
-
"email": "daniel@self.agency",
|
|
9
|
-
"url": "https://self.agency"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://github.com/hmans/beans",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/selfagency/beans-mcp/issues"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/selfagency/beans-mcp.git"
|
|
18
|
-
},
|
|
19
5
|
"keywords": [
|
|
20
6
|
"beans",
|
|
21
7
|
"mcp",
|
|
@@ -23,58 +9,35 @@
|
|
|
23
9
|
"issue-tracker",
|
|
24
10
|
"ai"
|
|
25
11
|
],
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
".": {
|
|
30
|
-
"types": "./dist/index.d.ts",
|
|
31
|
-
"import": "./dist/index.js",
|
|
32
|
-
"require": "./dist/index.cjs"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"main": "./dist/index.cjs",
|
|
36
|
-
"module": "./dist/index.js",
|
|
37
|
-
"types": "./dist/index.d.ts",
|
|
38
|
-
"bin": {
|
|
39
|
-
"beans-mcp": "./dist/beans-mcp-server.cjs"
|
|
12
|
+
"homepage": "https://github.com/hmans/beans",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/selfagency/beans-mcp/issues"
|
|
40
15
|
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"@types/node": "^20.19.0",
|
|
45
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
46
|
-
"@vitest/ui": "4.0.18",
|
|
47
|
-
"husky": "^9.1.7",
|
|
48
|
-
"lint-staged": "^16.2.7",
|
|
49
|
-
"ora": "^9.3.0",
|
|
50
|
-
"oxfmt": "^0.35.0",
|
|
51
|
-
"oxlint": "^1.50.0",
|
|
52
|
-
"oxlint-tsgolint": "^0.15.0",
|
|
53
|
-
"tsup": "8.5.1",
|
|
54
|
-
"typescript": "^5.9.3",
|
|
55
|
-
"vitest": "4.0.18",
|
|
56
|
-
"zod": "4.3.6",
|
|
57
|
-
"zx": "^8.8.5"
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/selfagency/beans-mcp.git"
|
|
58
19
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Daniel Sieradski",
|
|
23
|
+
"email": "daniel@self.agency",
|
|
24
|
+
"url": "https://self.agency"
|
|
61
25
|
},
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
26
|
+
"main": "./index.cjs",
|
|
27
|
+
"module": "./index.js",
|
|
28
|
+
"types": "./index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"./index.cjs",
|
|
31
|
+
"./index.js",
|
|
32
|
+
"./index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"bin": {
|
|
35
|
+
"beans-mcp": "./beans-mcp-server.cjs"
|
|
67
36
|
},
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"postbuild": "node ./scripts/write-dist-package.js",
|
|
74
|
-
"release": "zx ./scripts/release.js",
|
|
75
|
-
"test:coverage": "vitest run --coverage",
|
|
76
|
-
"test:watch": "vitest",
|
|
77
|
-
"test": "vitest run",
|
|
78
|
-
"type-check": "tsc --noEmit"
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"import": "./index.js",
|
|
40
|
+
"require": "./index.cjs"
|
|
41
|
+
}
|
|
79
42
|
}
|
|
80
43
|
}
|
package/.beans.yml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(node /Users/daniel/Developer/beans-mcp-server/dist/index.cjs)",
|
|
5
|
-
"Bash(echo \"Exit: $?\")",
|
|
6
|
-
"Bash(pnpm run build)",
|
|
7
|
-
"Bash(node /Users/daniel/Developer/beans-mcp-server/dist/beans-mcp-server.cjs --help)",
|
|
8
|
-
"Bash(pnpm test)",
|
|
9
|
-
"Bash(pnpm test src/test/protocol.e2e.test.ts)",
|
|
10
|
-
"Bash(python3 -c \"import sys,json; p=json.load\\(sys.stdin\\); print\\(p.get\\(''version''\\)\\); print\\(list\\(p.get\\(''exports'',{}\\).keys\\(\\)\\)[:15]\\)\")",
|
|
11
|
-
"Bash(node -e \"const {z} = require\\(''./node_modules/zod''\\); const s = z.string\\(\\); console.log\\(''v4 internal marker:'', !!s._zod\\); console.log\\(''v3 internal marker:'', !!s._def\\);\")",
|
|
12
|
-
"Bash(pnpm run type-check)",
|
|
13
|
-
"Bash(pnpm build)",
|
|
14
|
-
"Bash(pnpm test --coverage)",
|
|
15
|
-
"Bash(git add README.md package.json scripts/write-dist-package.js src/cli.ts src/internal/queryHelpers.ts src/server/BeansMcpServer.ts src/server/backend.ts src/test/BeansMcpServer.test.ts src/test/handlers.unit.test.ts src/test/parseCliArgs.test.ts src/test/queryHelpers.test.ts tsup.config.ts src/test/protocol.e2e.test.ts src/test/startBeansMcpServer.test.ts CHANGELOG.md)"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
package/.editorconfig
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags: ["v*"]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
inputs:
|
|
8
|
-
version:
|
|
9
|
-
description: "Version to release (e.g. 1.2.3)"
|
|
10
|
-
required: true
|
|
11
|
-
type: string
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
actions: read
|
|
16
|
-
|
|
17
|
-
concurrency:
|
|
18
|
-
group: release-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
detect-tag:
|
|
23
|
-
name: Detect release tag and readiness
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
timeout-minutes: 5
|
|
26
|
-
permissions:
|
|
27
|
-
contents: write
|
|
28
|
-
actions: read
|
|
29
|
-
|
|
30
|
-
outputs:
|
|
31
|
-
release_tag: ${{ steps.tag.outputs.release_tag }}
|
|
32
|
-
ready: ${{ steps.tag.outputs.ready }}
|
|
33
|
-
|
|
34
|
-
steps:
|
|
35
|
-
- name: Resolve tag and verify CI readiness
|
|
36
|
-
id: tag
|
|
37
|
-
uses: actions/github-script@v8
|
|
38
|
-
with:
|
|
39
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
-
script: |
|
|
41
|
-
const owner = context.repo.owner;
|
|
42
|
-
const repo = context.repo.repo;
|
|
43
|
-
|
|
44
|
-
let tagName;
|
|
45
|
-
|
|
46
|
-
if (context.eventName === 'workflow_dispatch') {
|
|
47
|
-
const versionInput = '${{ inputs.version }}'.trim();
|
|
48
|
-
if (!versionInput) {
|
|
49
|
-
core.setFailed('version input is required for workflow_dispatch.');
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
tagName = versionInput.startsWith('v') ? versionInput : `v${versionInput}`;
|
|
53
|
-
|
|
54
|
-
// Resolve HEAD of main
|
|
55
|
-
const main = await github.rest.repos.getBranch({ owner, repo, branch: 'main' });
|
|
56
|
-
const mainSha = main.data.commit.sha;
|
|
57
|
-
|
|
58
|
-
// Create the tag via API
|
|
59
|
-
core.info(`Creating tag ${tagName} at ${mainSha}...`);
|
|
60
|
-
await github.rest.git.createRef({
|
|
61
|
-
owner,
|
|
62
|
-
repo,
|
|
63
|
-
ref: `refs/tags/${tagName}`,
|
|
64
|
-
sha: mainSha,
|
|
65
|
-
});
|
|
66
|
-
core.info(`Tag ${tagName} created.`);
|
|
67
|
-
} else {
|
|
68
|
-
tagName = context.ref.replace('refs/tags/', '');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!tagName || !tagName.startsWith('v')) {
|
|
72
|
-
core.info(`Ref '${context.ref}' is not a release tag; skipping.`);
|
|
73
|
-
core.setOutput('release_tag', '');
|
|
74
|
-
core.setOutput('ready', 'false');
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const refData = await github.rest.git.getRef({
|
|
79
|
-
owner,
|
|
80
|
-
repo,
|
|
81
|
-
ref: `tags/${tagName}`,
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const refObj = refData.data.object;
|
|
85
|
-
const taggedSha =
|
|
86
|
-
refObj.type === 'tag'
|
|
87
|
-
? (await github.rest.git.getTag({ owner, repo, tag_sha: refObj.sha })).data.object.sha
|
|
88
|
-
: refObj.sha;
|
|
89
|
-
const main = await github.rest.repos.getBranch({ owner, repo, branch: 'main' });
|
|
90
|
-
const mainSha = main.data.commit.sha;
|
|
91
|
-
|
|
92
|
-
if (taggedSha !== mainSha) {
|
|
93
|
-
core.setFailed(
|
|
94
|
-
`Release blocked: tag ${tagName} points to ${taggedSha}, but latest main is ${mainSha}.`
|
|
95
|
-
);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Verify the full test suite passed on this commit.
|
|
100
|
-
const requiredWorkflows = ['Test & Build'];
|
|
101
|
-
|
|
102
|
-
for (const workflowName of requiredWorkflows) {
|
|
103
|
-
const workflowsResp = await github.rest.actions.listRepoWorkflows({
|
|
104
|
-
owner,
|
|
105
|
-
repo,
|
|
106
|
-
per_page: 100,
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const workflow = workflowsResp.data.workflows.find(w => w.name === workflowName);
|
|
110
|
-
if (!workflow) {
|
|
111
|
-
core.setFailed(`Release blocked: required workflow '${workflowName}' not found in repository.`);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const runsResp = await github.rest.actions.listWorkflowRuns({
|
|
116
|
-
owner,
|
|
117
|
-
repo,
|
|
118
|
-
workflow_id: workflow.id,
|
|
119
|
-
branch: 'main',
|
|
120
|
-
head_sha: mainSha,
|
|
121
|
-
status: 'completed',
|
|
122
|
-
per_page: 10,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const run = runsResp.data.workflow_runs[0];
|
|
126
|
-
if (!run) {
|
|
127
|
-
core.setFailed(
|
|
128
|
-
`Release blocked: required workflow '${workflowName}' has no completed run for ${mainSha}.`
|
|
129
|
-
);
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (run.conclusion !== 'success') {
|
|
133
|
-
core.setFailed(
|
|
134
|
-
`Release blocked: workflow '${workflowName}' concluded with '${run.conclusion}' on ${mainSha}.`
|
|
135
|
-
);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
core.info(`Release tag detected: ${tagName} on latest main commit ${mainSha}; all checks passed.`);
|
|
141
|
-
core.setOutput('release_tag', tagName);
|
|
142
|
-
core.setOutput('ready', 'true');
|
|
143
|
-
|
|
144
|
-
release:
|
|
145
|
-
name: Build and Release
|
|
146
|
-
needs: detect-tag
|
|
147
|
-
if: needs.detect-tag.outputs.release_tag != '' && needs.detect-tag.outputs.ready == 'true'
|
|
148
|
-
runs-on: ubuntu-latest
|
|
149
|
-
timeout-minutes: 10
|
|
150
|
-
permissions:
|
|
151
|
-
contents: write
|
|
152
|
-
|
|
153
|
-
steps:
|
|
154
|
-
- name: Checkout repository
|
|
155
|
-
uses: actions/checkout@v4
|
|
156
|
-
with:
|
|
157
|
-
ref: ${{ needs.detect-tag.outputs.release_tag }}
|
|
158
|
-
fetch-depth: 0
|
|
159
|
-
|
|
160
|
-
- name: Generate release notes
|
|
161
|
-
id: changelog_notes
|
|
162
|
-
uses: actions/github-script@v8
|
|
163
|
-
with:
|
|
164
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
165
|
-
script: |
|
|
166
|
-
const owner = context.repo.owner;
|
|
167
|
-
const repo = context.repo.repo;
|
|
168
|
-
const currentTag = '${{ needs.detect-tag.outputs.release_tag }}';
|
|
169
|
-
|
|
170
|
-
const tagsResp = await github.rest.repos.listTags({
|
|
171
|
-
owner,
|
|
172
|
-
repo,
|
|
173
|
-
per_page: 100,
|
|
174
|
-
});
|
|
175
|
-
const tags = tagsResp.data;
|
|
176
|
-
|
|
177
|
-
const index = tags.findIndex(tag => tag.name === currentTag);
|
|
178
|
-
const previousTag =
|
|
179
|
-
index >= 0
|
|
180
|
-
? (tags.slice(index + 1).find(tag => tag.name.startsWith('v'))?.name ?? '')
|
|
181
|
-
: '';
|
|
182
|
-
|
|
183
|
-
const notesResponse = await github.rest.repos.generateReleaseNotes({
|
|
184
|
-
owner,
|
|
185
|
-
repo,
|
|
186
|
-
tag_name: currentTag,
|
|
187
|
-
...(previousTag ? { previous_tag_name: previousTag } : {}),
|
|
188
|
-
target_commitish: 'main',
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
core.info(
|
|
192
|
-
previousTag
|
|
193
|
-
? `Generated changelog notes from ${previousTag} to ${currentTag}.`
|
|
194
|
-
: `Generated changelog notes for ${currentTag} (no previous tag found).`
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
core.setOutput('previous_tag', previousTag);
|
|
198
|
-
core.setOutput('notes', notesResponse.data.body ?? '');
|
|
199
|
-
|
|
200
|
-
- name: Write release notes to file
|
|
201
|
-
run: printf '%s' "$RELEASE_NOTES" > release-notes.md
|
|
202
|
-
env:
|
|
203
|
-
RELEASE_NOTES: ${{ steps.changelog_notes.outputs.notes }}
|
|
204
|
-
|
|
205
|
-
- name: Setup pnpm
|
|
206
|
-
uses: pnpm/action-setup@v4
|
|
207
|
-
with:
|
|
208
|
-
version: 10
|
|
209
|
-
|
|
210
|
-
- name: Setup Node.js
|
|
211
|
-
uses: actions/setup-node@v4
|
|
212
|
-
with:
|
|
213
|
-
node-version: "20"
|
|
214
|
-
cache: "pnpm"
|
|
215
|
-
|
|
216
|
-
- name: Install dependencies
|
|
217
|
-
run: pnpm install --frozen-lockfile
|
|
218
|
-
|
|
219
|
-
- name: Build
|
|
220
|
-
run: pnpm build
|
|
221
|
-
|
|
222
|
-
- name: Pack npm tarball
|
|
223
|
-
run: npm pack ./dist --pack-destination .
|
|
224
|
-
|
|
225
|
-
- name: Create GitHub Release
|
|
226
|
-
uses: softprops/action-gh-release@v2
|
|
227
|
-
with:
|
|
228
|
-
tag_name: ${{ needs.detect-tag.outputs.release_tag }}
|
|
229
|
-
body_path: release-notes.md
|
|
230
|
-
files: "*.tgz"
|
|
231
|
-
draft: false
|
|
232
|
-
prerelease: ${{ contains(needs.detect-tag.outputs.release_tag, '-') }}
|
|
233
|
-
env:
|
|
234
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
235
|
-
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
name: Test & Build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
test:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
node-version: [20.x]
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Checkout
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
23
|
-
uses: actions/setup-node@v4
|
|
24
|
-
with:
|
|
25
|
-
node-version: ${{ matrix.node-version }}
|
|
26
|
-
|
|
27
|
-
- name: Setup pnpm
|
|
28
|
-
uses: pnpm/action-setup@v4
|
|
29
|
-
with:
|
|
30
|
-
version: 10
|
|
31
|
-
|
|
32
|
-
- name: Get pnpm store directory
|
|
33
|
-
id: pnpm-store
|
|
34
|
-
shell: bash
|
|
35
|
-
run: |
|
|
36
|
-
# pnpm may return a non-zero code in some environments; fall back to a sane default
|
|
37
|
-
STORE_PATH="$(pnpm store path 2>/dev/null || echo "${HOME}/.pnpm-store")"
|
|
38
|
-
echo "store-path=$STORE_PATH" >> $GITHUB_OUTPUT
|
|
39
|
-
|
|
40
|
-
- name: Cache pnpm store
|
|
41
|
-
uses: actions/cache@v4
|
|
42
|
-
with:
|
|
43
|
-
path: ${{ steps.pnpm-store.outputs.store-path }}
|
|
44
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
45
|
-
restore-keys: ${{ runner.os }}-pnpm-store-
|
|
46
|
-
|
|
47
|
-
- name: Install dependencies
|
|
48
|
-
run: pnpm install --frozen-lockfile
|
|
49
|
-
|
|
50
|
-
- name: Type check
|
|
51
|
-
run: pnpm type-check
|
|
52
|
-
|
|
53
|
-
- name: Lint
|
|
54
|
-
run: pnpm lint
|
|
55
|
-
continue-on-error: true
|
|
56
|
-
|
|
57
|
-
- name: Build
|
|
58
|
-
run: pnpm build
|
|
59
|
-
|
|
60
|
-
- name: Verify build outputs
|
|
61
|
-
run: |
|
|
62
|
-
test -f dist/index.js || exit 1
|
|
63
|
-
test -f dist/index.cjs || exit 1
|
|
64
|
-
test -f dist/beans-mcp-server.cjs || exit 1
|
|
65
|
-
test -f dist/index.d.ts || exit 1
|
|
66
|
-
echo "✓ All build outputs verified"
|
|
67
|
-
|
|
68
|
-
- name: Test
|
|
69
|
-
run: pnpm test:coverage --reporter=junit --outputFile=test-report.junit.xml
|
|
70
|
-
|
|
71
|
-
- name: Upload test results to Codecov
|
|
72
|
-
if: ${{ !cancelled() }}
|
|
73
|
-
uses: codecov/test-results-action@v1
|
|
74
|
-
with:
|
|
75
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
76
|
-
|
|
77
|
-
- name: Upload coverage reports to Codecov
|
|
78
|
-
uses: codecov/codecov-action@v5
|
|
79
|
-
with:
|
|
80
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx lint-staged
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
20
|
package/.oxfmtrc.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
-
"ignorePatterns": ["node_modules", "dist"],
|
|
4
|
-
"arrowParens": "avoid",
|
|
5
|
-
"bracketSpacing": true,
|
|
6
|
-
"printWidth": 120,
|
|
7
|
-
"proseWrap": "preserve",
|
|
8
|
-
"semi": true,
|
|
9
|
-
"singleQuote": true,
|
|
10
|
-
"tabWidth": 2
|
|
11
|
-
}
|
package/.oxlintrc.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
-
"plugins": [
|
|
4
|
-
"unicorn",
|
|
5
|
-
"typescript",
|
|
6
|
-
"oxc",
|
|
7
|
-
"import",
|
|
8
|
-
"promise",
|
|
9
|
-
"node",
|
|
10
|
-
"vitest"
|
|
11
|
-
],
|
|
12
|
-
"categories": {},
|
|
13
|
-
"rules": {},
|
|
14
|
-
"settings": {
|
|
15
|
-
"jsdoc": {
|
|
16
|
-
"ignorePrivate": false,
|
|
17
|
-
"ignoreInternal": false,
|
|
18
|
-
"ignoreReplacesDocs": true,
|
|
19
|
-
"overrideReplacesDocs": true,
|
|
20
|
-
"augmentsExtendsReplacesDocs": false,
|
|
21
|
-
"implementsReplacesDocs": false,
|
|
22
|
-
"exemptDestructuredRootsFromChecks": false,
|
|
23
|
-
"tagNamePreference": {}
|
|
24
|
-
},
|
|
25
|
-
"vitest": {
|
|
26
|
-
"typecheck": false
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"env": {
|
|
30
|
-
"builtin": true
|
|
31
|
-
},
|
|
32
|
-
"globals": {},
|
|
33
|
-
"ignorePatterns": [
|
|
34
|
-
"node_modules",
|
|
35
|
-
"dist"
|
|
36
|
-
]
|
|
37
|
-
}
|
package/.vscode/settings.json
DELETED