@showly/mcp-server 0.4.8 → 0.6.0
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/LICENSE +21 -0
- package/README.md +40 -12
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +35 -21
- package/dist/showly-hosting-skill.d.ts +2 -0
- package/dist/showly-hosting-skill.js +2 -0
- package/manifest.json +1 -1
- package/package.json +9 -8
- package/skills/showly-hosting/SKILL.md +37 -30
- package/skills/showly-reports/SKILL.md +109 -0
- package/skills/showly-reports/THIRD_PARTY_LICENSES.txt +118 -0
- package/skills/showly-reports/references/format.md +64 -0
- package/skills/showly-reports/references/upstream.md +25 -0
- package/skills/showly-reports/scripts/report.mjs +98 -0
- package/skills/showly-reports/scripts/vendor/am.mjs +8218 -0
- package/skills/showly-reports/scripts/vendor/upstream.json +12 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Answer me with HTML 0.4.14
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
MIT License
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2026 Answer me with HTML contributors
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
|
|
26
|
+
marked 18.0.14
|
|
27
|
+
==============
|
|
28
|
+
|
|
29
|
+
# License information
|
|
30
|
+
|
|
31
|
+
## Contribution License Agreement
|
|
32
|
+
|
|
33
|
+
If you contribute code to this project, you are implicitly allowing your code
|
|
34
|
+
to be distributed under the MIT license. You are also implicitly verifying that
|
|
35
|
+
all code is your original work. `</legalese>`
|
|
36
|
+
|
|
37
|
+
## Marked
|
|
38
|
+
|
|
39
|
+
Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
|
|
40
|
+
Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
|
|
41
|
+
|
|
42
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
43
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
44
|
+
in the Software without restriction, including without limitation the rights
|
|
45
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
46
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
47
|
+
furnished to do so, subject to the following conditions:
|
|
48
|
+
|
|
49
|
+
The above copyright notice and this permission notice shall be included in
|
|
50
|
+
all copies or substantial portions of the Software.
|
|
51
|
+
|
|
52
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
54
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
55
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
56
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
57
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58
|
+
THE SOFTWARE.
|
|
59
|
+
|
|
60
|
+
## Markdown
|
|
61
|
+
|
|
62
|
+
Copyright © 2004, John Gruber
|
|
63
|
+
http://daringfireball.net/
|
|
64
|
+
All rights reserved.
|
|
65
|
+
|
|
66
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
67
|
+
|
|
68
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
69
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
70
|
+
* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
71
|
+
|
|
72
|
+
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
|
73
|
+
|
|
74
|
+
@dagrejs/dagre 3.1.1
|
|
75
|
+
====================
|
|
76
|
+
|
|
77
|
+
Copyright (c) 2012-2014 Chris Pettitt
|
|
78
|
+
|
|
79
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
80
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
81
|
+
in the Software without restriction, including without limitation the rights
|
|
82
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
83
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
84
|
+
furnished to do so, subject to the following conditions:
|
|
85
|
+
|
|
86
|
+
The above copyright notice and this permission notice shall be included in
|
|
87
|
+
all copies or substantial portions of the Software.
|
|
88
|
+
|
|
89
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
90
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
91
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
92
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
93
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
94
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
95
|
+
THE SOFTWARE.
|
|
96
|
+
|
|
97
|
+
@dagrejs/graphlib 4.0.5
|
|
98
|
+
=======================
|
|
99
|
+
|
|
100
|
+
Copyright (c) 2012-2014 Chris Pettitt
|
|
101
|
+
|
|
102
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
103
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
104
|
+
in the Software without restriction, including without limitation the rights
|
|
105
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
106
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
107
|
+
furnished to do so, subject to the following conditions:
|
|
108
|
+
|
|
109
|
+
The above copyright notice and this permission notice shall be included in
|
|
110
|
+
all copies or substantial portions of the Software.
|
|
111
|
+
|
|
112
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
113
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
114
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
115
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
116
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
117
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
118
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Report draft format
|
|
2
|
+
|
|
3
|
+
Adapted from Answer me with HTML; attribution and license are in
|
|
4
|
+
`../THIRD_PARTY_LICENSES.txt`.
|
|
5
|
+
|
|
6
|
+
````markdown
|
|
7
|
+
---
|
|
8
|
+
title: Cache options
|
|
9
|
+
lang: en
|
|
10
|
+
template: sheet
|
|
11
|
+
theme: shadcn
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The conclusion and its scope go here.
|
|
15
|
+
|
|
16
|
+
## Recommendation
|
|
17
|
+
|
|
18
|
+
```callout info Decision
|
|
19
|
+
Choose based on the workload and operational requirements below.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Request path
|
|
23
|
+
|
|
24
|
+
```flow LR
|
|
25
|
+
Client -> Cache: lookup
|
|
26
|
+
Cache -> Database: miss
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Trade-offs
|
|
30
|
+
|
|
31
|
+
| Option | Benefit | Cost |
|
|
32
|
+
| ------------ | ------------ | ------------------------ |
|
|
33
|
+
| Local cache | Low latency | Per-process invalidation |
|
|
34
|
+
| Shared cache | Shared state | Network dependency |
|
|
35
|
+
````
|
|
36
|
+
|
|
37
|
+
Each `##` heading creates a panel. `template: doc` creates a linear reading page
|
|
38
|
+
with a table of contents; `sheet` uses a panel layout. `theme: auto` selects a
|
|
39
|
+
theme for the content; built-ins are `blueprint`, `shadcn` and `paper`.
|
|
40
|
+
`lang: zh-CN` or another language tag sets page labels and language. Write the
|
|
41
|
+
draft itself in the user's language.
|
|
42
|
+
|
|
43
|
+
| Information | Component fence | Example syntax |
|
|
44
|
+
| ---------------------- | -------------------- | ---------------------------------------- |
|
|
45
|
+
| Flow or architecture | `flow LR` | `Client -> API: request` |
|
|
46
|
+
| Messages in time order | `sequence` | `Client -> Server: SYN` |
|
|
47
|
+
| Hierarchy | `tree` | Indented lines |
|
|
48
|
+
| History | `timeline` | `2026-01 \| Milestone` |
|
|
49
|
+
| Value and limit | `limits` | `Storage \| 13 / 20 \| GB` |
|
|
50
|
+
| Text annotations | `annot` | `[word]{explanation}` |
|
|
51
|
+
| Metadata | `kv` | `Owner: Platform team` |
|
|
52
|
+
| Conclusion or caveat | `callout info Title` | Markdown body |
|
|
53
|
+
| Comparison | Markdown table | `ok`, `no`, `warn` become status symbols |
|
|
54
|
+
|
|
55
|
+
For exact syntax, run `node <skill-dir>/scripts/report.mjs help <component>`.
|
|
56
|
+
Use `help format` for panel spans and frontmatter. Use ordinary Markdown links
|
|
57
|
+
for citations. A raw `html` or `svg` fence is available when no component fits;
|
|
58
|
+
do not render untrusted executable markup without inspecting it.
|
|
59
|
+
|
|
60
|
+
The writing check supports English and Chinese rules such as short sentences,
|
|
61
|
+
active wording and consistent terms. Warnings do not block rendering by default.
|
|
62
|
+
Use `lint draft.md --style strict` when strict checking is wanted. Keep intentional
|
|
63
|
+
technical terms and quotations accurate rather than changing their meaning to
|
|
64
|
+
satisfy a writing warning.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Renderer provenance and updates
|
|
2
|
+
|
|
3
|
+
The unmodified `scripts/vendor/am.mjs` is bundled from
|
|
4
|
+
[Answer me with HTML](https://github.com/QingYunA/answer-me-with-html), version
|
|
5
|
+
0.4.14, commit `e729b248816c0c420531ee61be0d1aac6b197220`.
|
|
6
|
+
`scripts/vendor/upstream.json` records its SHA-256 and bundled dependency versions.
|
|
7
|
+
`THIRD_PARTY_LICENSES.txt` retains the upstream MIT notice and licenses for marked,
|
|
8
|
+
dagre and graphlib. Showly's Skill instructions and wrapper adapt this renderer
|
|
9
|
+
for local reports and Showly hosting.
|
|
10
|
+
|
|
11
|
+
The upstream bundle includes additional commands, but Showly's `scripts/report.mjs`
|
|
12
|
+
entrypoint exposes only static rendering, patching, linting and syntax help. It
|
|
13
|
+
requires Node.js 20+, uses temporary upstream configuration, suppresses browser
|
|
14
|
+
opening and update checks, and leaves an existing upstream installation alone.
|
|
15
|
+
No per-user npm install is needed. This is local code execution, not a remote MCP
|
|
16
|
+
rendering tool.
|
|
17
|
+
|
|
18
|
+
To update, maintainers should check out an explicit upstream commit, copy that
|
|
19
|
+
commit's generated bundle byte-for-byte, review its dependency lockfile and
|
|
20
|
+
refresh the third-party notices and `upstream.json`. Review upstream changes to
|
|
21
|
+
file access, networking, embedded source and output behavior. Run the package's
|
|
22
|
+
tests, including installed-skill rendering and patching, then check a packed npm
|
|
23
|
+
artifact includes both skills, the wrapper, the renderer and licenses. Release
|
|
24
|
+
through Showly's existing package release process; never self-update the vendor
|
|
25
|
+
file in a user's installed skill directory.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Showly's static-report entrypoint. Keep the vendored renderer unmodified.
|
|
3
|
+
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { parseArgs } from "node:util";
|
|
8
|
+
import { spawnSync } from "node:child_process";
|
|
9
|
+
|
|
10
|
+
const usage = `Showly reports — local static HTML (Node.js 20+)
|
|
11
|
+
node report.mjs render <draft.md|-> -o <index.html> [--theme auto|blueprint|shadcn|paper]
|
|
12
|
+
node report.mjs patch <index.html> --panel <title> --from <panel.md>
|
|
13
|
+
node report.mjs lint <draft.md|-> [--style off|80|strict]
|
|
14
|
+
node report.mjs help <format|flow|sequence|tree|timeline|limits|annot|kv|callout|patch|theme>
|
|
15
|
+
node report.mjs list
|
|
16
|
+
Rendering also accepts --template sheet|doc, --mode auto|light|dark and --style.
|
|
17
|
+
Files stay local; use Showly hosting to share them. Video and configuration commands
|
|
18
|
+
are not supported by this entrypoint. The renderer updates with Showly.`;
|
|
19
|
+
|
|
20
|
+
function main(args) {
|
|
21
|
+
if (Number(process.versions.node.split(".")[0]) < 20) {
|
|
22
|
+
console.error(
|
|
23
|
+
"Showly reports requires Node.js 20 or newer. Hosting installation still supports Node.js 18.",
|
|
24
|
+
);
|
|
25
|
+
return 2;
|
|
26
|
+
}
|
|
27
|
+
if (!args.length || args[0] === "--help") {
|
|
28
|
+
console.log(usage);
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
const { values, positionals } = parseArgs({
|
|
32
|
+
args,
|
|
33
|
+
allowPositionals: true,
|
|
34
|
+
options: {
|
|
35
|
+
out: { type: "string", short: "o" },
|
|
36
|
+
"no-open": { type: "boolean" },
|
|
37
|
+
theme: { type: "string" },
|
|
38
|
+
template: { type: "string" },
|
|
39
|
+
mode: { type: "string" },
|
|
40
|
+
style: { type: "string" },
|
|
41
|
+
panel: { type: "string" },
|
|
42
|
+
from: { type: "string" },
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const [command, topic] = positionals;
|
|
46
|
+
if (!["render", "patch", "lint", "help", "list"].includes(command)) {
|
|
47
|
+
throw new Error(`Unsupported report command: ${command}\n${usage}`);
|
|
48
|
+
}
|
|
49
|
+
if (command === "help" && (!topic || topic === "video")) {
|
|
50
|
+
console.log(usage);
|
|
51
|
+
return topic ? 2 : 0;
|
|
52
|
+
}
|
|
53
|
+
// Explicit output keeps files out of the temporary upstream configuration home.
|
|
54
|
+
if (command === "render" && !values.out?.trim()) {
|
|
55
|
+
throw new Error(
|
|
56
|
+
"render requires -o <path>, usually a dedicated report directory's index.html",
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
if (command === "patch" && topic && topic !== "-") {
|
|
60
|
+
const root = readFileSync(topic, "utf8").match(/<html\b[^>]*>/)?.[0] ?? "";
|
|
61
|
+
if (/\sdata-video\b/.test(root)) {
|
|
62
|
+
throw new Error(
|
|
63
|
+
"Video pages cannot be patched by Showly's static report renderer.",
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const configHome = mkdtempSync(join(tmpdir(), "showly-report-"));
|
|
68
|
+
try {
|
|
69
|
+
const child = spawnSync(
|
|
70
|
+
process.execPath,
|
|
71
|
+
[
|
|
72
|
+
fileURLToPath(new URL("./vendor/am.mjs", import.meta.url)),
|
|
73
|
+
...args,
|
|
74
|
+
"--no-open",
|
|
75
|
+
],
|
|
76
|
+
{
|
|
77
|
+
stdio: "inherit",
|
|
78
|
+
env: {
|
|
79
|
+
...process.env,
|
|
80
|
+
AM_HOME: configHome,
|
|
81
|
+
AM_NO_OPEN: "1",
|
|
82
|
+
AM_NO_UPDATE_CHECK: "1",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
if (child.error) throw child.error;
|
|
87
|
+
return child.status ?? 1;
|
|
88
|
+
} finally {
|
|
89
|
+
rmSync(configHome, { recursive: true, force: true });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
process.exitCode = main(process.argv.slice(2));
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(error.message);
|
|
97
|
+
process.exitCode = 2;
|
|
98
|
+
}
|