rayrun 0.0.0-development → 0.3.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 +7 -22
- package/README.md +12 -28
- package/index.js +3 -0
- package/index.test.js +29 -0
- package/package.json +21 -33
- package/dist/createDataTransfer.d.ts +0 -7
- package/dist/createDataTransfer.js +0 -16
- package/dist/utilities.d.ts +0 -1
- package/dist/utilities.js +0 -5
package/LICENSE
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
All rights reserved.
|
|
1
|
+
MIT License
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
|
6
|
-
* Redistributions of source code must retain the above copyright
|
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
|
10
|
-
documentation and/or other materials provided with the distribution.
|
|
11
|
-
* Neither the name of the Punkpeye (https://punkpeye.com/) nor the
|
|
12
|
-
names of its contributors may be used to endorse or promote products
|
|
13
|
-
derived from this software without specific prior written permission.
|
|
3
|
+
Copyright (c) 2026 Rayrun
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Rayrun CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connect supported MCP clients, execute OAuth-bound tools, or manage workspace services, policy,
|
|
4
|
+
approvals, and activity through the public API.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Used to create a [DataTransfer](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer). Useful when you want to perform drag and drop operations.
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
createDataTransfer = (args: {
|
|
15
|
-
page: Page;
|
|
16
|
-
filePath: string;
|
|
17
|
-
fileName: string;
|
|
18
|
-
fileType: string;
|
|
19
|
-
}): Promise<DataTransfer>;
|
|
6
|
+
```sh
|
|
7
|
+
npx rayrun setup https://copy-the-endpoint-from-rayrun.example/mcp
|
|
8
|
+
npx rayrun tools describe linear.create_issue
|
|
9
|
+
npx rayrun call linear.create_issue '{"title":"Fix the release"}'
|
|
10
|
+
npx rayrun connections list
|
|
20
11
|
```
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import { createDataTransfer } from "playwright-utilities";
|
|
26
|
-
import { resolve } from "node:path";
|
|
13
|
+
This package is the short command for [`@rayrun/cli`](https://www.npmjs.com/package/@rayrun/cli).
|
|
14
|
+
Both names run the same version of the same CLI.
|
|
27
15
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
fileName: "foo.png",
|
|
31
|
-
fileType: "image/png",
|
|
32
|
-
});
|
|
33
|
-
```
|
|
16
|
+
See the [CLI documentation](https://ray.run/docs/cli) for setup, OAuth execution and resume, rollback,
|
|
17
|
+
service connections, tool search, policy inspection, approvals, and activity.
|
package/index.js
ADDED
package/index.test.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { execFile } from 'node:child_process';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import test from 'node:test';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
8
|
+
const launcherPackage = JSON.parse(
|
|
9
|
+
await readFile(new URL('./package.json', import.meta.url), 'utf8'),
|
|
10
|
+
);
|
|
11
|
+
const cliPackage = JSON.parse(
|
|
12
|
+
await readFile(new URL(import.meta.resolve('@rayrun/cli/package.json')), 'utf8'),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
void test('pins and launches the matching CLI release', async () => {
|
|
16
|
+
assert.equal(launcherPackage.version, cliPackage.version);
|
|
17
|
+
assert.equal(
|
|
18
|
+
launcherPackage.dependencies['@rayrun/cli'].replace(/^workspace:/u, ''),
|
|
19
|
+
cliPackage.version,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const { stderr, stdout } = await execFileAsync(process.execPath, [
|
|
23
|
+
new URL('./index.js', import.meta.url).pathname,
|
|
24
|
+
'--version',
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
assert.equal(stderr, '');
|
|
28
|
+
assert.equal(stdout, `${cliPackage.version}\n`);
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,45 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rayrun",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"playwright",
|
|
7
|
-
"utilities"
|
|
8
|
-
],
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Set up MCP clients, execute tools, and manage Rayrun from the command line",
|
|
5
|
+
"license": "MIT",
|
|
9
6
|
"repository": {
|
|
10
7
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/
|
|
8
|
+
"url": "git+https://github.com/rayrundev/rayrun.git",
|
|
9
|
+
"directory": "packages/rayrun"
|
|
12
10
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"types": "./dist/utilities.d.ts",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"test": "playwright test",
|
|
18
|
-
"start": "tsx server.ts",
|
|
19
|
-
"build": "rm -fr ./dist && tsc",
|
|
20
|
-
"lint": "eslint . && prettier --check . && tsc --noEmit"
|
|
11
|
+
"bin": {
|
|
12
|
+
"rayrun": "index.js"
|
|
21
13
|
},
|
|
22
14
|
"files": [
|
|
23
|
-
"
|
|
15
|
+
"index.js",
|
|
16
|
+
"index.test.js",
|
|
17
|
+
"README.md",
|
|
24
18
|
"LICENSE"
|
|
25
19
|
],
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"@
|
|
32
|
-
"@types/jest": "^28.1.8",
|
|
33
|
-
"@types/node": "^18.7.13",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
|
35
|
-
"eslint": "^8.22.0",
|
|
36
|
-
"fastify": "^4.5.2",
|
|
37
|
-
"husky": "^8.0.1",
|
|
38
|
-
"prettier": "^2.7.1",
|
|
39
|
-
"tsx": "^3.8.2",
|
|
40
|
-
"typescript": "^4.7.4"
|
|
20
|
+
"type": "module",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@rayrun/cli": "0.3.0"
|
|
41
26
|
},
|
|
42
27
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
28
|
+
"node": ">=20"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test": "node --test index.test.js"
|
|
44
32
|
}
|
|
45
|
-
}
|
|
33
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type Page } from "@playwright/test";
|
|
2
|
-
export declare const createDataTransfer: ({ page, filePath, fileName, fileType, }: {
|
|
3
|
-
page: Page;
|
|
4
|
-
filePath: string;
|
|
5
|
-
fileName: string;
|
|
6
|
-
fileType: string;
|
|
7
|
-
}) => Promise<import("playwright-core").JSHandle<DataTransfer>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDataTransfer = void 0;
|
|
4
|
-
const promises_1 = require("node:fs/promises");
|
|
5
|
-
const createDataTransfer = async ({ page, filePath, fileName, fileType, }) => {
|
|
6
|
-
return await page.evaluateHandle(async ({ fileHex, localFileName, localFileType }) => {
|
|
7
|
-
const dataTransfer = new DataTransfer();
|
|
8
|
-
dataTransfer.items.add(new File([fileHex], localFileName, { type: localFileType }));
|
|
9
|
-
return dataTransfer;
|
|
10
|
-
}, {
|
|
11
|
-
fileHex: (await (0, promises_1.readFile)(filePath)).toString("hex"),
|
|
12
|
-
localFileName: fileName,
|
|
13
|
-
localFileType: fileType,
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
exports.createDataTransfer = createDataTransfer;
|
package/dist/utilities.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createDataTransfer } from './createDataTransfer';
|
package/dist/utilities.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDataTransfer = void 0;
|
|
4
|
-
var createDataTransfer_1 = require("./createDataTransfer");
|
|
5
|
-
Object.defineProperty(exports, "createDataTransfer", { enumerable: true, get: function () { return createDataTransfer_1.createDataTransfer; } });
|