@hyperstar/mcp 0.1.13 → 0.1.14
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/README.md +8 -0
- package/package.json +3 -1
- package/scripts/npm-clean-room-smoke.mjs +113 -0
package/README.md
CHANGED
|
@@ -5,6 +5,9 @@ workflows. It exposes scoped creator search, campaign roster, bulk email, and
|
|
|
5
5
|
inbox tools for MCP clients using either a service-account key or local browser
|
|
6
6
|
CLI login.
|
|
7
7
|
|
|
8
|
+
For first-tester setup, MCP client snippets, and safe starter prompts, use the
|
|
9
|
+
[headless agent quickstart](https://github.com/Hyperstar-org/backend/blob/main/docs/headless-agent-quickstart.md).
|
|
10
|
+
|
|
8
11
|
## Install
|
|
9
12
|
|
|
10
13
|
Run the MCP server directly from npm:
|
|
@@ -147,8 +150,13 @@ It also exposes matching prompts:
|
|
|
147
150
|
npm install
|
|
148
151
|
npm test
|
|
149
152
|
npm run build
|
|
153
|
+
npm run smoke:npm
|
|
150
154
|
```
|
|
151
155
|
|
|
156
|
+
`npm run smoke:npm` verifies the published npm package can be resolved and that
|
|
157
|
+
both package binaries print help without requiring local build artifacts,
|
|
158
|
+
authentication, or real workflow API calls.
|
|
159
|
+
|
|
152
160
|
## Examples
|
|
153
161
|
|
|
154
162
|
Search creators:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperstar/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "Local stdio MCP server and CLI for Hyperstar headless workflows.",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
|
+
"scripts/npm-clean-room-smoke.mjs",
|
|
36
37
|
"README.md",
|
|
37
38
|
"package.json"
|
|
38
39
|
],
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"format:check": "prettier --check .",
|
|
45
46
|
"prepack": "npm run build",
|
|
46
47
|
"smoke:dev": "npm run build && node scripts/dev-smoke.mjs",
|
|
48
|
+
"smoke:npm": "node scripts/npm-clean-room-smoke.mjs",
|
|
47
49
|
"test": "vitest run",
|
|
48
50
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
49
51
|
},
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
10
|
+
const packageJson = JSON.parse(
|
|
11
|
+
readFileSync(resolve(packageRoot, "package.json"), "utf8"),
|
|
12
|
+
);
|
|
13
|
+
const packageSpec =
|
|
14
|
+
process.env.HYPERSTAR_MCP_NPM_PACKAGE ??
|
|
15
|
+
`${packageJson.name}@${packageJson.version}`;
|
|
16
|
+
const scratchDir = mkdtempSync(resolve(tmpdir(), "hyperstar-mcp-npm-smoke-"));
|
|
17
|
+
|
|
18
|
+
function isLocalPackageSpec(value) {
|
|
19
|
+
return (
|
|
20
|
+
value.startsWith("file:") ||
|
|
21
|
+
value.startsWith(".") ||
|
|
22
|
+
value.endsWith(".tgz") ||
|
|
23
|
+
isAbsolute(value)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function logLocalPackageSpec(value) {
|
|
28
|
+
console.log(
|
|
29
|
+
JSON.stringify(
|
|
30
|
+
{
|
|
31
|
+
step: "local-package",
|
|
32
|
+
ok: true,
|
|
33
|
+
command: [],
|
|
34
|
+
stdout: [value],
|
|
35
|
+
},
|
|
36
|
+
null,
|
|
37
|
+
2,
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function runStep(step, command, args) {
|
|
43
|
+
const result = spawnSync(command, args, {
|
|
44
|
+
cwd: scratchDir,
|
|
45
|
+
encoding: "utf8",
|
|
46
|
+
env: process.env,
|
|
47
|
+
shell: false,
|
|
48
|
+
});
|
|
49
|
+
const stdout = result.stdout.trim();
|
|
50
|
+
const stderr = result.stderr.trim();
|
|
51
|
+
if (result.status !== 0) {
|
|
52
|
+
console.error(
|
|
53
|
+
JSON.stringify(
|
|
54
|
+
{
|
|
55
|
+
step,
|
|
56
|
+
ok: false,
|
|
57
|
+
command: [command, ...args],
|
|
58
|
+
status: result.status,
|
|
59
|
+
stdout,
|
|
60
|
+
stderr,
|
|
61
|
+
},
|
|
62
|
+
null,
|
|
63
|
+
2,
|
|
64
|
+
),
|
|
65
|
+
);
|
|
66
|
+
process.exit(result.status ?? 1);
|
|
67
|
+
}
|
|
68
|
+
console.log(
|
|
69
|
+
JSON.stringify(
|
|
70
|
+
{
|
|
71
|
+
step,
|
|
72
|
+
ok: true,
|
|
73
|
+
command: [command, ...args],
|
|
74
|
+
stdout: stdout.split("\n").slice(0, 8),
|
|
75
|
+
},
|
|
76
|
+
null,
|
|
77
|
+
2,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
if (isLocalPackageSpec(packageSpec)) {
|
|
84
|
+
logLocalPackageSpec(packageSpec);
|
|
85
|
+
} else {
|
|
86
|
+
runStep("registry-version", "npm", [
|
|
87
|
+
"view",
|
|
88
|
+
packageSpec,
|
|
89
|
+
"version",
|
|
90
|
+
"--silent",
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
runStep("hyperstar-cli-help", "npm", [
|
|
94
|
+
"exec",
|
|
95
|
+
"--yes",
|
|
96
|
+
"--package",
|
|
97
|
+
packageSpec,
|
|
98
|
+
"--",
|
|
99
|
+
"hyperstar",
|
|
100
|
+
"--help",
|
|
101
|
+
]);
|
|
102
|
+
runStep("hyperstar-mcp-help", "npm", [
|
|
103
|
+
"exec",
|
|
104
|
+
"--yes",
|
|
105
|
+
"--package",
|
|
106
|
+
packageSpec,
|
|
107
|
+
"--",
|
|
108
|
+
"hyperstar-mcp",
|
|
109
|
+
"--help",
|
|
110
|
+
]);
|
|
111
|
+
} finally {
|
|
112
|
+
rmSync(scratchDir, { recursive: true, force: true });
|
|
113
|
+
}
|