@buun_group/plotwork-mcp 0.4.0-beta.1 → 0.4.0-beta.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/THIRD-PARTY-NOTICES.md +1 -1
- package/package.json +1 -1
- package/plotwork-mcp.mjs +32 -8
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
@buun_group/plotwork-mcp 0.4.0-beta.
|
|
3
|
+
@buun_group/plotwork-mcp 0.4.0-beta.2 is licensed under the MIT licence, in the file LICENSE. The single file plotwork-mcp.mjs also contains code and data from other people. This file lists them, with the licence each is used under and the full licence text. Those licences apply to that material. The MIT licence of @buun_group/plotwork-mcp does not replace them, and it does not cover the vendor artwork described under "Trademarks and official icons".
|
|
4
4
|
|
|
5
5
|
The build writes this file from the contents of the bundle. Do not edit it.
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buun_group/plotwork-mcp",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.2",
|
|
4
4
|
"description": "No API key and no account. Plotwork MCP server for local use over stdio: read-only tools that draw, validate, outline, convert, and render twenty kinds of diagram, from flow, sequence, and database to Gantt, state, mind map, and treemap. It sends nothing unless you opt in.",
|
|
5
5
|
"mcpName": "dev.plotwork/mcp",
|
|
6
6
|
"license": "MIT",
|
package/plotwork-mcp.mjs
CHANGED
|
@@ -65,7 +65,7 @@ var init_icon_art_folder = __esm({
|
|
|
65
65
|
var package_default;
|
|
66
66
|
var init_package = __esm({
|
|
67
67
|
"package.json"() {
|
|
68
|
-
package_default = { version: "0.4.0-beta.
|
|
68
|
+
package_default = { version: "0.4.0-beta.2" };
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
@@ -784,17 +784,19 @@ var init_style_rules = __esm({
|
|
|
784
784
|
});
|
|
785
785
|
|
|
786
786
|
// ../../packages/diagrams/src/constants/ci-setup.ts
|
|
787
|
-
function ciSetupWorkflow() {
|
|
787
|
+
function ciSetupWorkflow(options3 = {}) {
|
|
788
|
+
const keyless = options3.keyless === true;
|
|
788
789
|
return [
|
|
789
790
|
"name: diagrams",
|
|
790
791
|
"",
|
|
791
792
|
"on:",
|
|
792
793
|
" pull_request:",
|
|
793
794
|
" push:",
|
|
794
|
-
|
|
795
|
+
` branches: [${options3.branch ?? "main"}]`,
|
|
795
796
|
"",
|
|
796
797
|
"permissions:",
|
|
797
798
|
" contents: read",
|
|
799
|
+
...keyless ? [" id-token: write"] : [],
|
|
798
800
|
"",
|
|
799
801
|
"jobs:",
|
|
800
802
|
" drift:",
|
|
@@ -808,8 +810,7 @@ function ciSetupWorkflow() {
|
|
|
808
810
|
" command: generate",
|
|
809
811
|
" mode: check",
|
|
810
812
|
" report-drift: true",
|
|
811
|
-
" env:",
|
|
812
|
-
` ${KEY_VARIABLE}: \${{ secrets.${KEY_VARIABLE} }}`
|
|
813
|
+
...keyless ? [] : [" env:", ` ${KEY_VARIABLE}: \${{ secrets.${KEY_VARIABLE} }}`]
|
|
813
814
|
].join("\n");
|
|
814
815
|
}
|
|
815
816
|
function ciSetupSteps() {
|
|
@@ -824,7 +825,7 @@ function ciSetupSteps() {
|
|
|
824
825
|
...ciSetupWorkflow().split("\n").map((line3) => line3 === "" ? "" : ` ${line3}`),
|
|
825
826
|
" ```",
|
|
826
827
|
"",
|
|
827
|
-
`5. **Leave the key to the person.** The report to the organisation's Drift tab needs an organisation API key in the repository secret \`${KEY_VARIABLE}\`; the check itself runs without one. Never ask for the key in the chat and never write it into a file. Ask the person to make the key in the Plotwork portal, under the organisation's Keys, and to set the secret themselves, with \`gh secret set ${KEY_VARIABLE}\` (it asks for the value) or in the repository's Settings, Secrets and variables, Actions. To sign CI in with no key, the organisation can trust the repository instead, under Keys, Trusted publishers (${TRUSTED_PUBLISHERS_DOC}); tell the person it exists, and keep the key in the workflow unless they ask for that.`,
|
|
828
|
+
`5. **Leave the key to the person.** The report to the organisation's Drift tab needs an organisation API key in the repository secret \`${KEY_VARIABLE}\`; the check itself runs without one. Never ask for the key in the chat and never write it into a file. Ask the person to make the key in the Plotwork portal, under the organisation's Keys and CI, and to set the secret themselves, with \`gh secret set ${KEY_VARIABLE}\` (it asks for the value) or in the repository's Settings, Secrets and variables, Actions. To sign CI in with no key, the organisation can trust the repository instead, under Keys and CI, Trusted publishers (${TRUSTED_PUBLISHERS_DOC}); tell the person it exists, and keep the key in the workflow unless they ask for that.`,
|
|
828
829
|
`6. **Open a pull request.** Commit the settings file, the diagrams and the workflow on a new branch, and open a pull request titled "Add Plotwork diagrams and the drift check" that lists each diagram and the files it is drawn from. Once it merges and runs with the secret set, the repository appears on the organisation's Drift tab.`
|
|
829
830
|
].join("\n");
|
|
830
831
|
}
|
|
@@ -200169,6 +200170,17 @@ var init_apply = __esm({
|
|
|
200169
200170
|
}
|
|
200170
200171
|
});
|
|
200171
200172
|
|
|
200173
|
+
// ../../packages/diagrams/src/edit/merge.ts
|
|
200174
|
+
var init_merge = __esm({
|
|
200175
|
+
"../../packages/diagrams/src/edit/merge.ts"() {
|
|
200176
|
+
"use strict";
|
|
200177
|
+
init_apply();
|
|
200178
|
+
init_compare();
|
|
200179
|
+
init_references3();
|
|
200180
|
+
init_scan2();
|
|
200181
|
+
}
|
|
200182
|
+
});
|
|
200183
|
+
|
|
200172
200184
|
// ../../packages/diagrams/src/edit/index.ts
|
|
200173
200185
|
var init_edit = __esm({
|
|
200174
200186
|
"../../packages/diagrams/src/edit/index.ts"() {
|
|
@@ -200178,6 +200190,7 @@ var init_edit = __esm({
|
|
|
200178
200190
|
init_compare_diagrams2();
|
|
200179
200191
|
init_compare_report();
|
|
200180
200192
|
init_scan2();
|
|
200193
|
+
init_merge();
|
|
200181
200194
|
}
|
|
200182
200195
|
});
|
|
200183
200196
|
|
|
@@ -203532,7 +203545,7 @@ function libraryInstructions(library) {
|
|
|
203532
203545
|
function librarySaveStep(library) {
|
|
203533
203546
|
return `When the diagram is finished, save it to the private library of ${JSON.stringify(library.name)} with publish_diagram (no need to ask: only members can open it).`;
|
|
203534
203547
|
}
|
|
203535
|
-
var SERVER_INFO, SAVING_INSTRUCTIONS, SERVER_INSTRUCTIONS, KEEP_IN_LIBRARY_STEP, HOSTED_INSTRUCTIONS;
|
|
203548
|
+
var SERVER_INFO, SAVING_INSTRUCTIONS, SERVER_INSTRUCTIONS, BOARD_INSTRUCTIONS, KEEP_IN_LIBRARY_STEP, HOSTED_INSTRUCTIONS;
|
|
203536
203549
|
var init_server_info = __esm({
|
|
203537
203550
|
"src/server-info.ts"() {
|
|
203538
203551
|
"use strict";
|
|
@@ -203565,6 +203578,7 @@ var init_server_info = __esm({
|
|
|
203565
203578
|
"Use validate_diagram, outline_diagram, render_diagram, and search_icons only for one fine-grained step.",
|
|
203566
203579
|
"Choose node types and tones for meaning; colors are chosen by the theme and cannot be set."
|
|
203567
203580
|
].join(" ");
|
|
203581
|
+
BOARD_INSTRUCTIONS = "This connection also reaches its organisation's live whiteboards, which people watch while they change. To work on one: take the board the person names (list_boards finds it by name, or use the id in its address), open_board, read_board_tab, then edit_board_tab with small operations against the version you read; a whole source only for a new or empty tab. During a meeting, call read_board_tab with sinceVersion before every edit, so you build on what people changed, and say in one line what you changed. Use add_board_tab for a separate diagram. Never replace a tab to undo someone else's change, and never publish a board's tab unless the person asks.";
|
|
203568
203582
|
KEEP_IN_LIBRARY_STEP = "To keep it in an organisation's library, or in the person's own Diagrams, call publish_diagram when they ask.";
|
|
203569
203583
|
HOSTED_INSTRUCTIONS = "A viewUrl from a drawing tool holds the drawing itself in the link: nothing is saved on Plotwork, and it will not appear in any Diagrams list; when the person wants a diagram kept in an organisation's library or their own Diagrams, call publish_diagram. When the person asks to share a finished diagram or wants a link to it, call publish_diagram with the valid source: it returns a public link and a Markdown image to paste, and publishing the same diagram again returns the same link. Publish only when asked, because anyone with the link can see the picture. After you edit a published diagram, call publish_diagram again: an edited diagram is a new picture with a new link, so replace the old link wherever it is used. Set embedSource true on publish_diagram when someone may want to edit the diagram later, and tell the person that the source is then part of the public picture. A drawing too big to return in an answer is also the case for publish_diagram: it gives a link in place of the picture. To keep a diagram inside a team instead, pass organization with the slug or id of an organisation, but only when the person names an organisation or asks for a team diagram: it is stored in that organisation's private library and the answer has a viewUrl for members in place of a public link, so there is no Markdown image. Never guess an organisation, and if it is not found, ask the person which one they mean. An organisation can also send its members' diagrams to its library when organization is left out: the answer then names it and says why, and the person must be told the diagram is in that library, not at a public link. Pass personal true only when the person asks for a public link anyway; an organisation that requires its library refuses it, and then tell the person. An organisation can also keep every diagram its agents draw: a drawing's answer then has autoPublished, and its next names the library; tell the person where the diagram is, and do not publish it again. An organisation can also hold a publish for approval: the answer then has approval and warning W601, held for approval by your organisation; tell the person it is stored and waits for an approver, and do not publish it again. An owner may restrict a folder, and a reader may not publish: when the answer says the folder is restricted or the role does not allow it, ask the person which folder they may use instead of trying others or publishing elsewhere. Call list_diagrams when the person asks what they have published or to get a diagram id; it changes nothing. Call delete_diagram only after the person has said which diagram to delete, by name, and tell them what you deleted; never delete on a guess, in bulk, or to make room for a publish unless they asked, and a locked diagram cannot be deleted until the owner unlocks it. When an owner or admin of an organisation asks to publish a checked pattern file, call publish_pattern with it (and organization unless you are connected through it): its agents then find it first. Set replace true only after the person has said to change the pattern of that name.";
|
|
203570
203584
|
}
|
|
@@ -203920,7 +203934,8 @@ function createDiagramsServer(options3 = {}, log = logToConsole, caller, hostedT
|
|
|
203920
203934
|
taken.add(tool.name);
|
|
203921
203935
|
}
|
|
203922
203936
|
const base = profile === "core" ? CORE_INSTRUCTIONS : SERVER_INSTRUCTIONS;
|
|
203923
|
-
const
|
|
203937
|
+
const general = hostedTools.length === 0 ? base : `${base} ${HOSTED_INSTRUCTIONS}`;
|
|
203938
|
+
const hosted = hostedTools.some((tool) => tool.name === "list_boards") ? `${general} ${BOARD_INSTRUCTIONS}` : general;
|
|
203924
203939
|
const saved = hostedTools.length > 0 && answers2.library !== void 0 && answers2.library !== null ? `${hosted} ${libraryInstructions(answers2.library)}` : hosted;
|
|
203925
203940
|
const patterns = answers2.patterns ?? null;
|
|
203926
203941
|
const instructions = patterns === null ? saved : `${saved} ${patternInstructions(patterns)}`;
|
|
@@ -204163,6 +204178,14 @@ var init_json_schema3 = __esm({
|
|
|
204163
204178
|
}
|
|
204164
204179
|
});
|
|
204165
204180
|
|
|
204181
|
+
// ../../packages/diagrams/src/settings/detect-sources.ts
|
|
204182
|
+
var init_detect_sources = __esm({
|
|
204183
|
+
"../../packages/diagrams/src/settings/detect-sources.ts"() {
|
|
204184
|
+
"use strict";
|
|
204185
|
+
init_style_rules();
|
|
204186
|
+
}
|
|
204187
|
+
});
|
|
204188
|
+
|
|
204166
204189
|
// ../../packages/diagrams/src/settings/index.ts
|
|
204167
204190
|
var init_settings3 = __esm({
|
|
204168
204191
|
"../../packages/diagrams/src/settings/index.ts"() {
|
|
@@ -204172,6 +204195,7 @@ var init_settings3 = __esm({
|
|
|
204172
204195
|
init_schema4();
|
|
204173
204196
|
init_json_schema3();
|
|
204174
204197
|
init_tool_settings();
|
|
204198
|
+
init_detect_sources();
|
|
204175
204199
|
}
|
|
204176
204200
|
});
|
|
204177
204201
|
|